Commit graph

5142 commits

Author SHA1 Message Date
Marc Aarts
1183b1ab1b Rockbox for the HiBy R3 Pro II/R1
Original author Melissa Autumn (https://codeberg.org/oopsallnaps/rockbox-hibyos) with contributions from Marc Aarts.

Adaptation to Rockbox standards by Marc Aarts

Change-Id: I09e5af7ba0a75c648e4b9fd424badc2d3665c943
2025-12-27 15:44:54 -05:00
Petr Mikhalicin
eee6c31b4a plugin otp: Stop freezing display when generate OTP
Sometimes OTP code expires soon and we can't use it. So, We have to
wait for new one. And it's really anoying, when devide stucking at this
time

Change-Id: Ic5e0105b6c051ad2ec2a2421068867be2e497683
2025-12-27 12:08:16 -05:00
Petr Mikhalicin
4e13e69de3 plugin otp: Fix handling of unknown otpauth uri parameters
OTP uri parameters is key value options separated by '&'.
So, we on unknown params we have to reject also everything what was
behind '&'

Example:
otpauth://totp/kek?issuer=petya%40IPARTKN.TEST&secret=1234567890&digits=6&algorithm=SHA1&period=30

"algorithm" was unknown. So, next token after it was "SHA1&period", not "period"

Change-Id: I48eb198fd46212c6422dd8eac214adafdf3a52eb
2025-12-27 12:08:06 -05:00
Petr Mikhalicin
ca57184ff0 plugin otp: Make 'Generate Code' first option at otp plugin
Generating code is more popular action then adding accounts. So, let's
make it first

Change-Id: I15ea07ef63186611c4a87ba741c5a7b5d0d5041c
2025-12-27 12:06:57 -05:00
Christian Soffke
f7ede2b9df plugins: Disk Tidy: wait for dircache
Running Disk Tidy while the dircache is loading is a lot
slower than waiting for it to finish building first.

Typical scenarios for this would be starting Disk Tidy
immediately after booting or after unplugging from USB.

Deleting files during a dircache build also seems to easily
result in memory corruption, as evidenced by visual glitches
appearing in the theme.

Change-Id: I9250d918d916b112ffe2504a9225a0b52bcc3622
2025-12-27 16:29:16 +01:00
Christian Soffke
8e512d1f79 plugins: Disk Tidy: SBS title & minor display adjustments
- Move header that displays "Cleaning...", or
  that shows the last run's date, into SBS
  title area, if it exists.
- Left-align everything if SBS title doesn't exist
- Display "Nothing removed" instead of multiple
  zeros for items, size, dirs, and files
- Display "Today" instead of the current date
- display "2m 1s" instead of "00:02:01, and
  "<1s" instead of "00:00:00"
- "1 items" -> "1 item"

Change-Id: I40302af00d1038adca45a1c6a908af76bd9917cc
2025-12-27 16:29:16 +01:00
Christian Soffke
71f84bedd6 plugins: text viewer: use basename in title
i.e. pictureflow.cfg instead of something like
/<microSD0>/main/.rockbox/rocks/demos/pictureflow.cfg
since the last path component is usually more important
and may not be visible otherwise.

Change-Id: Icdc2d0db21d9290ce53213b0a650c83631e7c9ed
2025-12-27 16:29:16 +01:00
Christian Soffke
8c9f70de82 plugins: text viewer: use SBS title
Take advantage of skinned status bar title, instead of
displaying a custom header that reduces space for content.

A custom header will still be displayed if the SBS
doesn't come with its own title, such as on the default
theme, or if the status bar has been turned off in Text
Viewer's settings.

Change-Id: I14c8d9a61acf338d09d7f54947399e8692987a7b
2025-12-27 16:29:16 +01:00
Christian Soffke
1fd45d23a0 plugins: text viewer: use theme colors & backdrop
When Night Mode was added to Text Viewer
in ab1b67f, the regular mode was changed to
black and white instead of using theme colors.
This looks out of place in custom themes when
the statusbar is enabled, i.e. using the default
Text Viewer setting. Only switch to black and
white when statusbar is disabled, which also
disables the backdrop.

Change-Id: I3ff5e1c42de11ca58640e91bcb315ce7804fadcd
2025-12-27 10:28:00 -05:00
Christian Soffke
06af1090bb plugins: vu_meter: enable theme for submenus
Also properly handle situation where theme is already
enabled at launch.

Change-Id: Ic7b3dcf38e77f6e9d6ef4a5512f729e47880e46c
2025-12-27 15:49:05 +01:00
Christian Soffke
5aa2b339d5 plugins & debug menu: apply consistent titles
Purge "Menu" or "Rockbox" from plugin menu titles
and match application names from manual.

Exception: "Main Menu" is left unchanged as the
title for the Main Menu Configuration plugin, since
it appears in Rockbox's Settings menu and therefore
should match the name of the setting.

E.g.:

"Rockbox Goban" => "Goban"
"Image Viewer Menu" => "Image Viewer"
"Viewer Menu" => "Text Viewer"
"Menu" => "Chess Clock"
"Do What?" => "Text Editor"
"Mpegplayer Menu" => "MPEG Player"
"Multiboot Settings" => "Multiboot"
"Disktidy" => "Disk Tidy"
...

Change-Id: Ie6d3be7557f31a36309489037ad8b2b27b06706e
2025-12-23 10:25:05 -05:00
Christian Soffke
fe690dfa20 plugins: playing time: adjust error message, keep theme enabled
Replace generic error message  with voiced
info about the number of tracks skipped

Change-Id: I334fac447eeef2eb5c0d302675b98027b01b09d0
2025-12-23 10:22:14 -05:00
Christian Soffke
4e211b55f9 plugins: sort, vbrfix: add warning
Destructive operations should come with a
warning, especially if they are easy to
select by accident from the Open With... menu.
vbrfix even seems to be selected by default
for audio files (which is probably not ideal).

Change-Id: I4d2c79f2f19129d8b0257655e2d7c6093ad86eca
2025-12-23 09:58:23 -05:00
Christian Soffke
f316535684 plugins: view-text, zxbox: fix panic when called without parameter
Change-Id: Ife654e6dcb29916f661ce0c2232f4060ac02f5d2
2025-12-21 23:58:04 -05:00
Christian Soffke
4698be4a17 plugins: flipit: remove 4s delay on devices without instruction
Change-Id: Iab0e54ca20de5318bf3d74e8571d0e6e209e3430
2025-12-20 13:57:03 +01:00
Roman Artiukhin
c594b58af2 imageviewer: jpegp: Fix downscaled image rendering
Fixed rendering issue when dimension is not divisible by downscale factor

Fixes FS#13719

Change-Id: I3b4ad035d5cce57acd3dc8a8e846bb5303598c8d
2025-12-19 13:35:52 +02:00
Christian Soffke
16cf7f5d8b plugins: starfield: enable USB audio
forgot about this...

Change-Id: Ib9d1451785390f1fabcaab679271510e76f9e330
2025-12-15 07:48:45 -05:00
William Wilgus
2398616d63 Bugfix lua font_getstringsize ignoring supplied fontid
Change-Id: I62c334300f427670b237957553176302a8589fe7
2025-12-14 17:51:29 -05:00
Aidan MacDonald
a30f822500 plugins: add strstr() to plugin API
Multiple plugins carry their own strstr() implementation because
the in-core version wasn't exported to the plugin API.

Change-Id: Ib57a9b63754c89fb3447ec1d3958963d23145105
2025-12-12 13:30:54 +00:00
Roman Artiukhin
2e1af37536 plugins: imageviewer: don't downscale unscaled image if it fits on screen
Change-Id: Ifd686884d1d8fe3dca9da58ba38ee2de822b5787
2025-12-12 08:06:20 -05:00
Solomon Peachy
cbfaa49d3f xrick: Fix up -wundef warnings in miniz library
Ensure that if a posistive condition results in "#define XXX 1", ensure
we set "#define XXX 0" if that test fails.  This is necessary because
the code uses "#if XXX" isntead of "#ifdef XXX" all over the place.

Change-Id: I16157fd6ae251a70331f48a895b6c53a6648ab2b
2025-12-07 14:28:51 -05:00
Solomon Peachy
a5df7c2e02 Revert "xrick: fix sim build warning on arm with -Wundef"
This reverts commit f05be27ae6.

Reason for revert: Introduces warnings on all (x86) sim builds.  

Change-Id: I052c3569693663910a4290668b90ff444da65c75
2025-12-07 14:18:02 -05:00
Christian Soffke
f05be27ae6 xrick: fix sim build warning on arm with -Wundef
Change-Id: I11513a20e0cd0bfd6dbe0759c86e4ff893a3d537
2025-12-07 13:22:13 -05:00
William Wilgus
7a73ca2230 FixRed lua -- rb->strtol for native targets
missed this reference

Change-Id: If8d747399223e5cd33d044a274e6d1d81745ed1c
2025-12-06 21:26:27 -05:00
William Wilgus
8a773fb29f lua -- remove strtol and strtoul replace with rb->strtol and rb->strtoul
Change-Id: Ib7ba358b6488b946404c0c4cd8773e948810a7f7
2025-12-06 18:11:13 -05:00
Solomon Peachy
e94a96cdcf FS#13497: '0' is sometimes a valid track number
Most notably for CD rips that use a track number of 0 for
the leadin.

Therefore change our "invalid track number" canary to -1 instead
of 0.  Additionally don't try to parse an empty string.

In the process, get rid of redudant 'discnum = 0' as well.

NOTE: While not strictly necessary, we recommend rebuilding the
      database to ensure files without track numbers are
      updated with the new canary.

Change-Id: I543f98ca49cec7b5eeffa7c14c1eca57171f345a
2025-12-06 09:20:32 -05:00
Solomon Peachy
481cc70fe0 libc: Add an implementation of strtol/strtoul and export it via plugins
These were lifted from the lua plugin.

sdl, doom, puzzles updated to use the exported version

todo: lua, maybe?
also: convert uses of atoi [back] to strtol

Change-Id: I5a1ebbe8d8c99349e594ab9bbbce474e7645b4e9
2025-12-06 09:04:36 -05:00
William Wilgus
32edbd430d plugins - Add PLUGIN_GOTO_ROOT - lua add PLUGIN_GOTO_ROOT and PLUGIN_ERROR
Change-Id: I018f68685877700571aa7687428cfdda436a0294
2025-12-05 12:03:58 -05:00
William Wilgus
7b7d9a384a scrobbler / log viewer allow cancel button long press to exit plugin
some devices will shutdown before the button repeat even occurs so unfortunately
it still might not work on some devices (sansa clip series)

Change-Id: I1c5eda6c5a97887f69e1fbd0ada39cce01db352b
2025-12-05 12:03:58 -05:00
Aidan MacDonald
e2363b0e2c plugins: Add touch API to plugin API and revamp touchscreen test
Change-Id: Iefb658693b03e0cda43e2a9fc93086485e790b4e
2025-12-04 09:01:51 -05:00
William Wilgus
76ee238d48 FS#13704 - Rockpaint fonts memory troubles -- Disable font rendering in font selection
Displaying the fonts as you select them is nice but IMO pretty wasteful
I think a few static bitmaps would probably suffice
I however don't feel like addressing this so lets just disable it, for now?

Change-Id: I882cc0c4129e99d8b2f4ac135301dc3906340bb7
2025-11-26 01:24:13 -05:00
Christian Soffke
f2be592215 plugins: Oscilloscope: Fix outdated mixer frequency
When Waveform mode was active, frequency changes during playback
(if set to "auto", or with USB audio active) weren't picked
up

Change-Id: Iebec7db951312b7dacff850e9554e1d06762ab3a
2025-11-24 21:26:42 +01:00
Christian Soffke
10808f5dfe plugins: Oscilloscope fiiom3k keymap: Add graphmode support
- Allows switching between peaks and waveform
- Adds some missing keys to manual entry

Change-Id: I0b4f2cee3c4da071bf3bf43487c6f445e0f7f61c
2025-11-24 19:35:05 +01:00
Christian Soffke
4095b13d52 plugins: Oscilloscope & VU Meter: Support USB audio
Also show current mixer frequency in title of VU meter,
and adjust the menu title from "VU Meter Menu" to just
"VU Meter"

Change-Id: I5bf8f55a3c9874618cac939fe32a611ac96f52ff
2025-11-24 19:35:05 +01:00
William Wilgus
1bc6b450b9 FS#13700 - Fiio M3k Left/right buttons are mixed up in the calendar plugin
Change-Id: I0e8016ffe65bf5cc47c3a5cec6a12b42022839c7
2025-11-22 10:16:11 -05:00
William Wilgus
7bd04ad89a FS#13698 - Rockblox don't accept control commands
FiiO M3K - you have to hold up or down before the pieces will rotate

AFAICT the scrollpad on the m3k is being presented as a scrollwheel
and it waits for 3 events before enabling rotation.

This behavior is blocking the user presses till you get a repeat event
Fix:
 Enable the scrollwheel at start for the m3k (and m3k linux)

Change-Id: Ic36048dae6f691e9085ab37ffbf67be07c2035ac
2025-11-22 09:53:59 -05:00
Sebastian Leonhardt
5e7a4290b2 rockboy: fix wrong colors on some targets
This bug was found and located by a forum user, see
https://forums.rockbox.org/index.php/topic,54776.0.html

The old code used the FB_SCALARPACK macro which doesn't
respect swapped byte order.
Using FB_RGBPACK fixes it and furthermore makes the
fb.cc[] array superfluous.
I added a small optimization for 16 bit targets, since
the gameboy colors almost fit perfectly (5 bit per color).

Change-Id: If96b3943cb4ab902b880ff3d471add25e138fe8e
2025-11-21 12:09:09 -05:00
Dana Conrad
c533222851 usbaudio: send through dsp (new)
Does not seem to affect UI usability, but allowable DSP loads will vary
based on device and playback sample rate.

To-Do (someday):
- Add dedicated DSP channel
- How to apply DSP settings to above new channel? (UI)
- How to lock out timestretch from being enabled?

Change-Id: Ia24d1055340354e2c32e6008e7e2b03a8e88867d
2025-11-15 07:38:19 -05:00
Johannes Roos
994acefa23 FS#13350: PictureFlow: Fix too few albums displayed for first artist
Using pf_idx.album_untagged_idx initialized as to -1 instead of 0,
we can get rid of buggy duplicate untagged albums while keeping "usable"
untagged albums and properly displaying all albums for the first artist
when there are no untagged ablums at all.

Change-Id: I067ce0bba4ece5e2d9466ffd075af8bf653633b4
2025-10-26 09:21:54 -04:00
Cameron Peck
bfcd8270c9 Add arcsin, arccos and arctan to calculator
Change-Id: I9aaded58718ae410239678abe6cf6196286bc7f8
2025-10-14 17:05:14 +01:00
Aidan MacDonald
b19b95c00f sound: update global volume state in sound_set_volume()
Instead of calling sound_set_volume() and then manually
setting global_status.volume to match, update the global
volume state directly in sound_set_volume(). This makes
things a bit simpler and less error-prone.

Change-Id: I4db4d60ae1a72bd051ef49c90b1ae7f5ba59e535
2025-10-02 14:32:54 -04:00
Franklin Wei
be5457b5eb puzzles: resync with Simon's upstream e00cb46 from 25 Sep 2025.
Notably, this enables "Group".

This also includes some changes to the Rockbox frontend:

- Removes extraneous underline from Extensive Help text.

- Implements a workaround for an upstream breaking change that removes
  the BLITTER_FROMSAVED flag. We depend on this for mouse mode. This
  is apparently the only place this flag was ever used. Note that I've
  hardcoded an arbitrary negative value for BLITTER_FROMSAVED instead
  of -1, for the reason Ben Harris mentioned in his commit removing it
  from the upstream source tree.

- Adds an implicit clip() to the game region when drawing a
  puzzle. This fixes a bug in Untangle where dragging a point off
  screen leads to ugly lines outside the play area.

- Implements "Quick Help" for unfinished plugins (but not "Extensive
  Help").

- Documents the need to disable unfinished plugins in resync.sh (weak
  symbols on win32).

Change-Id: Ic318a5db4b15acb437a3f951fbc9b7919c6fa652
2025-10-01 00:49:19 -04:00
Hairo R. Carela
3ddde8615c rgnano: drop doom plugin due to musl issues
Dropping this after some failed attempts to work around musl dlclose implementation, fortunately there's a native port.

Change-Id: I17550df81494c6e67ddab21d44fe1287ccfa6156
2025-09-21 19:46:54 -04:00
Solomon Peachy
a2c10f6189 unicode: Support characters beyond the first unicode plane
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
 * font manipulation, caching, rendering, and generation
 * on-screen keyboard
 * FAT filesystem (parsing and generating utf16 LFNs)
 * WIN32 simulator platform code

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

Appears to work on:

  * hosted linux, native, linux simulator in both 16/32-bit modes.

Needs testing on:

  * windows and macos simulator (16bit+32bit)

Change-Id: Iba111b27d2433019b6bff937cf1ebd2c4353a0e8
2025-09-12 09:24:30 -04:00
Christian Soffke
ebe961a2a8 plugins: playing time: fix possible stack overflow
Change-Id: Ieb38e84e8c4126741d4630de3594fd16a360d1ed
2025-09-09 02:29:49 +02:00
Solomon Peachy
eb03c7b4d0 build: Newer toolchains need a few tweaks to linker options.
Pull those fixes in now

Change-Id: I71c373ecc9d062ca997eb940c7d84a94e2d678aa
2025-09-07 15:40:44 -04:00
Solomon Peachy
e9b8413f49 Revert "Toolchains: Update to GCC 10.5.0"
I pushed the wrong working tree AGAIN

This reverts commit b92033f716.
2025-09-07 15:22:31 -04:00
Solomon Peachy
2c0bcc0be9 xrick: finally fix the red.
Change-Id: I1e0b4e2d77c8988a286051d391d99aeb7907f9c4
2025-09-07 15:21:59 -04:00
Solomon Peachy
b92033f716 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: Ic157255d76030e66325719e64331f553cb7c4363
2025-09-07 15:11:52 -04:00
Solomon Peachy
5953569ce5 xrick: Fix up a questionable choice of include paths
Change-Id: I60589f2151270349176d10505c3d75ab00fff9d4
2025-09-07 15:11:52 -04:00