Commit graph

11914 commits

Author SHA1 Message Date
Solomon Peachy
f1173e07ec imx233: Fix clkctrl for STMP3600 variants (creativezenv)
Change-Id: Ia8f0ce13cdf7dcbf1339bb7648f7a99822f74017
2025-01-08 08:04:25 -05:00
Solomon Peachy
4cd0c35150 imx233: Fix up compilation problems with the IMX233 ATA driver
Change-Id: I726b76aa4ac3e0986f530727d342c99909a1742c
2025-01-07 20:29:35 -05:00
Solomon Peachy
14b8820231 ata: we shouldn't ry to do FLUSH_CACHE_EXT if HAVE_LBA48 is not defined
Change-Id: Ic3da25a144bfd7ae41ee2e012a90e38aacac4df9
2025-01-07 19:53:20 -05:00
William Wilgus
5d9b01b9ed [Fix Red] define lcd_awake for targets with lcd_sleep
Change-Id: I62f8f7908f2877d4b255075120f87e3c9a375f66
2025-01-05 12:12:57 -05:00
William Wilgus
734cc3e8d1 [Bugfix] call lcd_awake() unconditioanlly on shutdown for devices with HAVE_LCD_SLEEP
last patch limited this to the 6G but the ipod Video has similar reports

I have a feeling there are others and enabling this unconditionally shouldn't hurt
the other devices

Change-Id: Ie4077299550ee028c32d746e5fe6c60b707f052e
2025-01-05 10:59:46 -05:00
William Wilgus
f42343b715 [BugFix] Ipod 6G Classic Shutdown Hang
I think it comes down to lcd_target_enable_clocks(true)
which turning on backlight or lcd_awake calls

https://forums.rockbox.org/index.php/topic,55159.0.html

Change-Id: Iab2a0abc0763e63213f01bda79dca5e39aa41fc4
2025-01-05 10:15:29 -05:00
Dana Conrad
f2dd489120 FS#13535: AXP2101: ADC / reporting improvements
Improve ADC behavior, add correct conversion
for die temperature, add readout of EGauge to debug screen.

Add delay to give ADC time to get a good reading. Initial reading
may still be 1-3% optimistic, which is probably ok.

EGauge appears to be pretty good, but no great need to convert
to using it either.

Change-Id: Iab9d50e2427f656ad0875f9a623b03545fc69881
2025-01-01 20:49:07 -05:00
Christian Soffke
d038aa47fe panicf: Add version info
Makes it easy to figure out the build
from PANIC screens posted by someone

Change-Id: Ic0e6fbb20b3d7b8caf35aedad48136bf3e914c2e
2025-01-01 20:48:03 -05:00
William Wilgus
e79996e031 [Bugfix] strcasestr
I pushed the wrong version of the function it was an experiment
on resetting haystack past the searched string but it is missing the
rest of the logic and therefore misses strings that should match

Change-Id: I23391d2e753840bfeaab8e26d9987198272fe7b8
2024-12-31 23:06:08 -05:00
William Wilgus
186ad1234b [BugFix] pathfuncs.c path_append_ex basepath_max might cause buffer ovfl
strlcpy returns the length of the string that would have been copied
had there been sufficient space basepath_max might still be
larger than buf_size yet smaller than len
which would result in a null terminator being written past buf[buf_size-1]

Change-Id: I43e8ba9f72ea35bfe4f759ecd102c2e4bd26eb75
2024-12-30 19:35:33 -05:00
William Wilgus
27aff7ec8d strcasestr optimize for speed and size
revisit this and shave a bit more off on code size

Change-Id: I90546b931780c6779960129619a41cc6592c44e1
2024-12-30 16:42:55 -05:00
Solomon Peachy
6f542b6540 libc: We need to define SIZE_MAX in our stdint.h
Change-Id: Ifbf7ad4ea62c5543bcc7e0bd18d612d30d60b63e
2024-12-30 15:22:11 -05:00
William Wilgus
2a825b866a SIMULATOR help text fix yellow
Change-Id: If425ead1c53f8021f6047abc6c440c1343c68e79
2024-12-29 21:46:34 -05:00
William Wilgus
fcbfa494f5 [Feature] Simulator add F1 help text
give a listing of the keys used in the simulator

