Commit graph

39566 commits

Author SHA1 Message Date
Mauricio Garrido
94d422f1c4 3ds: small fix.
Rename missing ctru variable to 3ds and remove 3ds specific headers from
common ones.

Change-Id: Ib99cf2d31671dec0f6ca1de68ca2e33693991dc3
2026-09-02 05:41:40 -04:00
Aidan MacDonald
387b36fab7 erosqnative: document the sample depth choice for es9018k2m
The reason 16/24-bit on the DAC does not work is that this
configures the I2S frame length, and the X1000's AIC uses
a hardcoded 64-bit frame length regardless of the bit depth
selected at the AIC input side. The AIC will pad the lower
bits of the 32-bit output sample with zeros.

Change-Id: I48c9893ca358248a63f24e3f75149da988943953
2026-09-01 15:15:17 -04:00
Marc Andersen
a3e93c496e lua: only define strerror/strcoll on native targets
apps/plugins/lua/rockaux.c defines strerror() and strcoll() so the Lua
plugin has something to link against on native targets, which have no
libc providing them. Hosted targets do have a libc, and defining them
there is at best redundant.

On the Windows simulator it is worse than redundant. Both come from
mingw's libmsvcrt.a, and because that is a static archive the linker
pulls in an archive member for an unrelated symbol, then finds a second
definition of these two, so lua.rock fails to link:

  libmsvcrt.a(...): multiple definition of `strcoll';
  rockaux.o:rockaux.c:244: first defined here
  libmsvcrt.a(...): multiple definition of `strerror';
  rockaux.o:rockaux.c:47: first defined here

On hosted Linux there is no diagnostic, because glibc supplies these
from a shared library where a local definition simply wins. That means
the plugin has been quietly shadowing glibc's strerror() with a stub
that always returned NULL, which is presumably not intended either.

Guard both with CONFIG_PLATFORM & PLATFORM_NATIVE, matching the guard
used a few lines above for errno. Hosted targets now get the real
implementations from their own libc.

This also silences a "redeclared without dllimport attribute" warning
that GCC 16 emits for the same clash.

Verified by building xduoox3 as a Windows simulator, xduoox3 as a Linux
simulator, and sansaclip as a native ARM target: all three link cleanly
with no multiple-definition errors.

Provenance, per the AI disclosure requirement in docs/CONTRIBUTING: this
change was drafted with Claude Code (Anthropic Claude Opus 5) at my
direction. Patch set 2 adopts Aidan MacDonald's review suggestion to key
the guard off PLATFORM_NATIVE rather than _WIN32.

Change-Id: I8ffb6fd792147c9067afa708003b1285fb9d07a4
2026-09-01 15:14:02 -04:00
Michael McAllister
f349e85154 ingenic: move the drivers the X1000 shares with other SoCs
Pure file move, in preparation for a second Ingenic SoC.

  dma, gpio, i2c, installer, kernel, nand and the SPL NAND backend
  move from target/mips/ingenic_x1000/ to target/mips/ingenic/

Drivers that cannot move as whole files, because part of each is
genuinely X1000-specific, are left alone for now: msc, uart, sfc, the
debug menu and the OST helpers in system-x1000.c.

Verified as a no-op: built at target 246 --type=b before and after from
the same source path, bootloader.bin is byte-identical, and every moved
file's object has the same instruction stream under its new name.
Builds clean with no warnings for targets 246, 260 and 247, both
--type=n and --type=b.

Change-Id: I9f67c23384df49b8c4554d695b772bcd54a4e32f
Co-Authored-By: Claude Opus 5
2026-09-01 11:37:21 -04:00
Michael McAllister
9d86c9b201 sdmmc_host: reject commands the card reports as failed
sdmmc_host looks only at the transport status the controller returns,
and passes NULL for the response of every data transfer, so nothing ever
reads R1. A card does not signal a rejected command by failing the
transfer: it answers normally and simply does not commit the data. A
write refused for a write-protect violation, an address error or an
internal ECC failure is therefore reported to the filesystem as a
success.

