Commit graph

38427 commits

Author SHA1 Message Date
Solomon Peachy
b21c477819 plugins: plugin_bss_start[] and plugin_end_addr[] are only for NATIVE builds
Change-Id: I5a856cd89126c3aa8f718536a8ddadfae80bb15a
2025-08-27 13:58:44 -04:00
Hairo R. Carela
a7a21bd311 rgnano: Some extra button mappings
We have a lot of buttons might as well use them.

Change-Id: Ic5ef6a38b2bdf2e1625886905fefb5343af3d6fb
2025-08-26 19:14:58 -04:00
Solomon Peachy
088806550b textviewer: Workaround for musl libc
musl doesn't unload shared objects when we dlclose() the handle.  This means
it also never re-initializes them if we try to re-launch.

This means that global state is persisted across invocations instead of
being wiped.  Until we come up with a proper workaround we can apply
globally, have the textviewer clean up the important global state when
it exits.

Change-Id: I43bf38e6e9f0e7d824931740daff6c060537235a
2025-08-26 17:20:43 -04:00
Solomon Peachy
9e3bb65228 database: Validate paths against MAX_PATH as well as TAX_MAXLEN
TAG_MAXLEN is 2* MAX_PATH, so this means we don't reject paths
that we could never actually open on the device.

Change-Id: I64363758163c0a6a5f54ebb1c9b455f3cb5b6e56
2025-08-25 10:46:16 -04:00
Solomon Peachy
31939086af database: Add much more verbose logging into database.log
Also turns database.log on for dbtool builds

Change-Id: I2d3fcfdd14cc7c354c84e37663b72920da564b84
2025-08-25 10:46:10 -04:00
Solomon Peachy
1690b393ad iriver: rename SECTOR_SIZE to FLASH_SECTOR_SIZE
Prevents collisions from the storage SECTOR_SIZE definition

Change-Id: I3f8fa56deaccb31c927a1eba677513f2ba8c24f2
2025-08-25 10:34:02 -04:00
Solomon Peachy
7de9d8dae5 limits: define PATH_MAX in only one place.
(This is the first step towards making it larger)

Change-Id: I4cea522074c455e04c8d228cf6463fb6500c41a0
2025-08-25 10:10:38 -04:00
Hairo R. Carela
6f107430f4 rgnano: Voltage and current measure support
Battery time estimation works now.

This commit also changes the mksquashfs path to FUNKEY_SDK_PATH.

Change-Id: Ic0aa4c40011b0716f1c36c014377eaccb486e841
2025-08-23 13:44:25 -04:00
Solomon Peachy
97ebba1fbd SD: Move sd_parse_csd() into common sdmmc code
This leaves firmware/driver/sd.c only containing storage API wrappers