Change-Id: Ifcb91c59de41c214d050bd175065fabb6cf9eac4
2024-12-29 21:25:48 -05:00
Christian Soffke
9ba59477a1 sdl: improve window resizing on macOS
This enables smooth resizing of the window using a
fixed aspect ratio, instead of snapping into the
correct aspect ratio only when the resize operation
has finished, by using an SDL event filter that gets
events delivered during the resize operation
(whereas SDL_PollEvent blocks until done on macOS).

Change-Id: Ie6614e4b6f49a24469c5ee6a69721c9fbd440dae
2024-12-30 01:08:12 +01:00
Christian Soffke
8ce9d9e39e simulator: maintain LCD position/size when toggling background
Change-Id: Id76464b77b33d531d6075a83038466e18fab3a7f
2024-12-30 01:08:11 +01:00
William Wilgus
8884284da4 simulator hand icon on button region mouse over
add a hand pointing cursor over the buttons

Change-Id: Idb54e084b5b768de845a94c5bb13e4435d9b82e5
2024-12-29 16:43:21 -05:00
Christian Soffke
8bd62e35cc button_queue: fix cpu never unboosted
regression introduced in da9d67a

Change-Id: Id1496873f1ab72fecc225dcfc78e633eea441089
2024-12-27 17:41:34 +01:00
Christian Soffke
5e09a9246c sdl: fix shutdown hang on MacOS when SDL threads are used
Change-Id: I2179d2beed89beba1716072fc06b9cc090118364
2024-12-27 11:45:53 +01:00
Christian Soffke
fa8b095f29 sdl: fix: concurrent drawing on Windows
On Windows, we need to prevent the event thread
from drawing at the same time as the main thread,
when window is being adjusted.

Change-Id: I2b4e4a50fec427e53e310593850e2a556a594b31
2024-12-26 12:24:24 +01:00
Christian Soffke
d323d968d8 sdl: adjust texture access pattern to "frequently"
probably doesn't make much of a difference
for our use case but should prevent creation
of temp buffers

Change-Id: Ie2cbefcbd7b8f94bed340f08bf71f764a32ed1ea
2024-12-25 19:24:32 +01:00
Christian Soffke
32cc5ee8f9 simulator: Press Tab to show/hide background
Change-Id: I80e8f629b1bbf37f92d243e190d541e7360e9dea
2024-12-25 08:34:40 -05:00
Christian Soffke
400452180d sdl: Keep texture around, upload LCD-parts only
No need to create a new texture for every
rendered frame, unless the scaling method
has been adjusted.

We also don't need to upload the (unchanged)
player interface to GPU memory repeatedly.

+ Remove unused lcd_display_redraw &
having_new_lcd variables

Change-Id: I5bff6aa2d54347a3f2c3afba8d8d7eb9e39f77f7
2024-12-25 08:34:40 -05:00
Christian Soffke
7aaa722a5d simulator: Adjust scaling using keyboard shortcuts
Press 0-3 to to adjust current zoom level
to 50% (0), 100% (1), 200% (2), or 300% (3).

Press 4 to switch between "best" (linear)
and nearest pixel sampling.

Change-Id: Id10d361659855a0ad9c97e6b341f498f72709ef5
2024-12-25 08:34:40 -05:00
Christian Soffke
759cbf4e5f sdl: Remove usage of SDL_SoftStretch
SDL 2 lets us take advantage of a fixed logical resolution,
where the renderer scales content up or down automatically.

Relative mouse motion is also affected by renderer scaling
by default (see SDL_HINT_MOUSE_RELATIVE_SCALING).

If window zoom has been enabled from the command line,
set scaling quality to "nearest pixel sampling" instead
of "best" to allow pixel peeping.

Change-Id: I4e5c19d36b55c985c26ac5ae64c4a6b8dd9b308d
2024-12-25 08:34:40 -05:00
Christian Soffke
60f3283f48 sdl: make window resizable, enable high DPI
Tested on Linux, MacOS, and Windows.

On MacOS and Windows, we constrain the window's aspect
ratio by adjusting the size when responding to resize
events.

On Linux, I've not found a way to do so, that doesn't
result in fairly stuttery behavior and weird jumpy
behavior of the resize handle, possibly depending
on your window manager. So, black bars are displayed
around the content.
Maybe someone, at some point, finds a way.
(SDL3 seems to have SDL_SetWindowAspectRatio)

When the window is in fullscreen, black bars are
display necessarily, of course, on all systems,
unless the player GUI has exactly the same aspect
ratio as the screen...