Add sdmmc_host_submit_cmd_r1(), which fails a command whose response
carries any bit in SD_R1_CARD_ERROR, and use it for SET_BLOCKLEN and the
read or write itself. Those responses were already being received and
discarded, so this costs no extra bus traffic.

The R1 of the transfer command is returned before the data moves, so it
cannot report a failure which happened during the transfer. Whatever
ends the transfer has to be checked too: CMD12 where it terminates a
multiblock transfer, and CMD13 (SEND_STATUS) where CMD23 was used and
there is no closing command. Without the CMD13 an error is reported only
on the next transfer, against the wrong sector.

A CMD12-terminated read which ends on the last block of the card will
have tried to read past the end, and the SD spec (4.3.3, "Block Read")
requires the resulting OUT_OF_RANGE to be ignored. It is masked out for
exactly that case.

Only valid for R1 and R1b. A controller cannot apply the check itself
because it is told the response length rather than its format, and R3,
R6 and R7 are also 48-bit responses carrying unrelated bits in the same
positions.

Affects any target building sdmmc_host.

Exercised on X1600 hardware over 8 GiB of sequential reads with no
errors; the error path itself was not observed to trigger. Not run on
X1000 hardware.

Change-Id: I4a80dd29385d3eb4f256bc745a84f96e7054bbf8
Co-Authored-By: Claude Opus 5
2026-09-01 10:59:29 -04:00
Mauricio Garrido
e498c0171a 3ds: Port refactor.
This commit does the following changes to the 3ds port:

- Rename the target from ctru to 3ds.
- Rename all files and functions with the ctru naming convention to 3ds.
- Created a new file and folder structure that will better integrate future console ports that share the same codebase.
- Fixed a buffer overflow bug in pcm code.

Change-Id: I17c6f86df64eb99dd2b653485d70832ff46b2ba8
2026-09-01 08:39:07 -04:00
Solomon Peachy
8e965d9159 FS#13994 - Updated Dutch Translation (Marc Aarts)
Change-Id: I3e6f3062ae9e5ddc63b65e2a23ad984f13b0ba72
2026-09-01 07:39:10 -04:00
Solomon Peachy
3e996ec73e FS#13993 - rbutl push decompression onto a separate thread (Alessio Lenzi)
During Rockbox installation or update, the progress window currently
becomes unresponsive to screen-reader navigation while archive
inspection, free-space calculation and extraction are in progress. A
blind user cannot reliably move through or read the status messages and
therefore cannot determine what the utility is doing, how far the
installation has progressed, or whether an error has occurred.

The cause is that these operations are performed synchronously in the
GUI thread after a package has been downloaded. Although the
installation itself continues, the user interface cannot process
keyboard input and accessibility events reliably until the operation
finishes.

The attached patch moves the package installation work to a low-priority
QThread. Downloading remains asynchronous as before, while progress and
log signals from archive extraction are delivered back to the GUI thread
through Qt connections. This keeps the progress window fully navigable
with a screen reader throughout the installation.

Change-Id: I9a36a736e5b4bf98de8c3a71151679a4c1333dc7
2026-09-01 07:36:48 -04:00
Solomon Peachy
3664373ce7 FS#13992 - Updated Vietnamese Translation (Chu Khánh Hạnh)
Change-Id: Ic0567f972cebbe152ba9b9badf6d60c17b0e6ddc
2026-08-31 22:40:30 -04:00
Solomon Peachy
420537c864 manual: correct Ipod/Itunes -> iPod/iTunes
Change-Id: I54b323085140f0e4abddab7a522e34e897d9edf4
2026-08-30 21:17:29 -04:00
Sebastian Leonhardt
95e9d227aa manual: fix typos and whitespace; bump copyright to 2026
Change-Id: I453f94d1b9995deb1e8275a878bf81a22960c08e
2026-08-30 20:54:35 -04:00
Vencislav Atanasov
9cef2a3aef 3DS: implement touchscreen_enable_device to gate touch input (Olivier Senn)
Change-Id: I2f9d2505b727a6a68e8dba9199ea4053aa902b64
2026-08-30 09:04:55 -04:00
Vencislav Atanasov
4d3c7aed03 3DS: implement clean power-off via exit(0) (Olivier Senn)
Replace the dead infinite loop in power_off() with sim_do_exit()
which properly shuts down kernel, timer, mcuhwc, and cfgu services
before calling exit(0). Remove the stale sys_poweroff() declaration
in system-ctru.h; the generic implementation in powermgmt.c handles
SYS_POWEROFF broadcasting.