Change-Id: I94f3f38c180f3802f479cdc54723fcd1b7782421
2025-08-22 14:48:28 -04:00
Christian Soffke
e10e3b2345 manual: backdrops: remove outdated info
Backdrops persist regardless of their location
in the file system since commit d09f978 (FS#12041):

"allows loading of backdrops from anywhere, and
keeps those backdrops after reboot."

Change-Id: I7b8cd2cdbca15b6d9ee7baae20a5d074c9765257
2025-08-21 17:05:09 -04:00
Solomon Peachy
1cd175a9fe build: Fix build on on 320x240 devices
(Regression introduced in 2aed517a07 )

Change-Id: If4b309a78f21b2730df2c63f5fac956901ff62bd
2025-08-21 15:28:54 -04:00
Hairo R. Carela
2aed517a07 Add 240x240 support to various plugins and rgnano manual updates
This should be all of the "standard" plugins (except sdl ones).

Change-Id: Iacae3edcc69a136a9dd887f31ad6ca51a9b5aea4
2025-08-20 20:50:42 -04:00
Solomon Peachy
a60c09c24c Revert "Toolchains: Update to GCC 10.5.0"
This reverts commit 94712b34d4.
2025-08-20 16:09:54 -04:00
Solomon Peachy
84504c7471 Revert "internals: Support characters beyond the first unicode plane (WIP)"
This reverts commit d05c59f35b.
2025-08-20 16:09:49 -04:00
Solomon Peachy
d05c59f35b internals: Support characters beyond the first unicode plane (WIP)
We used 16-bit variables to store the 'character code' everywhere but
this won't let us represent anything beyond U+FFFF.

This patch changes those variables to a custom type that can be 32 or 16
bits depending on the build, and adjusts numerous internal APIs and
datastructures to match.  This includes:

 * utf8decode() and friends
 * on-screen keyboard
 * font manipulation, caching, rendering, and generation
 * VFAT code parses and generates utf16 dirents
 * WIN32 simulator reads and writes utf16 filenames

Note that this patch doesn't _enable_ >16bit unicode support; a followup
patch will turn that on for appropriate targets.

Known bugs:

  * Native players in 32-bit unicode mode generate mangled filename
    entries if they include UTF16 surrogate codepoints.  Root cause
    is unclear, and may reside in core dircache code.

Needs testing on:

 * windows simulator (16bit+32bit)

Change-Id: I193a00fe2a11a4181ddc82df2d71be52bf00b6e6
2025-08-20 16:08:43 -04:00
Solomon Peachy
94712b34d4 Toolchains: Update to GCC 10.5.0
All toolchain dependencies are circa the GCC 10.5.0 release:

  GCC 10.5.0, binutils 2.40, gmp 6.2.1, mpfr 4.1.1, mpc 1.3.1, isl 0.24

Native:

 * arm - mini2g, nano2g works
       - ipod6g hangs at logo display
 * mips - xduoox3 works
 * m68k - binaries untested

Hosted:

 * arm - samsungypr0 works
 * mips - xduoox3ii works
 * Android NDK - unchanged at GCC 4.9.4

Change-Id: Ic9c4ad487927d2ad4247c140f1a7db2740e5f316
2025-08-20 09:16:57 -04:00
Solomon Peachy
0456ec5630 IAP: First steps towards true multiport state
iap_reset_state() and iap_getc() are now passed the logical IAP port
(0 is dock/only connector, 1 is headphone connector)

Change-Id: I97421146a8cab032b90c9b4eb55b50aa00d73312
2025-08-20 07:56:43 -04:00
Hairo R. Carela
e2f2ee88c8 bubbles: Fix various text positioning and line spacing issues
Affected a bunch of resolutions, tested with every resolution that had the game and ui simulator support.

Change-Id: I6abe9626f323d1f87f94589299ea6c847682e88b
2025-08-19 22:48:27 -04:00
Solomon Peachy
b0a4aae76e tools: Delete the unused 'buildtheme.pl' script
It was forked off of wpsbuild.pl but never utilized, and wpsbuild
continued to receive improvements

Change-Id: I38de687e45560398f438830ba920bacceff5cc24
2025-08-19 21:39:06 -04:00
Christian Soffke
963a66f670 tagcache: fix building with LOGF_ENABLE when LOGF_CLAUSES not defined
Change-Id: I1cfcd45069b54115cf368f52c74826d3b3eacd6e
2025-08-19 07:40:16 -04:00
Hairo R. Carela
69f27d4c66 rgnano: Use proper lcd depth and pixelformat
According to screen driver this device screen is actually 16 bit RGB565 (https://github.com/DrUm78/linux/blob/FunKey_S/drivers/staging/fbtft/fb_st7789v.c#L137).

This also fixes the color banding issues we had before and boomshine doesn't segfault anymore. Also building rockpaint now that's possible.

Change-Id: Icee49c347fbfabc79e0040314ec148cb77ca6325
2025-08-18 21:43:13 -04:00
Hairo R. Carela
e6ddf94fbd rgnano: Add simulator button click mappings
Was missing this in the fisrt commit.

Change-Id: I685c61cc419f720ece6ca4402839af0de70f8645
2025-08-18 19:06:04 -04:00
Christian Soffke
8145e326a3 tagcache: skip search roots that don't exist, instead of aborting
https://forums.rockbox.org/index.php/topic,55459

Change-Id: I0c3fa07f9920ed4caabf3013702b10e59c0b550e
2025-08-15 20:46:37 +02:00
Hairo R. Carela
c9e16e4888 rgnano: Sleep timer and idle poweroff support
Actually power off the handheld with the sleep timer and idle poweroff functions instead of closing rockbox.

This commit also moves setting system volume to max from the launch script to system-sdl.c so it works when running rockbox via instant play.

Change-Id: I174b67c6abef451faa05f4a8f52b8d9eeed98a22
2025-08-15 09:44:35 -04:00
Solomon Peachy
5ecb5832e1 as3525: Silence portability warning with GCC10+
Change-Id: I66ca05bd7b6029b7699d5534f82efe0c14da1291
2025-08-15 08:39:05 -04:00
Vencislav Atanasov
0781195c22 Add iPod Nano 2G post-mortem memory dumper by Michael Sparmann
The files are downloaded from https://www.rockbox.org/tracker/task/11701

Change-Id: Ic6415f76207868661c231cb534cb179160eb60e0
2025-08-14 20:45:19 -04:00
Solomon Peachy
bf2320d23b pdbox: Silence false warning with GCC10
Change-Id: I0d5e7d74e9aa27ca21cde739389a040a83505cf7
2025-08-14 20:43:09 -04:00
Solomon Peachy
472a6a69c6 IAP: Reset IAP state upon headphone or dock unplug
Provides a semi-automatic way of recovering from desynchronization

Change-Id: I527b0bacc22ef38c1e7213653e522ea1b0ac155d
2025-08-14 20:41:14 -04:00
Solomon Peachy
80eca90481 tagcache: Don't try to look up "deleted" filename entries
When a file is deleted from the database, the first character of that entry
is changed to \0.  However the entry's length is not updated,
because the entry is still using space in the index.

When checking for deleted files, we were only keying on "length == 0"
instead of also checking to see if the entry itself starts with \0.

Change-Id: Ic00a0b29c3857c597ee5ff6ec01a5f4fd9633447
2025-08-13 11:38:56 -04:00
Solomon Peachy
01860627bd test_codec: Fix crash due to missing strip_filesize function
Probably only affects mp3 files.

(Introduced in 38105860dc)

Change-Id: I1946e7be604784ec47ff21a47aab81e91d933a3d
2025-08-12 10:47:31 -04:00
Solomon Peachy
b40cf73d36 doom: Fix warning with RGNano Simulator
Change-Id: I311c7afb203d00a229d79ce655f41b702634a03f
2025-08-12 10:47:06 -04:00
Hairo R. Carela
707585e6c0 rgnano: Change ROCKBOX_DIR to /mnt/FunKey/.rockbox
For consistency's sake.

Change-Id: Ia2ef27dceaf143ab85adb22581c6461d50914a84
2025-08-10 14:47:17 -04:00
Christian Soffke
50f10681b3 playlist: remove support for PLAYLIST_COMMAND_CLEAR
Although this breaks compatibility with playlist control
file versions 3-5, i.e. control files generated by any RB
build between Jan 29 2023 (commit 25bd3bc) and Oct 26 2024
(commit 7592d2c), compatibility with v2 of the control file
that was in use from 2003 to 2023 is maintained.

Change-Id: I7fd3394e31131bb0563e41d921bcaf940dd999bc
2025-08-08 09:34:52 -04:00
Solomon Peachy
6265bbbd97 sdl: Explicitly disable the cursor for non-touchscreen devices
...Except for simulators, those always need the cursor

In practice this only affects the RG Nano as it is currently our
only SDL target that lacks a touchscreen.

Change-Id: I292f923848528c233da518b062d9ccd8a03515dd
2025-08-07 09:36:51 -04:00
Solomon Peachy
209f833c7a rgnano: Fix simulator build
Change-Id: I2e6dfae25a2dae18e672c5584e8bd52c7bbd279a
2025-08-06 21:25:57 -04:00
Hairo R. Carela
46d10dda33 rgnano: Instant play support and proper system brightness/volume handling
Instant play is a Funkey OS feature that allows it to relaunch at boot the last program it was running before shutting down, which means that if the handheld is powered off (holding the power button) while rockbox is running the next time it's powered on rockbox will launch at boot.

This commit also handles system brightness/volume in rockbox itself instead of the launch script, so the values are properly reset when powering off the handheld while rockbox is running.

Change-Id: Ie1adbf71069aeed5fbf6670971718a2f718716a3
2025-08-06 20:21:02 -04:00
Solomon Peachy
16a6ad032f pp502x: Restructure UART code
* Move to a structure instead of pointers to registers
 * Autobaud operates per-uart
 * When explitily setting uart speed, it applies to all uarts

This allows both UARTs to be enabled and serviced simultaneously,
allowing either accessory port to be used.  Note that the last
port to receive something is where subsequent transmits are directed,
and only one set of IAP state is maintained.

To change this, we will need to revamp IAP to support more than
one state machine, and then extend the serial API to allow for both
UARTs to be used independently.  Probably not worth the effort.

Change-Id: I0142f0906706fc0c4ee6d6d7aa6b0515e1a749dd
2025-08-06 08:27:58 -04:00
Christian Soffke
921abc7beb toolchains: mips: prevent failing build on MacOS
mips gcc will fail to build using the system's
BSD sed. Make sure the Homebrew-installed GNU sed
'sed' simlink is in the PATH. Otherwise, only 'gsed'
can be used to run GNU sed by default.

Change-Id: I0a793c692d9a6de4f326e447281892eb08e4f4cb
2025-08-05 18:37:19 -04:00
Christian Soffke
b713f1190a toolchains: fix building on MacOS with clang 17
The zlib version used by GCC 4.9.4 and binutils 2.26.1
is incompatible with clang 17 from the latest Xcode
command line tools, resulting in fdopen being defined
as NULL.

Remove the define for MacOS, as in zlib 1.31:

4bd9a71f35

Change-Id: Ic7f3108dc4fcaca4ae9a571f2bdb9039be095f36
2025-08-05 18:37:19 -04:00
Christian Soffke
2ddcc95423 tagtree: Fix FS#13651 database track titles not voiced with extensions turned off
regression introduced in commit 26c612f

Change-Id: Id2328a9f0de1fefdfddc7572524cb22a0668af96
2025-08-05 15:54:11 +02:00
Hairo R. Carela
7b0f408c71 rgnano: UI simulator support
Change-Id: Id488d16e01ef49a9d1b57641bc1c22ed2fef4931
2025-08-05 08:30:30 -04:00
Solomon Peachy
b52bf1bf65 gigabeats: Fix compilation with -fno-common
Change-Id: I02974bffd6def6bdfa6b15c593ac2eb82953ea73
2025-08-05 07:25:23 -04:00
Solomon Peachy
74508093f2 rk27xx: Fix compilation with -fno-common
Change-Id: I9fbe85fed23fe7b1b3fd88aa5e8a4a63c509fa62
2025-08-05 07:25:23 -04:00
Solomon Peachy
e4abe9177e build: Turn on -fno-common globally
Can make global variable access more efficient at the price of erroring
out if a variable is declared in more than one place.

Change-Id: I918eacf4a4c8c7827be64f7f2ee04cc6cc2009e0
2025-08-04 23:12:42 -04:00
Solomon Peachy
9f91f02159 sdl: Fix up build failures with -fno-common
Big pile of duplicate variable definitions in quake and duke3d

Change-Id: If5ef873c1dc1d7b3104536f657258e0a06574d53
2025-08-04 22:40:00 -04:00
Solomon Peachy
c33602375d pp500x: Switch to plain C sleep/wake code (instead of asm)
Supposedly this is responsible for startup crashes on ipod1g/2g.

Change-Id: I9d03ddc996f46db6fa782d1d8b1cd8baf9d23308
2025-08-04 10:02:52 -04:00
Hairo R. Carela
8e7fa2932e simulator: Fix battery level for targets with PERCENTAGE_MEASURE
Previous code returned 0 in targets using only `PERCENTAGE_MEASURE` which means the simulator closed itself (due to low battery) shortly after boot.

Change-Id: I8b66dd085e02a8e565893aad4c8b643233dd3852
2025-08-04 02:01:26 -04:00
Hairo R. Carela
20de670340 rgnano: Add manual images
Also sliding puzzle button labels.

Change-Id: Id6cf3e342da2e1b4b4ba170c003782f4e9fa4134
2025-08-03 12:39:46 -04:00
Hairo R. Carela
8dfd219598 rgnano: Fix duplicated target_id
The surfansf28 port was already using 120, my bad.

Change-Id: I40574d818e4bf5635996d6babce546172ff500ba
2025-08-02 19:06:50 -04:00
Solomon Peachy
543f2494dd builds: Indicate that the RG Nano now has a manual
Change-Id: I6acb4992ca2dd6b89d179c744148501ae54beb64
2025-08-02 13:51:15 -04:00