# Documents Read in this order. | Document | What it holds | | --- | --- | | [start-here.md](start-here.md) | The ARM7TDMI and ARMv4T; registers, modes and banks; CPSR/SPSR; the ARM and Thumb sets; the pipeline and what R15 reads as; N/S/I/C cycles and merged IS; exceptions and vectors; what the core does not own | | [timing.md](timing.md) | Every instruction class as a sequence of typed cycles with address and width, converted from the TRM's tables; multiply's `m`; the I cycles NBA, run closed box, makes over the whole corpus | | [undocumented-behavior.md](undocumented-behavior.md) | Items U1–U21 (misaligned loads, empty lists, base in list, LDM^ glitch, R15 + 12, shifter edges, multiply carry, IRQ mask latch, CP14, Thumb BL, reserved encodings, R15's low bits, LDRD/STRD), contradictions C1–C11 between sources, each with its evidence tag | | [validation.md](validation.md) | Every oracle by tier with pins; what the corpus is and what it leaves out; the referee's and the multiply model's measured agreement; the rung plan and the override file | | [disassembly.md](disassembly.md) | The disassembler's syntax, how it prints undefined encodings, and its comparison with mGBA, MAME and objdump, and the round trip through GNU as | | [debugging.md](debugging.md) | `DebugSession`, the console's commands, the command line, using them from a board | | [handoff-brief.md](handoff-brief.md) | The task for the session that builds the core: decisions, the bus contract, the harness, rungs, tooling, the user's decisions | ## Findings made while gathering (2026-10-21) These came from running things, not from any single document. (Edited 2026-11-19: statements that rested on reading an emulator's source were removed or re-sourced; docs/provenance.md "Wave 2".) 1. **SingleStepTests ARM7TDMI is emulator-derived and has no I cycles.** Its README says it was generated from a NanoBoyAdvance fork (revision not published). It holds 2,250,000 cases (50,000 per file, not the 20,000 its README says), records only reads and writes, and its `cycle` field cannot recover I cycles (a store's write shares the fetch's cycle number). Its N/S bits and its next-fetch `access` are NBA's GBA view, not the CPU's pins (finding 5). 2. **The corpus's register layout is undocumented**: R8–R14 in `R` are always the User bank and each `R_mode` always its own mode's registers. Read as "the current mode's view", 7,103 of 50,000 cases in one file seem wrong. 3. **Today's NanoBoyAdvance ARM core, built as a referee, agrees with 2,194,656 of 2,250,000 cases (97.54%)**, and all 55,344 others fall into three classes with none left over: refill-fetch address bits 1:0 (33,087), LDRSH from an odd address read 8 vs 16 bits wide with the same value (17,145), and write-back to R15 refilling or not (5,112). **This is NBA against an older NBA**: the corpus came from an NBA fork, so the agreement measures drift between two revisions of one emulator, not independent confirmation. The independent checks in that work are ARM's cycle tables (the referee's I cycles match them except one, C5) and the multiply model (finding 7). 4. **NanoBoyAdvance moved to Codeberg** (GitHub closed 2026-06-21). Codeberg's default branch `phoenix` is the in-progress Update 2, relicensed BSD-2-Clause and restructured; `master` (`e8482c1`) carries an ARM core byte-identical to GitHub's last commit and is what is pinned. 5. **The fetch after an I cycle is S on the pins and N on the GBA.** The TRM (3.3.4) makes it a merged IS cycle; NBA, mGBA and the corpus time it as N and pass the hardware timing tests. The contract keeps the pin in the core and the conversion in the board (decided by the user, decision 1). 6. **CP14 MRC/MCR do not trap on a GBA.** alyosha-tas's hardware test (`arm/Coprocessor_14`) shows MRC returning the opcode on the data bus and setting flags for Rd = R15; the corpus and NBA take the undefined trap (C6). TRM 4.6 confirms CP14 is internal to the core. The test covers four encodings (MRC of c0,c0 and c1,c0, MRC into R15, one MCR), so only corpus cases with those encodings get hardware expectations; the rest are excluded as unverified. 7. **zayd's hardware-fuzzed multiply model agrees with every corpus multiply** (53,446 executed: results, 28,508 carry flags, and `m` equal to the TRM's rule). The cases with R15 as an operand compare only when R15 reads as address + 12, which only the emulator-derived corpus shows; there is no hardware evidence for it (U12). 8. **The TRM's cycle tables print nMREQ and SEQ one row early** (the pins are pipelined); reading them naively puts every N and S one cycle off. timing.md has them converted. 9. **The undefined trap has an I cycle in the TRM and none in NBA** (C5). 10. **Hardware tests settle two "undefined, should not be used" Thumb encodings**: `BX` with H1 = 1 is a plain BX, and hi-register `MOV` with two low registers is a MOV (alyosha-tas `thumb/blx`, `thumb/cpy`). Two others are disputes between emulators with no hardware result: `0xDExx` (the corpus and NBA run closed box branch; mGBA run closed box and ares take the undefined trap) and `0xE8xx` (NBA and mGBA run closed box differ on parts of the range; ares traps) (C7, C8; tests/hw/thumb_undefined). 11. **No die-level model exists** for the ARM7TDMI, so hardware evidence is test ROMs run on GBAs plus ARM's documents. 12. **The 1995 data sheet (ARM DDI 0029E) is the only ARM document with the instruction set chapters** for this core; the 2001 TRM dropped them. ARM's own copy of the TRM and a Microchip copy differ in bytes; ARM's is pinned.