RetailOS boot fixes - #47
Merged
Merged
Conversation
Judging by the register position and usage from RetailOS (only read accesses), it could likely be DMA status.
+0x028 bits 3-5 were erroneously identified as 'write 1 to clear IRQ'. Bit 5 is seemingly 'interrupt enable' (see ipodloader2 pp5020_unmask_irq and pp5002_mask_ack_irq bodies in interrupts.c). Bit 4 is used for masking interrupts. Bit 3 is probably interrupt status like bit 4. This modification fixes the "hda: lost interrupt" in iPodLinux.
Bit 30 ('HI_IRQ' in rockbox sources) is a bit aggregating interrupt
status from lower priority/speed peripherals (serial, GPIO, I2C, etc.).
Seems to make RetailOS happy.
The 'opto' peripheral is normally issuing automatic requests to the clickwheel controller IC (MCU?). The 'explicit command' (made-up name) register lets you issue manual commands to the controller, I assume for initialization purpose.
- Fixes burst of interrupts when the interrupter task is not polled for a while - Remove unneeded await
These registers aren't meaningful on an emulated drive but they are nonetheless accessed by RetailOS so they need to be emulated.
- Set DRDY to true (7.15.6.2) - Set DRQ to false (7.15.6.4) - Fix error register to use ABRT bit instead of MED (8.1.6)
Used in iPodLinux
Introduce internal method 'assert_intrq' which checks for interrupt enable configuration bit (nein). Fixes some interrupt issues.
Using Window.get_keys_pressed results in buggy key release detection. This commit uses instead Window.is_key_down, and detects changes on this value.
Lists all the peripherals reset during system reset
Used during RetailOS boot and in diagnostics (e.g. to enter disk mode the firmware leaves a magic value in IRAM then resets the whole system).
jeanthom
force-pushed
the
retailos-boot
branch
from
August 22, 2026 05:53
e867a1d to
c13c315
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lots of emulation fixes that finally lets us enter RetailOS. Diagnostics and iPodLinux emulation is also improved (no more "Lost interrupt").