Commit graph

5223 commits

Author SHA1 Message Date
mojyack
012c61eadf plugins: mikmod: remove hw_freq_sampr usage
TODO:

 * Dynamically hide the sample rates that aren't supported
   by the current sink
 * Better "default" selection based on hardware type/speed

Change-Id: I261544fc3ba78429eaaa81c89aebd2e68106caa3
2026-04-11 14:18:36 -04:00
Solomon Peachy
d82d0be595 FS#13802 - Correct untranslated menu headings in mpegplayer
Every menu heading except the top-level "MPEG Player" (ie the name of
the plugin) now uses pre-existing translated strings.

Change-Id: I65ee64ddc537be4947872da4757bc2f6a27d0bae
2026-04-06 08:13:30 -04:00
mojyack
4cd3d3c519 doom: fix out-of-bounds access of caps->samprs
Change-Id: Icde0146648477dbd0442c67258ff6ae1ff62c994
2026-04-05 14:48:28 -04:00
Solomon Peachy
a2f652cf1f disktidy: Add '__MACOSX' directories to the list
Change-Id: If25ccbeaf1ada8ae4bcc9a1853302c297f7a3e08
2026-04-01 10:32:40 -04:00
mojyack
6be230275e plugins: pdbox: remove HW_SAMPR_CAPS usage
Change-Id: I4e37213a38ac5d1260bc2fa208828abd55fc2647
2026-04-01 08:48:12 -04:00
Solomon Peachy
65f2105445 Revert "sdlapp: Enable compilation of most apps/games"
This reverts commit 96b5642c93.

Reason for revert: Accidentlly merged this before it was ready.

Change-Id: I9344988f6556b774479dd4fd209f30e450ad0858
2026-03-30 20:52:42 -04:00
Erin of Yukis
96b5642c93 sdlapp: Enable compilation of most apps/games
Removes `#ifdef`s in many places to just have `HAVE_TOUCHSCREEN` be the
input fall back, as is already tentatively the case in the code.

Solitaire was the only app excluded since there aren’t enough buttons
for it mapped in the SDL layer.

Change-Id: I62450b7110b86c8037a121e96cd2e46754be79a3
2026-03-29 20:32:58 -04:00
Solomon Peachy
e677895e29 xrick: Fix a race condition that could result in audio stopping
get_more() can disable audio when there's nothing more to genreate
but that can get called (and "fail") _before_ we set the flag
that audio is turned on.  If this occurs, we will incorrecly
set the "audio on" flag after the failure which will prevent
the mixer from being re-started.