Change-Id: I247c4de482c66c3a060d0b88b7e2239ecec189c5
2026-08-30 09:04:55 -04:00
Vencislav Atanasov
ce47229857 3DS: auto-create application data directories on boot (Olivier Senn)
Restore paths_init() to create /3ds/.rockbox and the config
directory tree at startup, so Rockbox works without manual SD
card setup.

Edited by Vencislav Atanasov: Use the ROCKBOX_DIR macro instead of hardcoding the paths.

Change-Id: I33ab8e588cdca58285d50e9e5698a8071b381cf4
2026-08-30 09:04:55 -04:00
Aidan MacDonald
99c18f336c sdmmc_host: add quirk for card timeout on single block access
Some 512G Samsung cards (and possibly other cards) seem to
have problems with repeated single block read commands and
sometimes just time out without ever sending the data. The
card response is received OK and reports no errors but no
data is received.

The problem also occurs if a multiple block read is used to
transfer a single block but doesn't seem to occur when more
than one block is transferred.

Less commonly, timeouts can occur on write commands but it
is not clear if that happens only after a timed out read.
Adding a delay of a few tens of milliseconds before each
read/write single block command appears to prevent this.

Change-Id: I5a02b71f59cc02832acaf30e5f900a3ee8804e76
2026-08-29 19:48:22 +01:00
Aidan MacDonald
a95f9debb2 sdmmc_host: move init cleanup into sdmmc_host_device_init()
Change-Id: If2fa58602b1c3a9aea4a56c65eb8e1ee37520a2d
2026-08-29 19:48:22 +01:00
Aidan MacDonald
f40cae6cdc x1000: rewrite SD driver using sdmmc_host
Remove all SD protocol handling and all target specific code
like GPIO/interrupt handling and clock parent setup. This can
now be handled from sdmmc_host_target_init() for each target.

Now only the clock frequency is managed by the MSC driver.
To make this code easier to factor out later, it's confined
to helper functions that do not access the driver state.

One small change is that MSCxDIV output is now clamped to a
minimum of 50MHz to avoid unnecessary frequency changes. The
MSC_CLKRT divider can still divide 50MHz down to 400 KHz so
there is no downside to this.

Auto-CMD12 is now unused. Using it would make error handling
more difficult for sdmmc_host since the controller does not
expose response data for the auto-CMD12.

Explicit CMD12 was not handled correctly in the old version
of the driver because the busy signal was ignored for R1b
responses if there was no associated data transfer. This is
now fixed by waiting for the PRG_DONE interrupt instead of
END_CMD_RES for non-data transfer R1b type commands.

Since existing X1000 targets are all very similar they use
a shared implementation in sdmmc-x1000-common.c for clock
setup and card detection. New targets can either use this
or create a separate file if they are different enough to
warrant one.

Change-Id: I35396637325d7c06a10151bb6aee64cabdc7b682
2026-08-29 14:48:12 -04:00
Christian Soffke
28e5a125ab configure: macos: fix checkwps error messages
Change-Id: Ic42c20bf011861413245b671a79de6df1b6f43fb
2026-08-28 16:51:55 -04:00
Christian Soffke
70fd3e1f1e ipodcolor: Fall back to UDMA 1
The ipod4g target has already had UDMA 2 disabled
(see commits 7d78503 and d118f47) due to reported
instabilities. The iPod color, using stock hardware,
appears to be affected too.

