Skip to content

RetailOS boot fixes - #47

Merged
jeanthom merged 30 commits into
masterfrom
retailos-boot
Aug 22, 2026
Merged

RetailOS boot fixes#47
jeanthom merged 30 commits into
masterfrom
retailos-boot

Conversation

@jeanthom

Copy link
Copy Markdown
Collaborator

Lots of emulation fixes that finally lets us enter RetailOS. Diagnostics and iPodLinux emulation is also improved (no more "Lost interrupt").

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)
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
jeanthom merged commit 8f35eb4 into master Aug 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant