Commit graph

4656 commits

Author SHA1 Message Date
Tomasz Moń
60e2cd6de9 DM320: Regorganize LCD and TTB memory layout
Do not introduce any change for M:Robe 500 as it uses the two LCD frames
in non-obvious way.

Sansa Connect and Creative ZVM use only single front framebuffer.
Place TTB at DRAM end to minimize memory loss due to alignment.
Reserve as little as possible memory for the LCD frames.
On Sansa Connect this change extends audio buffer by 858 KiB.

Change-Id: I21bdeec4cfba86d71803a39acd651a87e73767e6
2021-07-09 09:24:38 +00:00
Solomon Peachy
2ff3425ab1 build: Rename SHARED_LDFLAG to SHARED_LDFLAGS
Change-Id: Icb81c72fbcfcdad624112a386ba38a40a830d18f
2021-07-08 19:53:05 -04:00
Franklin Wei
d1a92aafff sdl: increase default worker thread size.
This fixes a mysterious, long-standing crash that's been bothering me on
ipod6g for ages: a silent stack overflow in the sound mixing thread (which
is triggered upon loading a new sound, apparently) will thrash the memory
which is located directly before it in the address space.

In this case, it was the SDL_ButtonState variable which stores the mouse
button state that was being trashed. This was manifesting itself by making
the player always run forward, since MOUSE2 is mapped to +forward by
default.

Fix this by quadrupling the stack size of SDL-spawned threads (not the main
thread) from 1 KB to 4 KB.

Change-Id: I2d7901b7cee1e3ceb1ccdebb38d4ac5b7ea730e1
2021-06-28 02:51:48 +00:00
Aidan MacDonald
7aade87863 Fix yellow from 9ccae042
Change-Id: Iad4eaab8b766d1d0aad051971fd49a64126ca4be
2021-06-16 21:22:49 +01:00
Moshe Piekarski
9ccae0421a Implement x^y in calculator
Change-Id: I868b703131675876bd91198b8a53a921152aecba
2021-06-16 19:50:14 +00:00
Aidan MacDonald
5cbeb88541 FiiO M3K: keymap improvements & fixes
- Add support for skip and seek while the player is locked.
  (Thanks to @bahus for the suggestion)
- Fix touch zones because the down button zone ended up being
  a lot smaller than expected due to the touchpad's wonkiness.
  Also added a visual display of the touchpad to its debug menu.
- Fixes the pictureflow keymap because it was mostly unusable.

Change-Id: Ic0da4f8df3613ff7828ce1cb940ed9e77ada3281
2021-05-22 12:20:44 +00:00
William Wilgus
e910f63bba lua add a way to filter settings on read
rather than dumping all the settings allow a filter function
to choose desired settings

in menucoresettings you can see an how to do exact text matches
or wilcard matches you can even use luas version of regex

Change-Id: I4c7f7592498ea194e06e9a556b77ffd57f5d4223
2021-05-19 23:29:10 -04:00
William Wilgus
dcff9b85a3 lua latebound function update
return the nextfunction and nil instead of pairs it allows a faster
return to lua rather than calling the lua function
pcall(fnpairs) from c and returning the result back
into lua to kick off the search
yeah, no clue why I didn't realize that before..

testing in x86 and ARM..
its more RAM efficient to do the initial creation
of the stack in lua code for the __pairs functon
its not faster but being that its a one time hit per
iter creation the reduced churn alone should be worth it
along with a reduced peak RAM usage

fix bug where a failed module can not be reloaded

optimize filetol

fix potential bug in splash scroller when no break character is found
Change-Id: I42c922e07039a19138b97c0d0e80cf3cf2426471
2021-05-19 23:28:35 +00:00
Aidan MacDonald
237919f1c3 Fix invalid use of bool in doom
Settings code tries to cast the bool pointer to an int pointer
and then write through it, which makes AddressSanitizer whine.

Change-Id: I1d6162fc98144cd6b40444016b3b48ef02967324
2021-05-13 18:33:27 +01:00
William Wilgus
adff45ca21 lua -- temp loader
fix a few bugs, improve memory usage

Change-Id: I6ceefd033000a6178eab0dd513679b5d72cec81c
2021-05-06 21:36:55 -04:00
William Wilgus
9b2f23319c lua fix yellow and add temploader
temp loader allows some lua requires to be loaded and
later garbage collected unfortunately the module needs to be formatted
in such a way to pass back a call table in order to keep the functions
within from being garbage collected too early

BE AWARE this bypasses the module loader which would allow code reuse
so if you aren't careful this memory saving tool could spell disaster
for free RAM if you load the same code multiple times

Change-Id: I0b6f81e481b8c779edbd620c8403794f8353926f
2021-05-03 23:13:25 -04:00
William Wilgus
489a5f3ff7 lua add ability to use custom kbd layouts
bring custom keyboard layouts to lua
conversion to the proper format requires create_kbd_layout.lua
just pass a lua string with your desired layout

Change-Id: I14a392410846311a4f3cf8dda0e88d39834d0418
2021-05-04 01:52:08 +00:00
William Wilgus
20cd89908d lua submenus add a way to dynamically add items
updated example script and renamed some functions as well

fixed bug in printtable cursor position if greater than maxlines for the
screen would reset to item 1

now we move the list start and select it
(and try to center it on the screen)

fixed a few bugs in the add_menu code

Change-Id: I01dead0481ef2e925af8b4cc6c14e36c2859dbba
2021-04-30 13:38:54 +00:00
Aidan MacDonald
20fc928221 x1000: Centralize common definitions, memory layout
Change-Id: I8daad058ae55d4b750b1ae407153e4917de5d095
2021-04-28 20:04:10 +01:00
William Wilgus
63b6281505 lua add submenu module + cleanup
allows menus + submenus + context menus all with simple tables
menu_t which is a table of strings
func_t which are the corresponding functions to go with those strings

see lua_scripts/submenu_demo.lua

Change-Id: I907b74b4abef0ecbe49f181d0ced6e6d20e94de5
2021-04-28 04:37:16 +00:00
Aidan MacDonald
d5695822a7 MIPS: remove .MIPS.abiflags section
The abiflags data is only used to communicate ABI information to a
program loader -- you can see what info is stored with readelf -A.
Dropping it shaves 24 bytes off of every binary (including plugins).

Change-Id: Iae78eeffe5c840ff67717707fb94821d24aac8ec
2021-04-26 12:41:06 +00:00
Solomon Peachy
7d0d32dbc6 Nuke the never-functional iriver ifp-7xx port
It never worked, and hasn't compiled in something like a decade, Given
the HW capabilities (limited onboard flash, no expandability) there's
really no point in trying to fix/complete it.

Change-Id: I7d175089840396f8891645bd10010d730dd5bfdc
2021-04-26 07:42:58 -04:00
Solomon Peachy
3ba2f6e5c7 Nuke all TCC77x targets: iAudio 7, Sansa C100, M200(v1-3), Logik DAX
They were never finished, never saw any release ever, and haven't
compiled for the better part of a decade.  Given their HW capabilities [1],
they are not worth trying to fix.

[1] 1-2MB RAM, ~256MB onboard flash, no expandability

Change-Id: I7b2a5806d687114c22156bb0458d4a10a9734190
2021-04-26 07:41:51 -04:00
William Wilgus
557ff6a981 lua print_button script
also allow splash_scroller to be used as static text display

Change-Id: Idc8c9e60ada920e2d1abd5301b59bd235e21a1c2
2021-04-24 00:00:44 -04:00
Solomon Peachy
75d9393796 rockboy: Properly fix the GCC11 code style warnings.
Change-Id: I69c77717604051052288a2d0f3aab068516d18ef
2021-04-23 09:25:47 -04:00
Solomon Peachy
0271c0ed36 rockboy: Upstream code style trips GCC11 warnings.
Code in cpu.h is correct, so just disable -Wmisleading-indentation for
the specific sections that matter.

Change-Id: I378f3a6fef117ac73edb0d8ce998ef3a818be22e
2021-04-23 08:45:33 -04:00
Solomon Peachy
ebb9090004 xzbox: Fix misleading indentation that triggered GCC11 warnings
Change-Id: Ice462ef188dba3bc8ffc46c32142fc29d70e1a68
2021-04-23 08:42:10 -04:00
Solomon Peachy
03695429cf blackjack: Fix warning triggered by GCC 11
Change-Id: Ifcba0caf059bfa9f833893a1dbf0dc7a1c9b3e61
2021-04-23 08:40:57 -04:00
William Wilgus
acda37edd1 lua print table put_line a do_menu alternative
add stylized lines to lua

the exported do_menu has a severe limitation of 64 items
it also requires double the memory

put_line is the way rockbox builds menus

update printtable

user config from core -- done
code cleanup
fixed for 1-bit screens
changed button behavior
fixed for 2-bit screens