Change-Id: I9aea2efce3026938f719da4e5372b233ff6234cf
2026-08-28 16:51:30 -04:00
Christian Soffke
8536d981a8 checkwps: print file name extension instead of "WPS"
Change-Id: I5b0a90993dcda293400ac0d805451a5f18bca322
2026-08-28 13:42:38 +02:00
Vencislav Atanasov
0e2a3cc0c6 3DS: enable software tone controls via DSP (Olivier Senn)
Route bass and treble adjustments through Rockbox's DSP pipeline
using biquad filters, making the Bass/Treble sliders in Sound
Settings functional rather than no-ops.

💘 Generated with Crush

Assisted-by: Crush:deepseek-v4-pro
Change-Id: I5d168aaa233fe450defaea03d6657732abd2ec47
2026-08-26 02:22:30 +03:00
Vencislav Atanasov
2be2aeb2a2 3DS: add circle pad support for scrolling and navigation (Olivier Senn)
Map the circle pad to directional buttons, giving an alternative
input method to the D-pad. Uses a deadzone of 64 to prevent
unintended movement from minor stick drift.

💘 Generated with Crush

Assisted-by: Crush:deepseek-v4-pro

Edited by Vencislav Atanasov: Fixed KEY_SELECT handling.

Change-Id: I34bf7127688423fca209e199d9535e032ad8b753
2026-08-26 02:22:29 +03:00
Aidan MacDonald
a8f8aa40b9 lastfm_scrobbler: fetch rbversion from plugin API
This prevents needlessly rebuilding the plugin whenever
RBVERSION changes. (This was introduced by the removal
of CVS $Revision$ tags.)

Change-Id: Ic981c86319edb9c7eb7f0c1de71d4fbaba8989ac
2026-08-25 13:17:08 -04:00
Solomon Peachy
fd2b070bb1 FS#13984 - Rockbox Utility: Add SAPI5 voice volume control (Alessio Lenzi)
Rockbox Utility currently exposes SAPI5 voice speed but not the SAPI
voice volume. The encoder volume setting is applied after synthesis, so
it cannot prevent clipping or distortion already present in the
generated wave file.

This patch adds a Volume control to the SAPI5 TTS configuration. The
value is passed to the standard SpVoice.Volume property before
synthesis.

Change-Id: Ifa43e55f716f98150e94c86e5e6a6c8bce0ca852
2026-08-25 11:11:42 -04:00
Solomon Peachy
3f1ec2385f FS#13988 - Hungarian translation update (Gyúróczki Norbert)
Change-Id: Ic9f376f01b03d2564dbcb348a29e23569a2ebdd3
2026-08-25 10:11:41 -04:00
Michael McAllister
ec59f570dd keyboard: point-mode virtual keyboard for touchscreens
On large touchscreens the software keyboard can now run in "point mode". Keys are laid out finger-sized and tapped directly instead of being navigated with a cursor. Targets opt in with HAVE_KBD_POINT_MODE.

Key size is derived from LCD_DPI so a key is about 5mm across whatever the panel density, falling back to a fixed size where DPI is unknown.

A phone-style default layout in the UI font, across three flip pages of eight lines. Page two is page one shifted (i.e caps). Page three completes Latin-1 and adds additional accented letters common to the other European locales.

Space is drawn as an icon, since the UI font has no glyph for it.

Change-Id: Ibe2e305b3c22b1f9152358cf3864b9445b67b463
Co-Author: Claude Opus 4.8
2026-08-25 09:56:46 -04:00
Michael Giacomelli
5d016a2c04 Fix building Warble when configured as the iPod Video
Change-Id: If229f29d31a0a0d012d5ba210c16d1f1ea74a217
2026-08-25 08:01:09 -04:00
Michael Giacomelli
7fef95dc08 warble: fix build on targets with HAVE_RECORDING
Change-Id: Ic04392da41177f51dd5f392b288e078a76298839
2026-08-25 08:01:09 -04:00
Solomon Peachy
c04c2c3e0b FS13892: Voice feedback in Cuesheet browser
Voices the index, performer, and title of each cuesheet entry.  Uses
talkclips if any are available.