(We're at the mercy of thread scheduling)

Change-Id: I4f6c50a71c7ad685ff45f775e7e4b1c61b8b7777
2026-03-29 18:07:00 -04:00
Solomon Peachy
f235443ba1 FS13829 - Add Android-specific entries to disktidy plugin
Notably, the 'Android' and 'LOST.DIR' top-level directories.

Change-Id: Idee411e518a8b73e4f0a4283e368e35c8a2f0938
2026-03-29 09:25:28 -04:00
mojyack
9b207bfb91 plugins: pacbox: remove hw_freq_sampr usage
Change-Id: I365b4f901dd2fbcc22bf1a8009a9d9b58a1da556
2026-03-25 07:35:52 -04:00
Solomon Peachy
2578411f00 Fix red in 9c708e3876
Test build didn't catch this due to a dependency failure.  (WTF?)

Change-Id: I0487a02e9fad8b6bec9b93066619aef04c838d3b
2026-03-25 07:30:27 -04:00
mojyack
9c708e3876 plugins: midi: remove HW_SAMPR_CAPS usage
Change-Id: Ie4962cf6d4f2f9078fa348f8f6f638cfbc0047a5
2026-03-25 07:02:49 -04:00
William Wilgus
db849f5f8a OpenPlugins reset start_in_screen when database record is deleted
This is more of an ease of use enhancement than a bug
but it should prevent the annoyance of the  message about the missing entry
without needing to go and reset the start in screen setting

Change-Id: I15eb005ce254eb0f0d3f2543abf710b68468a8b3
2026-03-19 12:05:51 -04:00
William Wilgus
314becf2ac FS#13824 - In keyremap plugin in "test keymap" context is wrong
The context was supplied with context|flag but expected context x flag

Also fixes a bug where the user export doesn't show the correct save location
if changed -- it still saved properly anyway..

Change-Id: I061d63e15475d2cb73d070737dc18d56d7800472
2026-03-14 11:28:00 -04:00
Vencislav Atanasov
a77c5d2219 3ds: Various fixes, mostly for compiler warnings
- Move all devkitpro includes before the Rockbox ones so that the macros which are both conflicting and unused can be undef'd
- Remove unused result variables
- Exclude an unused function from being compiled for this target
- Fix hex number formatting
- Fix the return value of dummy functions
- Fix macro redefinition in the plugins keypad config
- Remove duplicate button mapping
- Turn off -Wchar-subscripts as it's already handled in Rockbox's ctype.h

Change-Id: I3f5a3d492c585f233277a380feaea5fe877a044f
2026-03-13 10:24:36 -04:00
William Wilgus
86f5665cd0 [bugfix] FS#13709 - Mpegplayer conflicts with additional fonts in the theme
FONT_UI is a placeholder when it gets assigned it isn't resolved
immediately

when its time to resolve the font it is processed with font_get(int font)
first it sets it to the last slot
and then decrements till it gets a valid font

I think this is intended to allow the largest
chance of getting a loaded font

instead if global_status->font_id has been set use that
similar to how the screen helper does

Change-Id: If97e504466265fafecbe07b7b72adb4808b67e6a
2026-03-09 11:05:32 -04:00
William Wilgus
951cbdbec6 [bugfix] FS#13812 - ZXBox always returns a leak file handles error
tapefiles return a leak handle error if it is quit before end of tape is
reached, ensure it always gets closed on exit

Change-Id: I0f6224c7164fd87c209166be9e10d62d6a644a50
2026-03-08 12:07:53 -04:00
William Wilgus
4503d63ec8 [bugfix] zxbox unsupported files crash OOB access to extension list
invalid files return -1 but thats not checked before accessing
invalid array position

Change-Id: Ic07cca250e2584e2e95fa7c41085b254f94ad591
2026-03-08 11:26:12 -04:00
Aidan MacDonald
d6d4ff7af2 make: fix '--plugins=' option not being respected in all cases
If the list of plugins given to configure did not include
a subdir-based plugin, then all subdir-based plugins would
be built (since SELECTED_PLUGINS_SUBDIRS is empty then).

To prevent this issue use an explicit value ('DEFAULT') to
signal that we want to build the standard set of plugins.

Change-Id: I42d9dc8d754ed9ac1cd4b5c62c0a106ca3dfcd91
2026-03-07 21:57:34 +00:00
William Wilgus
a5853b1173 FS#13796 - Add search to text editor plugin
Adds a case-insensitive find function to text_editor

Change-Id: I8d4bc7a65d2659d5f6aec0304e69905bf2ffe0e1
2026-03-07 12:58:04 -05:00
Aidan MacDonald
a80911a0ce plugins: clean up IRAM memory region definitions
Check for USE_IRAM to determine if IRAM should be used.
SoCs that don't define USE_IRAM no longer need to define
IRAMSIZE to 0 either.

When IRAM is not used, any symbols bound for IRAM will
be discarded instead of linking them in DRAM. In theory
these symbols shouldn't exist, since nothing should be
placed into IRAM sections to begin with for !USE_IRAM.
If an IRAM section attribute leaks into the plugin/codec
anyway, it should now cause a link time error.

Change-Id: I55c1854cfe8beb5cb09b865336906f9945084b33
2026-03-06 16:26:35 -05:00
Aidan MacDonald
c9172d4ff8 plugins: clean up target DRAM/IRAM mapping defines
Move the definition of DRAMSIZE into the SoC-specific
ifdef block below. This keeps the memory map defines
for a SoC together in one place and as a result it is
much easier to understand.

Change-Id: Ie7293616a3c572b381cfeab3531751562c19a9c4
2026-03-06 16:26:04 -05:00
Aidan MacDonald
a24142b234 firmware: cleanup duplicated DM320 LCD memory defines
Move the rather large block of code that's been copied
in three separate linker scripts into the CPU header.

Change-Id: I9f38e4901fa4ff699f00d97064a9cdaf7cfd6aab
2026-03-06 15:55:35 -05:00
Aidan MacDonald
99dd797169 firmware: cleanup PortalPlayer NOCACHE_BASE defines
Move the definition of NOCACHE_BASE to the CPU headers
instead of having them copy-and-pasted in a few places.

Change-Id: Ibbab27a5a07906d46dbd4dd9065f2238bc885d6b
2026-03-06 14:15:29 -05:00
Aidan MacDonald
7eeb4e4302 firmware: refactor CACHEALIGN_BITS/SIZE defines
Mostly motivated by PP needing CACHEALIGN_SIZE in linker
scripts, which can't include system.h, so move these to
cpu.h instead. Also gets rid of the default 32 byte line
size that was used if the target didn't define alignment
itself. RK24xx, DM320, and JZ4740 were missing this but
have been confirmed (from datasheets) to use 32-byte cache
lines.

Add checks to make sure the macros are appropriately
(un)defined based on the HAVE_CPU_CACHE_ALIGN define,
and make sure their values are consistent when they
are defined.

Disable HAVE_CPU_CACHE_ALIGN for hosted targets since it
arguably doesn't matter if there's a cache, if we aren't
responsible for cache maintenance.

A few files in rbcodec use CACHEALIGN_SIZE, but these
can be converted to MEM_ALIGN_SIZE, which is identical
to CACHEALIGN_SIZE if the latter is defined. On other
targets, it aligns to at least sizeof(intptr_t).

Change-Id: If8cf8f6ec327dc3732f4cd5022a858546b9e63d6
2026-03-06 14:49:00 +00:00
Aidan MacDonald
e61bf40542 make: define PLUGIN when preprocessing plugin linker scripts
This matches the behavior of codecs, which define CODEC,
and is needed to get an accurate definition of USE_IRAM
out of config.h.

Change-Id: I84855ba88d01495bb63c609b3e4d67922b908440
2026-03-06 14:49:00 +00:00
Aidan MacDonald
676d3b6432 plugins: always include cpu.h in linker script
Change-Id: I5a5dad0c6094735fa3af676667232571bf0efdf3
2026-03-05 21:13:50 +00:00
Aidan MacDonald
5a236963e4 misc: get rid of unused LOADADDRESS define in makefiles
Change-Id: I990aaca9b0b8230efba09c87ace2430fbfa29b74
2026-03-05 20:11:07 +00:00
Aidan MacDonald
cf1e3fd5a3 misc: remove leftover pnx0101 support code
Remove now-unused stuff related to the PNX0101 processor,
which was missed during the removal of the IFP-7xx port.

Change-Id: I5ff248b3e83cb67a357743130c3e51ed84a720e5
2026-03-05 15:41:06 +00:00
Aidan MacDonald
58ffe7bc34 plugins: remove default value of DRAMORIG
Change-Id: Ia5efdbef207890682bfd8aa8cacce32d7e79c2b2
2026-03-05 10:31:35 -05:00
Solomon Peachy
ba69fb9bbf doom: Rework audio init to properly respect pcm_sink capabilities
Try to use 11KHz if possible, if that's not an option, fall
back to 44KHz which is always available.  Simulators always use
44KHz.

Change-Id: I7547e7c1bddf7ce4634f7fd7bc64d4a5c9b62c29
2026-03-05 07:51:27 -05:00
mojyack
f81126bcf0 plugins: test_sampr: remove hw_freq_sampr usage
Change-Id: Iaf9f7f495364fd87db8e25f4ce147540b370f82b
2026-03-05 07:43:25 -05:00
William Wilgus
086c29267c [bugfix, AS] zxbox keyboard input overflows text variable
int zx_kbd_input(char* text/*, int buflen*/)
is supplied with a single char by all callers
thats fine till we get to here in the decode routine
while (*utf8)

since it just reads till it hits a 0 its probably fine
but Address Sanitizer caught it

make c a char array of 8 bytes to ensure a NULL

Change-Id: Iad3284df34cb7451422fc96ae0bb8e159ee440b0
2026-03-05 01:14:17 -05:00
mojyack
38d978a512 plugins: sdl: remove hw_freq_sampr usage
Change-Id: I78311f63f04a68b968a584dd485e795813876fc3
2026-03-03 20:00:46 -05:00
Solomon Peachy
ea570c5728 pcm: Make more of the low-level PCM API private
* pcm_play_data
 * pcm_play_stop
 * pcm_play_stop_int
 * pcm_is_playing
 * pcm_set_frequency
 * pcm_get_frequency
 * pcm_apply_settings

Now, the only user of these functions are the mixer and recording layers
that provide a higher-level API to plugins and the main [playback]
application.

Outside of the PCM core, pcm_apply_settings() was only used immediately
following a call to mixer_set_frequency(), so the latter function
now always calls the former.

Change-Id: I61c3144dc156b9de9b7963160b525c6d10c6ad4b
2026-03-03 13:09:21 -05:00
Solomon Peachy
be1e074800 doom: minor code cleanup (replace magic constant with an existing define)
Change-Id: I39dd9accb0bb116c0c23035b75b7be141a236c01
2026-03-03 12:42:09 -05:00
Aidan MacDonald
9d6dfe2245 Fix yellow in 017dd72ff3
Change-Id: Ib228acef524b0527b9bc0de3cf2104efda350e73
2026-02-22 15:15:10 +00:00
Solomon Peachy
017dd72ff3 plugins: Convert all plugins to using mixer API for playback
pcm_play_data -> mixer_channel_play_data
pcm_set_frequeny -> mixer_set_frequency
pcm_play_stop -> audio_stop at startup / mixer_channel_stop at shutdown
pcm_is_playing -> mixer_channel_status

All of these have been removed from the plugin API.  Updated API docs to
clarify role of audio_stop() vs mixer_channel_stop()

Todo:  get rid of pcm_play_[un]lock().

Change-Id: I8800c131b51f064ee923a4c6e42aa405d33851fc
2026-02-22 08:15:14 -05:00
Christian Soffke
ac3999d5ab plugins: stopwatch: fix missing or wrong SBS title
Change-Id: Iecdb7a3a142ee3754f25d374e71dae62dc4d5a17
2026-02-21 12:34:41 -05:00
Christian Soffke
a70436fe8e plugins: lrcplayer: fix non-UI font info vp w/ SBS enabled
With the statusbar enabled, the UI viewport's
font may be different from the UI font, which
breaks stringsize calculations in LRC Player
that are currently all based on the UI font.

Change-Id: Ib53de62134b250fa50353074959843278f38478f
2026-02-21 14:34:45 +01:00
Aidan MacDonald
59cc0282ec plugins: remove never-released beatbox plugin
It was added back in 2007 (commit 8b6d28790e) apparently
in a half-baked state, and has never been enabled since.

Change-Id: I728b5730fe05262bae292cd7fcdcfe4b53c4b315
2026-02-19 19:27:17 -05:00
Lourenço Soares
0b3a5ab1e6 plugin lrcplayer: Added manual scrolling feature
lrcplayer currently automatically scrolls the lyrics for you, as it assumes that there is sync information in the lyrics. In the case where there aren't (like for ID3V2 USLT tags), the plugin will automatically assume timestamps and will scroll automatically.
This commit adds an option in the Display Menu to allow automatic scrolling to be disabled. When disabled, you can scroll the lyrics using the volume keys (like you would on the iPod's OS).

Change-Id: I87ef27fd2b84c97374bdfd0e47f4c00ddb4bc85e
2026-02-19 16:10:14 -05:00
Solomon Peachy
6f302083b5 cleanup: Get rid of erroneous execututable bit on various source files
Change-Id: I6382ba56dc6d99189c8647b010208c33fc2da7ca
2026-02-19 07:54:35 -05:00
Roman Artiukhin
aea9e1b63f configure: add ability to select plugins to build in --plugins flag
Use ":" as the separator. Useful for plugin development and debugging.

Example:
../tools/configure --target=hibyr1 --type=ADS --plugins="properties.c:imageviewer"

This creates a debug simulator build for Hiby R1 with the properties.c file and the imageviewer directory plugins enabled.

Change-Id: If974cfb0c54bd2c1a53ae11cc3f942c698ef2fe4
2026-02-16 13:42:58 +02:00
William Wilgus
46d644fcd7 stars.lua screen does not update int the sim
SDL needs to do lcd_update from the main thread
stars.lua uses an event that runs in a timer thread
so in the sim the screen never updates

Change-Id: I6002525363010c3133ebbfb490763f747c5d773a
2026-02-10 10:46:15 -05:00
William Wilgus
ed84047884 [Fix Red] open_plugins rb-> is required
Change-Id: I1f1a7e487d46a0427be7cebd319c65b848b4a9fb
2026-02-08 14:39:17 -05:00
William Wilgus
ef7739160b [BugFix] open_plugins allow more than one entry with a plugin / parameter
you should be able to have multiple parameters to a single plugin
you can do this from outsid the plugin, but not from within the plugin
this makes it possible to have several entries with the same
plugin and a different parameter for each entry

it now also updates the name of the entry to the name of the parameter
instead of the name of the plugin (unless user edited it)

Change-Id: Ifb52b21e3b8ed3257364635b5d92e7c21a35a199
2026-02-08 13:58:36 -05:00
Aidan MacDonald
58b186d6de Remove Creative Zen Vision and Vision:M ports
They haven't seen development activity for the better part
of two decades and apparently were never able to even boot
to Rockbox, although the Rockbox bootloader could load the
original firmware.

Change-Id: I5cfa5909c21feaf2825aa685a05e78044b893a13
2026-02-06 07:31:54 -05:00
Aidan MacDonald
a6c290e8e5 jz47xx: fix plugins/codec link address
Removing STUBOFFSET in commit 78542df466 caused DRAMSIZE
to be computed incorrectly, not taking into account the
16k offset used for 'IRAM'. As a result plugins & codecs
got shifted 16k upwards from their intended load address,
making them unable to load.

Change-Id: I6c338e04506e12fa2b8a69286a1ed785a2f8042d
2026-02-05 20:33:51 +00:00
Aidan MacDonald
92b0bf7a27 Clean up .ncdata/ncbss hackery in plugin linker script
The mess here can be reduced by paying careful attention to
how the linker allocates LMAs/VMAs within MEMORY regions.

Changing the way .ncdata and .ncbss are defined so that they
reserve the LMA/VMA ranges they use in PLUGIN_RAM removes the
need to explicitly set the VMAs of other sections, cutting
down on the number of ifdefs needed and making the script a
bit simpler.

Change-Id: I316fc6e8dedd621537261d52c1ec7c20ec09438a
2026-02-05 09:38:51 -05:00