Change-Id: I4de55e42685aa1d2f53a33bc8e980827864e810b
2021-04-20 03:30:41 +00:00
Aidan MacDonald
afe80742a5 Fix Pictureflow bugs
It turns out that aa_cache.buf, used to store decoded album art during
background scanning, was not correctly allocated and overlapped with
memory allocated for buflib. This was what caused all the segfaults.

Also fixed a logic error in read_pfraw(), which returns a buflib handle
on success, but also returned 0 on failure -- since 0 is a valid buflib
handle, it should return -1 on failure instead.

Change-Id: Ifaa1c02ec19b0859e43c40c0462ed7738d07fec3
2021-04-17 13:06:29 +00:00
William Wilgus
a9d3e9a13d The Matrix plugin -- Bugfix
Off by one errorS in the matrix plugin

might even say its the matrix plugin re-loaded

Change-Id: I2bc7487615a9e28fcd1d170961fb0b5ee6da6af7
2021-04-16 10:10:15 -04:00
William Wilgus
c77cd7027f lua print_table add ability to draw a line separator
allows you to draw a line between items

Change-Id: I7e6e2f56738e12ff06d06a24f0f9d0769932a7b1
2021-04-08 04:15:40 +00:00
Aidan MacDonald
3ec66893e3 New port: FiiO M3K on bare metal
Change-Id: I7517e7d5459e129dcfc9465c6fbd708619888fbe
2021-03-28 00:01:37 +00:00
Solomon Peachy
d121aa3fe8 build: We don't need sh-specific flags in the pictureflow build.
Change-Id: I1e9ab4332cbeb5aabc01edf825eace6152347e0a
2021-03-25 12:20:15 -04:00
William Wilgus
eb9f05f835 ImageViewer Fix jpeg decoder
Image viewer compiles decoders as a plugin and removes CRT0
A  resuklt static vars do not get initialized in decoders

Change-Id: I72da326967c7b404b297897000f82852661a7ebb
2021-03-11 03:43:56 +00:00
William Wilgus
0dce973729 OpenPlugins Allow opx shortcuts
Allow opx shortcuts to be run through the shortcut menu

Change-Id: I6597b9485dfb224766c442257c4d9c8ac02eece4
2021-03-07 08:22:01 -05:00
William Wilgus
308dd4ffee Open_plugins.c fix red
rb->strncasecmp

Change-Id: Icb1e6d0db42bd4708d581e80596604fb97578761
2021-03-06 18:00:18 +00:00
William Wilgus
87ad55b06e Open_Plugins Add Features
Added an entry 'Add' to the main screen to lessen confusion

side note:
its actually a shortcut back to this plugin with flag '-add'
passed as a parameter

Change-Id: Ifeb0a1e5be99764b1d25d5a3b0e00f1449ec3d78
2021-03-06 17:21:37 +00:00
William Wilgus
9cf45374e0 Announce_status plugin bugfix use artist prior to albumartist
give id3->artist higer precedence than id3->albumartist

Change-Id: I7f57ea274211673c04bf23458735796b03031a15
2021-03-05 21:12:10 -05:00
William Wilgus
0c958d2b4a announce_status trackchange bugfix
!Properly remove callback!
don't play voice prompt at startup if something is actively playing

Change-Id: I237d09c1496bc2bed8433dcdaa1469f3d0f2cb10
2021-03-05 17:37:57 +00:00
William Wilgus
03ae4e6019 Announce_status plugin make USB plug aware
Announce_status was blocking USB from working it now quits on USB plug

Change-Id: I0b7e5e9c1ef118582febd459e706c9b61cf7fe25
2021-03-04 22:55:39 -05:00
William Wilgus
f906df017d Open Plugin -- Make first run show at least one item to user
Open plugin needs the context menu to allow the user to add an item
on the first run there are no items and therefore nothing to pop the
context menu from

Change-Id: I7a78454ff29b20c7b60db44349dd23d500ed887c
2021-03-03 13:37:40 -05:00
Aidan MacDonald
aacb0811d9 Rename symbols of FiiO M3K Linux-based port
Mainly a straight replacement of FIIO_M3K -> FIIO_M3K_LINUX.

