# Mikey: a read of `$FDC0-$FDFF` indexes past the 32-byte palette (IndexError) **Status: closed 2026-11-19** (fixed in lynx-python, carried to lynx-rust). See "Resolution" at the end. Found by the 2026-11-19 library sweep (lynx-rust `docs/sweep-2026-11-19.md`). Board behaviour, not a transcription fault: lynx-rust (a panic) and this repository at `bc5f35e` (an `IndexError`) stop at the same slice and the same instruction. ## What happens `Mikey.read` (and `Mikey.write`) send every register `>= 0xA0` to the palette: if reg >= 0xA0: return self.palette[reg - 0xA0] The palette is `bytearray(32)` (`$FDA0-$FDBF`), so any access to `$FDC0-$FDFF` raises `IndexError` and the run ends. The comment just below (`HYPOTHESIS (U18): write-only and unallocated addresses read 0`) is never reached for those addresses. The write path (`elif reg >= 0xA0: self.palette[reg - 0xA0] = ...`) has the same bound. Three licensed titles hit it, all through the boot ROM, Lynx II row: | Title | Slice (266,667 ticks) | Instruction | Access | | --- | --- | --- | --- | | Toki (USA, Europe) | 510, no input needed (title fades out) | `$1BC5: 99 A0 FD` `STA $FDA0,Y`, Y = `$3F` | a read of `$FDDF` that the CPU core (w65c02-python `9ca4a2f`) makes during the indexed store, before its write | | Bill & Ted's Excellent Adventure (USA, Europe) | 901, after A at slices 600 and 900 | `$40F9: B1 0E` `LDA ($0E),Y`, pointer `$FDA0`, Y = `$20` | read `$FDC0` | | Geoduel (USA) (Demo) | 1206, after A, A, B at 600, 900, 1200 | `$0A8B: B9 25 FD` `LDA $FD25,Y`, Y = `$A0` | read `$FDC5` | Toki's loop walks Y up to `$3F` over `$FDA0`, so it writes `$FDC0-$FDDF` too (a fade that treats the 32 palette bytes as 64, or a loop bound one bit too wide in the game). ## Repro # lynx-rust (fast): the panic names src/mikey/mod.rs, Mikey::read target/release/lynx "$NO_INTRO_DIR/Atari - Atari Lynx (LYX)/Toki (USA, Europe).zip" --frames 600 # this repository python -m lynx_python "$NO_INTRO_DIR/Atari - Atari Lynx (LYX)/Toki (USA, Europe).zip" --frames 600 # the other two need the sweep's presses (lynx-rust scripts/inputs/aab.txt): lynx-rust/scripts/lockstep.py --cases scripts/sweep-cases.tsv --only 'Geoduel|Bill' ## What the hardware does there: unknown No document read so far says what `$FDC0-$FDFF` is. Candidates, each a HYPOTHESIS: 1. unallocated: reads 0 (or open bus), writes ignored (the U18 rule this file already states for other unallocated Mikey addresses); 2. the palette mirrored every 32 bytes (`reg & 0x1F`), which would change Toki's fade and Geoduel's and Bill & Ted's reads. What would settle it: a probe ROM on a real Lynx (none on hand), a logic-analyser capture of one of these titles past the point, or a document. A closed box (MAME 0.285 or Holani, run, never read) could be a detector for which choice the games' pictures agree with (OBSERVED only). Not fixed here: fixes start in this repository and are a separate decision. ## Resolution (2026-11-19) The question was answered by a document after all: the Epyx hardware reference (`reference/docs/epyx-html/hardware.html`, Appx 2 address list) ends the colour map at `$FDBF` and says "FDC0 -> FDCF = not yet allocated" and "FDD0 -> FDFF = not yet allocated", the same words it uses for `$FD51-$FD7F`, which the board already reads as 0 (U18). So `$FDC0-$FDFF` is not palette (DOC), and it now goes the U18 way: reads 0, writes ignored, no mirror (HYPOTHESIS for the value; undocumented-behavior.md U18b names the probe ROM that would settle it, including a possible mirror). No closed box was used to choose. Test: `tests/test_board.py::test_every_mikey_and_suzy_address_reads_without_error` (every `$FD00-$FDFF` and `$FC00-$FCFF` address read without error; writes to `$FDC0+` leave the palette alone and those addresses read 0). Smoke (`scripts/smoke.py --list scripts/smoke-next.txt --frames 600,1200,2700`, PyPy): Toki runs to 2,700 frames (title, the logo, the credits rolling), Bill & Ted's and Geoduel run to 2,700 (their titles; the sweep's presses are not in smoke.py: the lynx-rust sweep cases with `aab.txt` are rerun there).