Change-Id: I535e6617497611ea57a4c19e08e552f990859cfe
2024-12-25 08:34:40 -05:00
Christian Soffke
79191bf9bb simulator: Fix Sansa Clip display position
Change-Id: I23be28e6bfa4ead326416d0457ffa11c3bf18a54
2024-12-25 12:23:27 +01:00
William Wilgus
632e72273d small cleanup putsxyofs()
store the vp local rather than using current_viewport
use the flags directly rather storing them

Change-Id: I93391acff4745aae3d5d7e695c0eabd6dbeabb11
2024-12-21 19:11:02 -05:00
William Wilgus
8091477f8d Optimize 16 bit lcd_fillrect()
move switch outside loop

adds ~10000 ops/s in test_gfx

Change-Id: I2204d637282aae4bbc0dde31395c6cc0568f3247
2024-12-21 18:19:38 -05:00
William Wilgus
d6e99178aa lcd-16bit-common optimize bitmap_part
in testing this slightly speeds up any of the draw routines using fg or bg
and slightly slows down the ones that don't
being that these are already faster it serves to bring them closer in
ops per second

.. and slightly speeds up the most general case DRMODE_SOLID

Change-Id: I4ea4898354e8bc9dfa7e96f188108ca77ea0aca9
2024-12-21 16:37:35 -05:00
Dana Conrad
48811ed4a8 ErosQ Hosted: Fix maximum volume upon plugging in headphones
Ref. FS#13533

Change-Id: I343df8cd351bb2578dd11894114903eba527f2c7
2024-12-20 12:09:35 -05:00
William Wilgus
660fa3ffdc scroll engine calculate stringsize only when scroll line updated
we calculate the size of the scrolling line every scroll update
the line data doesn't ever change without a call to update
instead calculate the string size when the line is updated
re-use this value while scrolling the line

in theory the current font could change but in practice
I can't find a case when the string size needs to be updated
that the scroll engine isn't already updating the line

if this is later an issue we can recalculate the stringsize each time
the line is finished scrolling which still saves quite a few calculations

Other:
I don't think we have any targets with pixel counts exceeding 65535 pixels
where unsigned short stringsize will be an issue

Change-Id: I83d6374377ed648d9a320d4fd69f9d6a17095b0c
2024-12-20 10:31:46 -05:00
William Wilgus
0bb79dd847 ascodec (sansas) add a 10 minute delay before re-enabling charge
Change-Id: I0b7bc3c92aeefa43f40becb26d7d9344d463775b
2024-12-19 12:11:38 -05:00
Vencislav Atanasov
cf4bf5439e S5L8702: Introduce syscfg_read() and use it in the debug menu
This makes it possible to reuse the SysCfg reading logic in other places.

Tested on ipod6g (normal + bootloader).

Change-Id: Iae6de2ee671bce4edb0153d26c57579ad47d0335
2024-12-17 23:08:10 -05:00
Dana Conrad
7d3cc24dec FS#13519: multivolume: Ensure absolute paths get drive designation
Change-Id: I8419af670ca101b11bba29d9fd577f21fa22fd42
2024-12-17 21:18:06 -05:00
William Wilgus
33c0c9efae [Bugfix] Simulator doesn't scroll lists in plugins
unless lcd_update() is called the sim doesn't update scrolling
you CANNOT call it from the scroll thread its simply ignored

I suspect this has something to do with where the call to render
originates as thi is the only thing I can think of besides
a call to disable the render

see demos/rb_info > paths -- observe the lack of scrolling
see any menu in a plugin that exceeds screen width

Change-Id: Ic14dee4a34de29479d739e6a280d6cf1cc283719
2024-12-16 11:37:56 -05:00
Vencislav Atanasov
5d7c8a0df1 Convert non-ASCII characters to UTF-8
Comments and notes are converted to UTF-8. Already broken multibyte characters are fixed using common sense.

This patch contains no code changes.

Change-Id: Ia511ab84936cb2495ac17309493a9b98727a7902
2024-12-15 21:16:12 -05:00
Roman Artiukhin
1f548f74e6 unicode: add utf16decode with utf8 buffer size check
Make use of it in id3tags and cuesheet

Change-Id: I153c23f1f7312e9d5e1de9f03725f2d2ab0abc93
2024-12-15 15:44:57 -05:00
Vencislav Atanasov
843157e227 S5L8702: Abstract LCD driver
This driver decouples the LCD interface from the target-specific LCD parameters. It makes it possible to reuse most of the ipod6g driver code on ipodnano3g and ipodnano4g.