Change-Id: Id07c84f8150991d1b6851540c2c3f8f67e3f12c2
2021-02-27 23:53:28 +00:00
Solomon Peachy
ce7731527a announce_status: Fix incorrect function prototype definition
Change-Id: I053b4e3df194ac9dd2172249c0f4902d31a6d412
2020-12-13 19:19:33 -05:00
Franklin Wei
40b6897f4f puzzles: tooling to automate the resyncing process
This adds a resync.sh script that handles most of the resyncing process:
copying new sources, regenerating help, and staging for commit. I also took
this opportunity to make the process more efficient and consistent by only
selecting the types of files that we care about and ignoring any
autogenerated temporary files that may be in the upstream tree.

Change-Id: Ib0803462684b8ae3b40eec3742944e5bdb28508e
2020-12-07 02:11:36 -05:00
Franklin Wei
b7ce408f65 puzzles: update frontend for new midend_get_cursor_location semantics
midend_get_cursor_location now returns a bool indicating success.

Change-Id: Ie3e7130a821b6619c829846177baf2cc6b51e3a3
2020-12-07 02:11:32 -05:00
Franklin Wei
84cd812ccd puzzles: resync with upstream
This updates the upstream sources to include a modified get_cursor_location
patch that I anticipate Simon will merge shortly. Also, I've streamlined
the resync process to only copy the exact files we need to reduce clutter.

Change-Id: I6a5ac60821fce346c500b101c363ae0c63c2ee95
2020-12-07 02:08:18 -05:00
James Buren
6b3b4df6f6 rockbox: move firmware checksum algorithms into a common header
Before this was just implemented inline wherever it was needed. Now
it is provided as 2 inline functions in a header called checksum.h.
There should be no differences in actual behavior.

Change-Id: I5d756cc01dc6225f5cc8b6af90911a3fc7b57cd5
2020-11-22 05:12:04 +00:00
James Buren
c79ddb6bf4 iriver_flash: update valid bootloaders table
This removes all the pre-release bootloader of version 7 and
replaces them with production releases of version 8. The
pre-releases have their own problems and should be left
behind as they were never officially released.

Change-Id: If96531ba63cf4401d04133bda94735fe94ae4de1
2020-11-16 11:57:18 +00:00
Moshe Piekarski
3ef8455626
Remove some SWCODEC artifacts
Change-Id: I580522bc0ec3bc86c24400625d7d9cde2eea8fc8
2020-11-14 19:20:33 -05:00
James Buren
c10eea46a9 iriver_flash: add macros to reduce the rom chip table
The table is now gated by the FLASH_SIZE macro as any given
target will not have a known rom chip of a differing size
than the FLASH_SIZE. This will reduce the resulting code
a bit as well.

Change-Id: I06a283f9f44118080a106e1bcd410e81e0a48d92
2020-11-14 23:21:15 +00:00
James Buren
33d42c20de iriver_flash: do not let the backlight timeout while running
I discovered it was doing this on the H300 during longer operations
and I freaked out at first. This disables this feature until the
program is finished so as to not give anyone else an unnecessary
fright while using it. It will also cut down on frivilous reports.

Change-Id: I0db406912c7f71835576203a540aba8910afa849
2020-11-14 18:47:12 +00:00
Solomon Peachy
388adff3cc pcm: Further cleanup of unused bits of the PCM ACPI:
* pcm_get_bytes_remaining()
 * pcm_calculate_peaks()
 * pcm_get_peak_buffer()

Nothing in-tree uses these at all (except for the lua plugin wrapper)

Change-Id: I971b7beed6760250c8b1ce58f401a601e1e2d585
2020-11-12 15:59:09 +00:00
James Buren
4aa749b59d iriver_flash: refactor code to be easier to understand
This overhauls most of the code to be easier to understand in terms
of the interactions with the flash. I found the original to be rather
confusing with how it kept switching between byte and word offsets.

My solution was to make all external access to the flash in terms of
sectors and bytes. Whatever the flash uses internally is now handled
by the subroutines for performing the erase, program, and verify
operations.

This helps make it far more consistent for the code that actually uses
these operations as they do not need to concern themselves with word
sizes and offsets anymore.

As a side effect of this change the flash operations are now done
entirely by subroutines; even the batch operations that used to use
custom loops.

Additionally some functions were merged with other functions in order
to reduce the amount of functions as well as consolidating common
code fragments.

Change-Id: I4698e920a226a3bbe8070004a14e5848abdd70ec
2020-11-11 13:30:09 +00:00
Mihail Zenkov
b200cd7e4a test_mem: fix asm variant of read/write test
Change-Id: I865691e7540d4a6d18be34e8b81d0b3056837fa0
2020-11-04 13:00:01 +00:00