Change-Id: If54931cb5bbeb698f23146479192c1d6fe387657
2026-08-25 07:54:03 -04:00
Solomon Peachy
aeaee5da45 voice.pl: Extract PERFORMER and TITLE from cuesheets
Change-Id: Ib83b0c7bc74777ce6d78a6c9507c3d0732552334
2026-08-25 07:54:03 -04:00
Aidan MacDonald
69a36026f8 sdmmc_poll: add edge triggered polling support
Change-Id: I958a09efc055d474da5e03a06d80719dbb2f5b14
2026-08-25 07:51:14 -04:00
Aidan MacDonald
5e71adddf9 sdmmc_host: add generic SDMMC polling helper
Pull this out of the echoplayer target so it can be reused
easily by other targets.

Change-Id: If14e23a90c133d8435f7944d7b1607630baaf3bb
2026-08-25 07:51:14 -04:00
Aidan MacDonald
94a0fe608a sdmmc_host: trigger LED on disk activity
Change-Id: Ic7c43de01f381b7d87ed6b234fa63d5276ae31a5
2026-08-25 07:51:14 -04:00
Aidan MacDonald
cdad8cde64 sdmmc_host: add support for SET_BLOCK_COUNT (CMD23)
According to commit 7327d9fb6c ("Implement set block count
(CMD23) for x1000 target") some cards may experience data
corruption with certain controllers when CMD12 is used to
terminate multiblock writes. Using set block count (CMD23)
is reported to fix this issue.

Following the approach in that patch, use the SCR register
to probe support for CMD23, but disable use at runtime if
CMD23 generates an illegal command error.

Change-Id: I3ee1e48939b79b848fbda12c6737f2f974f47fa0
2026-08-25 07:49:05 -04:00
Aidan MacDonald
bafcb38ec9 sdmmc_host: read card SCR register to fill cardinfo struct
Change-Id: I2ef8f823d93001f15ea4e794a50f7fc115a55ce6
2026-08-25 07:49:05 -04:00
Aidan MacDonald
afe5e7191d sdmmc_host: add helper for allocating disk cache buffer
Change-Id: I918a34a92e2e0f53c19ba44fb2b42396719b92e1
2026-08-25 07:49:05 -04:00
Aidan MacDonald
1f1db58d44 sdmmc: add optional SCR register to tCardInfo struct
The SCR register is needed for detecting if the card
supports certain commands like SET_BLOCK_COUNT.

Change-Id: I48cbf8fff497b71fb831ba546a462b27bb30851f
2026-08-25 07:49:05 -04:00
Christian Soffke
789d796120 quickscreen: make %QT hide built-in UI
When an SBS uses the new %QT tag (added in 96f42a5)
to retrieve the name of the top Quickscreen setting
(thus likely wants to draw its own QS UI), we disable
the built-in interface until a new SBS file is applied.

Fixes lag encountered in Themify 2 due to invisible
built-in Quickscreen UI that kept being re-drawn.

Change-Id: Id4f295f959c2d16d1650f6fc066c3ceca6685405
2026-08-22 20:23:07 +02:00
Christian Soffke
50b13493d2 skin_engine: make skin file type available to parser
Keep track of the type of skin file being parsed,
in case a tag needs this info.

E.g. %Lt should be ignored in any skin other than
SBS files.

Change-Id: Ib7e52c3e6810196cb566adb65619a1b847cf20ef
2026-08-22 19:52:43 +02:00
Christian Soffke
9cd4352256 quickscreen: fix missing redraw for QS_VOL action
If volume was set as one of the Quickscreen items,
the value wasn't updated when pressing ACTION_QS_VOLUP
or -DOWN.

Change-Id: Ie6531535745592d7b53006560f1db8c5b7dbfb97
2026-08-22 13:30:54 -04:00
Christian Soffke
30a5f1d858 quickscreen: redraw only the relevant viewports
For each setting adjustment, the whole QS was
redrawn, including icons that never change at
all. Only redraw the viewports that contain a
setting that has been adjusted.

Change-Id: I74188fbf382a92c6e8bf517d9518c3a96bdd21ef
2026-08-22 13:14:29 -04:00
Christian Soffke
3d44fe94f3 skin_display: simplify skin_wait_for_action
Reduces GNU Complexity score from 6 to 2.

Slightly adjusts behavior:

1) With TIMEOUT_NOBLOCK and peak meters enabled,
   skin_wait_for_action always returned BUTTON_NONE,
   and did nothing else. Presumably unintentional.

   WPS was not affected, since it always uses HZ/5 for the
   timeout. The FM screen uses TIMEOUT_NOBLOCK only when
   fms_do_button_loop is called with update_screen == true.

   skin_wait_for_action now returns the result of get_action
   in any given scenario.

