ata-creativezen looks like a legit memory-trashing bug, the rtc fixes
are bitwise inversion of a bool, and the remaining are just unused
static variables.
Change-Id: I1a818d4839cd3a54ca6e85f26feb743a4a9d29dc
Unless you've modded the device with modern CF or mSATA storage, it's
not likely to achieve anything. the original hard drives (supposedly)
lack SMART support, and none of the SD adapters bother to emulate it.
Change-Id: Id3cbe717c64947faf4b23d8c84a04b822cfb35da
There are numerous sub-commands, this makes it possible to call the others.
Also in this patch is the ability for the "default" ATA driver to
query smart data too
Change-Id: Ie3aaf9e0b2d7a5d25d09dea34e4f10ee29047e1b
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
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
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
A bit of context, this device is a clone of the FunKey-S with a different form factor, hardware is mostly identical, the relevant difference is it has audio out (via usb-c, adapter to 3.5mm is included), this is the reason why the FunKey-SDK is needed for bulding.
This port is based on the old SDL 1.2 code because the device doesn't have SDL2 support. Alongside what was supported in the SDL 1.2 builds this port supports battery level, charging status and backlight control.
Change-Id: I7fcb85be62748644b667c0efebabf59d6e9c5ade
while scrolling lists or seeking in a song with several second
backlight timeouts the screen turns off even though you are currently
pressing a button
Try #2 moves the logic to button_tick()
Change-Id: I32455eb578cc578b4cbd4b4dc16325970cf9dc29
* Add a crude keymap
* Use native "hardware mute" for audiohw_mute()
* Properly handle touchscreen inputs
* Can now play back music, with some warts..
Broken:
* rotary wheel still doesn't work
* audio garbled/distorted a bit
* no volume control
Change-Id: I040217035a7bf3983b0e269fca3408eedd972cd0
* Only bootloader builds
* Plugins disabled
* No keymaps to anything else
* No simulator
* Touchscreen not wired up yet
* Audio still untested
Bugs:
* rotary encoder does nothing in bootloader
(might be bootloader bug, might be something else)
Other stuff pulled in:
* Unify all of the (identical!) hibyos makefiles
* Rename the "bootloader" to more generic name
Change-Id: I6d8a3b58de726db8e89cf193c90960a070a575c2
The Echo R1 is a new open-hardware music player design, based
on the STM32H743 microcontroller. Schematics and hardware
documentation for it can be found here:
- https://github.com/amachronic/echoplayer
This is an incomplete port. The bootloader can be loaded using
OpenOCD and it can draw to the LCD using SPI. SDRAM is working
but hasn't been extensively tested.
Change-Id: Ifd2bee15c49868fbc989683d3ca14dce48bf3e18
Currently, only the development bootloader can be built successfully.
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: I74ea0da999ddb1d8ce5d0f5434141b3f0b5f7448
This makes these files compileable, or in some cases less
broken, on Cortex-M targets.
In lcd-16bit.c, newer versions of GAS complain about the
infix condition codes so we use the suffix form instead,
which requires unified syntax to compile on GCC 4.9.
Change-Id: If45166d3fc83d64c692cbb331096a966397aa9e9
try #2 at this
if there isn't enough data remaining to fill the columns
then don't read any more data
looking at the blame for this driver it had similar logic originally
But really on native this is just extra overhead so..
Ifdef out for native
Change-Id: I105dea1f7adc0448f345b268fcfa8574333132a9
1-bit vertical displays overread the buffer due to the way the
packing works, this isn't the hottest path anyway but
we can check if height <= 8 and make stride 0 so the dummy data
gets the beginning of the data instead
Change-Id: I88ab4dc37bfd2d680d125f964beafe0ddfb00645
When a line is over a selected length bi-directional scrolling
is disabled.
In non bidir scrolling the string is copied to a buffer twice with
a space between "scroll text" + " " + "scroll text"
this is to allow scrolling the line in the forward direction
with minimal extra logic
Note: that is the ONLY direction it is equiped to handle
In the USB screen I observed while switching through the different modes
that sometimes the text was corrupted
turns out you can still have scroll->backwards set to true
which causes offset to go negatve but we never check if offset < 0
in non bidir scrolling mode and happily continue with ever more negative offsets
Change-Id: I210f7880be953d3cc42469828a7ca5fc2b2ab96f
On PATA, we'd cap our transers at UDMA2 if the device reported that an
80 pin cable wasn't detected, but SATA devices do not perform this test.
So alter the check to only apply on PATA devices, so that SATA devices
can run at full UDMA speeds.
Change-Id: Id7aa25f2a702c0af73d707395439d69da1e04719
characters less than the first diacritic in the symbol table (0x300)
return false after checking the MRU table
we gain some performance by eliding the function call all together if less than first diacritic
Change-Id: I02c14e350eb168eca808523affad443cd43888b4
remove nvram and use the existing settings framework for it
add a crc check to the user_settings data to see if we need to save
the user setting file or if we can just save the status file (resume.cfg)
move volume to the system_status struct so we don't write the whole settings file
over volume changes
allow user to still export volume with save sound settings
allow the user to also export pitch and speed
name the file .resume.cfg
Rename all the SYSTEM_STATUS save file variables to TLAs to save space and
discourage tinkering
Cleanup DEBUG_AVAIL_SETTINGS output
when saving user_settings it calls status_save as well this cause the resume
file to be written twice. instead remove the callback for status_save
when setting_save is called
remove header text when saving .resume.cfg
convert status_save() to status_save(bool force)
add SYSTEM_STATUS_UPDATE_TICKS
for ATA device set this to 5 minutes
since we arlready wait for the disk to be up before saving
we don't want to miss our window
for all other every 15 minutes
that way if the battery is too low by the time shutdown comes around you
don't lose much progress
Change-Id: I27214ffd6e5d5494ee5ca83b14f04a41ba426ad7
Use AXP2101's egauge battery percent level if available (hw4 units).
If not available (_battery_level() will return -1 on hw1-hw3 units),
fall back to voltage battery level.
Also fix logic in axp2101_battery_status()
Change-Id: Ic300418532dae6f7772fff8bf5e2b32516f3b973
if you run yesno screens back to back or another screen with
wait_for_release you may never see the release
instead clear anything in the queue but release events
Change-Id: I1b1e42cbb44f2fdfed441ab1f217b6ea4fe07492
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
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
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
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
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
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
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
Turns out they did not swap the stereo switch lines on us,
so this setting isn't really useful. Repurpose it to allow
the user to force the device into headphone or line output mode.
Note that settings other than "Automatic" will cause jack detection
to not work.
Default Automatic.
Change-Id: If94499fbb8f0d92111811fe51f6107ce213b66ad
Check for the ES9018K2M dac in the bootloader for
hw1/hw2 devices. Assume that all devices newer than
hw2 have ES9018K2M DAC unconditionally.
All devices will now report the correct hw revision
in the debug menu under Device Data.
Add devicedata.version field, current version 0.
Rename device_data.lcd_version to device_data.hw_rev.
hw2 devices with older bootloaders which ID as hw1 are special-
cased to keep using hwvol on them. They should still upgrade though.
Change-Id: If0fd5ce3bc6e85e511047721ec18e42fb89312e7
Event handling must happen on the main
thread for MacOS.
Not sure if button_queue_wait is the
best place for doing the SDL event
polling, but seems to work ok.
Change-Id: If928282df84bdd74e24a48afd7dbc4c4bfcc49e2
* Make the partial sector logic a little clearer (no functional change)
* Corrections for debugging messages
* Also use MAX_VIRT_SECTOR_SIZE in BOUNCE_BUFFER calculations
Change-Id: I89363824b092b2e3bddd5e0f75bf81200c9bc513
* if MAX_VARIABLE_LOG_SECTOR is defined, use that
* if MAX_PHYS_SECTOR_SIZE is defined, use that
* use SECTOR_SIZE
Change-Id: Ia314f590fdb300e99df2c60587657c9563b9ce80
* If the device returns a valid upper limit (word 47) use that.
* If the current limit (word 59) is valid, use that.
* Fall back to 1 as a default, not 16!
Note this is only used for PIO transfers!
Change-Id: I269b751466242bbcce91ee991d9ade449cc84b6b
Support hw4 units with AXP2101 PMU
Bootloader successfully compiles and loads onto device.
The LCD appears to be identical to hw3 units.
Scroll wheel and buttons work
Audio output works, including volume.
HP/LO detect works
Rockbox build is generic
GPIO gating logic seems to be working as intended now.
- Added new GPIO definitions - some significant overlaps with pins
from previous hardware revisions...
- Added some GPIO definitions for older players we didn't know about
- Add register definitions for AXP2101 from datasheet
(these are very different from AXP192!)
- Add AXP2101 regulator definitions, need to support multiple step
sizes per regulator.
- Verify AXP2101 voltage set multi-range logic
- Verify AXP2101 voltage get multi-range logic
- Make AXP2101 its own driver
- AXP2101 driver should be "minimally viable", though I think
there is some extra functionality that could be implemented.
- Disabling the coulomb counter stuff - we could maybe make
the E-Gauge work for the same purpose, but it only appears to
be used on the debug screen at the moment so it doesn't seem
like it's worth the effort.
- Found new button GPIOs
- Found error in my GPIO setting logic, blue light works now!
- Set LDO/DCDC output voltages to OF's settings, as far as
I can tell.
- Determined we probably want TCS1421_CFG1:0 to be 0x00,
for UFP behavior
- Tested this rb build with both old and new bootloaders on hw1.5,
hw2, hw4 in as many configurations as I can think of, works across
the board.
- Bootloader can install itself on hw4, so nand chip isn't novel
- Uninstallation file can be made by patcher script, works on hw4
- Installation file can be made by patcher script, works on hw4
- Added HW4 to rbutil, manual
Change-Id: I5b75782273e81c2c6f2b9c79501c8b7cbf88391f