No difference in the produced binaries for ipodnano2g (normal and bootloader).

Tested on ipod6g (normal and bootloader).

This is a part of the large iPod Nano 3G and iPod Nano 4G support patch.

Change-Id: I7ce198ed3d5a8b58759951e2d67788cbf9781dc8
2024-12-15 14:52:36 -05:00
Roman Artiukhin
004304dc65 unicode: add iso_decode_ex with utf8 buffer size check
Make use of it in id3tags, playlist and cuesheet

Change-Id: Ibc8abc0faf16688bc9b826b7a712d1dfe9bf75b2
2024-12-15 09:26:26 -05:00
Vencislav Atanasov
f8fa1e7d5a S5L8702: Move I/O addresses and bit masks from clocking driver to SoC definitions, reuse existing definitions
No difference in the produced binaries for ipod6g (normal and bootloader)

This is a part of the large iPod Nano 3G and iPod Nano 4G support patch.

Change-Id: Ib79c5539a317aae350d661ab23c181471ee38abb
2024-12-15 01:06:09 +02:00
Vencislav Atanasov
afeefcbec1 S5L8702: Move I/O addresses from DMA driver to SoC definitions, reuse existing definitions
No difference in the produced binaries for ipod6g (normal and bootloader)

This is a part of the large iPod Nano 3G and iPod Nano 4G support patch.

Change-Id: I82943e91ba7e6764428f853f84799f0d54b700a6
2024-12-14 18:23:48 +02:00
Vencislav Atanasov
037172d5c2 S5L8702: Read WDT_BASE from SoC definitions
Tested on ipod6g (normal + bootloader).

No functional change, no binary size change, the only difference is using r3 instead of r1 for the WDT_BASE address value.

Change-Id: I2ce2b7d987671cb4fcbbcdde574437b21a534da0
2024-12-14 07:57:53 -05:00
Vencislav Atanasov
eb57d42879 S5L8702: Move I/O addresses from drivers to SoC definitions
No changes to ipod6g binaries (normal + bootloader).

Change-Id: Iaad0d0de16176ff94b1f67aa3fdb7c6cc063b27e
2024-12-14 07:57:53 -05:00
Roman Artiukhin
a23002cd5e unicode: Unify check for UTF-16 BOM
Adds utf16_has_bom function

Change-Id: I67ea474c9cf6ca6e6684351c2f54131164b7903c
2024-12-13 17:38:05 +02:00
Vencislav Atanasov
23d185b7fe S5L8720: Add partial clocking support
Tested on ipod6g (normal + bootloader).

This is a part of the large iPod Nano 3G and iPod Nano 4G support patch.

Credit: Cástor Muñoz <cmvidal@gmail.com>
Change-Id: I5b56eaaa8a5621f4293c00c53e50e5ca39831eb6
2024-12-13 08:32:19 -05:00
Vencislav Atanasov
06963a5ce4 S5L8702: Clean up linker script, also add support for S5L8720
Tested on ipod6g (normal + bootloader).

This is a part of the large iPod Nano 3G and iPod Nano 4G support patch.

Credit: Cástor Muñoz <cmvidal@gmail.com>
Change-Id: I64beed48e3d88436b9082d4ae387f39843ab2e20
2024-12-13 08:32:19 -05:00
Vencislav Atanasov
0fef17206e S5L8702: Reallocate the bootloader without dependency on _dfuloadaddr
Also adds support for S5L8720 initialization.

This currently changes only the bootloader code for ipod6g. Tested on target.

This is a part of the large iPod Nano 3G and iPod Nano 4G support patch.

Credit: Cástor Muñoz <cmvidal@gmail.com>
Change-Id: Ib4b5f12b701058940c1c5bd686d8ac346ae14e12
2024-12-13 08:32:19 -05:00
Solomon Peachy
e9b0aa495b SDL: special-case pulseaudio backend with a smaller PCM buffer size
Pull in a small pile of cleanups as well

Change-Id: I087c553e098e9214ce528d2568c22d90e3e86f04
2024-12-12 18:08:52 -05:00
Vencislav Atanasov
c3fad37827 S5L8720: Add support for DMA peripherals
No difference in the produced binaries for ipod6g (normal and bootloader)

This is a part of the large iPod Nano 3G and iPod Nano 4G support patch.

Credit: Cástor Muñoz <cmvidal@gmail.com>
Change-Id: I660f446924d07a07842e57acb3f2d1af362ac15c
2024-12-11 15:31:59 -05:00