2) fixes incorrect next_refresh calculation when peak_meters
   are enabled on multiple screens

3) button loop now refreshes peak meters when
   current_tick >= next_refresh, instead of when
   current_tick > next_refresh

Change-Id: Iaca37dbdde6057f593659b2feb97b61ac4cc4b02
2026-08-22 15:35:10 +02:00
Aidan MacDonald
9039355bf8 timeout: include <stdint.h> for intptr_t
Change-Id: I5c5bd4e68d970f344b99e318f7818e4773bdda40
2026-08-22 06:42:02 -04:00
Aidan MacDonald
11817f99f8 stm32h7: sdmmc: handle CMD12 before second cache discard
Because DMA is still running until CMD12 is issued the second
cache discard must occur after CMD12, otherwise the cache may
contain a stale copy of data. While the buffer is garbage at
this point it's probably not a good idea to leave the buffer
in a weird state where the cache doesn't match what's in RAM.

Change-Id: I7caf91d17631c92686ef0ad6f148e6c1d1bcbfa0
2026-08-20 19:22:43 +01:00
Aidan MacDonald
f69ee23fa1 stm32h7: sdmmc: use sdmmc_host bus frequency helper
Change-Id: I6d58a95b08b8edb8a32088b3903403d84537ac12
2026-08-20 19:22:43 +01:00
Aidan MacDonald
b621a519e2 sdmmc_host: add helper to get bus frequency from enum
Change-Id: I5796d19a4c28986bbb3674a39cc93f3fa473ae3c
2026-08-20 19:22:43 +01:00
Aidan MacDonald
e3f622a851 Fix red in 2c5482cab9
The error is caused by grayscale >1bpp targets which do not
define LCD_RGBPACK().

Change-Id: Ifc995d720f11fe3df8ac534bd0777e162541dc54
2026-08-20 14:34:59 +01:00
neofright
2c5482cab9 splash: make iPod reFresh colour workaround pixel-format independent
The splash contrast workaround for the iPod reFresh themes compares
foreground and background colours against hard-coded RGB565 values.

This prevents the workaround from being applied on targets using other
pixel formats, such as XRGB8888 hosted targets.

Use LCD_RGBPACK() and SCREEN_COLOR_TO_NATIVE() to obtain the equivalent
colours for the active screen instead.

Code change and commit message generated by GPT-5.6 Sol. Compiled on
my hosted Eros Q build and confirmed working correctly.

Change-Id: Id15669bc7b8cec11bd4ee645c0b671db4499d2cd
2026-08-19 18:30:48 +01:00
Aidan MacDonald
0b52c28933 dircache: use alloca to avoid VLA in struct extension
Clang does not support VLA-in-struct so use alloca to
do the same thing by hand.

Change-Id: Ib135d1a90b00aac3098e4c64f9f5f5e397fe771c
2026-08-18 16:55:09 +01:00
Christian Soffke
8cfa4bfd8c quickscreen: update SBS after each button press
Quickscreen will ignore update_delay so that the SBS
is updated after each button press, without any lag.

The SBS may display settings that are adjusted by the
Quickscreen (e.g. cabbiev2's Shuffle and Repeat icons,
or the brightness slider included in themes like
Adwaitapod and Themify).

Change-Id: I28716e81cb77e235eb009bff91c96f510365f435
2026-08-16 16:33:38 +02:00