# CPU-measured console probes: miscellaneous timing, ALU, DMA and PPU-write tests Target: Super Famicom, 5A22 **CPU v1**, PPU1 v1, PPU2 v1, NTSC, Super EverDrive X5. Every result is a raw byte the CPU read. The ROM stores the bytes in battery RAM; nothing on the screen is judged. This file is a spec, not code. Sources read: undisbeliever (Marcus Rowe, zlib) `src/hardware-tests/*`, `src/hardware-glitch-tests/*` under `tests/test_roms/undisbeliever-src/src/`; anomie `reference/docs/anomie_timing.txt`; fullsnes `reference/docs/fullsnes.txt`; snesdev wiki `reference/snesdev-wiki/{Errata,Sprites,Timing}.wiki`; ares 9408cb4 (ISC) `sfc/{cpu,ppu}` and `component/processor/wdc65816`; snes-python `docs/undocumented-behavior.md` (Q/C/U numbers below are from it). (Scrubbed 2026-11-19 under docs/restart.md rule 10. This spec was first written with a GPL emulator's source open beside the documents. Each model statement that rested on it was checked against ares, the same author's ISC-licensed code, and is cited to ares by file and function where ares says the same; where it could not be checked it is struck. "Model" below means ares's code, a prediction, not a hardware fact. The console's answers are in `tests/console/` and are what count.) **The author's consoles are not yours.** undisbeliever's notes name "my 3-chip 2/1/3 SFC console" (CPU v2, PPU1 v1, PPU2 v3) and "my 1-chip SFC console" (`setini-early-read-obj.asm:11-12`). Your console is 1/1/1. Where his recorded result depends on CPU or PPU2 revision (refresh, HDMA, INIDISP glitches), treat it as a different console's result. --- ## 0. Conventions used by every section ### 0.1 Cycle lengths (master clocks) | Access | Clocks | | --- | --- | | Internal operation (IO cycle) | 6 | | ROM fetch/read, banks `$80-$BF:8000-FFFF`, MEMSEL `$420D`=1 ("FAST") | 6 | | ROM fetch/read, MEMSEL=0, or any bank `$00-$3F` ("SLOW") | 8 | | WRAM (`$7E/$7F`, and `$0000-$1FFF` mirrors) | 8 | | `$2100-$21FF`, `$4200-$43FF` I/O | 6 | | `$4000-$41FF` (joypad serial) | 12 | | DRAM refresh pause, once per line | 40 | Unless a test says otherwise: code runs in bank `$80` with MEMSEL=1 (FAST), native mode, DB=`$80`, D=0, I=1 (`sei`), HDMA off (`$420C`=0), auto-joypad off, WRIO `$4201`=`$FF` (the `$2137` latch only works with WRIO bit 7 set: fullsnes l.1369; ares `sfc/ppu/io.cpp` `PPU::readIO` `$2137`). "DP=$2100" means `lda $37` is `LDA dp` reading `$2137` (3 cycles: opcode, operand, read; latch in the read cycle). ### 0.2 SYNC(v,h): the sync primitive ``` stz $4200 ; NMITIMEN off ldx #h : stx $4207 ; HTIME (16-bit X) ldx #v : stx $4209 ; VTIME lda #$30 : sta $4200 ; HV-IRQ ($10 = H-IRQ every line, $20 = V-IRQ) lda $4211 ; drop a stale flag wai ; I=1: WAI ends on /IRQ without vectoring ... lda $4211 ; ack (before the next SYNC, or WAI returns at once) ``` Call it at least one line before (v,h). anomie: "It takes 12 master cycles (2 IO cycles) to end the WAI instruction" (`anomie_timing.txt` l.87-88). ares runs WAI as a loop of 6-clock idle cycles (`component/processor/wdc65816/instructions-other.cpp` `WDC65816::instructionWait()`, with `sfc/cpu/memory.cpp` `CPU::idle()`), so the wake can sit anywhere in a 6-clock window relative to the dot grid (up to ~1.5 dots of phase). Tests that need sub-dot precision record their own reference latch or repeat. ### 0.3 Reading the latched counters `READHV` = `lda $213F` (resets both flip-flops, clears the latch flag) is **not** used between latch and read unless stated; instead read `$213C` twice and `$213D` twice (`lo`, `hi_raw`). `hi_raw` is stored unmasked: bit 0 is counter bit 8, bits 1-7 are PPU2 open bus (fullsnes l.1371-1372), which is itself data for Q2/Q3. ### 0.4 Storage Bytes go to SRAM at `BASE + offset` (BASE chosen by the ROM). Before a section runs, its range is filled with `$EE`; header bit n is set when section n completes. Byte "absent" codes: `$FF` = event did not happen before its timeout. All multi-byte counts are little-endian. --- ## 1. Header (offset `$000`, 16 bytes) | Off | Bytes | Content | | --- | --- | --- | | `$000` | 4 | magic `"MSC1"` | | `$004` | 1 | spec version `$01` | | `$005` | 1 | `$4210` raw (after one discarding read): low nibble = CPU version, expect 1 | | `$006` | 1 | `$213E` raw: low nibble PPU1 version | | `$007` | 1 | `$213F` raw: low nibble PPU2 version, bit 4 = 0 NTSC | | `$008` | 2 | section-complete bitmask (bit 1 = section 2 ... bit 12 = section 13) | | `$00A` | 1 | run counter (increment per full run) | | `$00B` | 5 | `$00` | --- ## 2. Reset position (offset `$010`, 96 bytes) **Tests:** the PPU H/V position the CPU sees at the first instruction after reset (anomie credits byuu: "the SNES returns to a known timing position on reset", `anomie_timing.txt` l.11-12), plus undisbeliever's spin-loop phase counts which resolve the CPU-cycle phase finer than a dot. **Author's recorded result:** none in source. `reset-position-test.asm` prints OPVCT/OPHCT, "HBlanks until VBlank" and 36 "Loops until HBlank" counts (l.218-245); no values are recorded. **Sequence (replicates `reset-position-test.asm` l.97-190, adds SRAM).** The reset vector (`$00FFFC`) points straight at: ``` lda $2137 ; AD 37 21 - emulation mode, DB=0, PB=0, MEMSEL=0 clc : xce rep #$30 : lda #$4200 : tcd : sep #$30 ; DP=$4200, 8-bit A/X ; 36 times, unrolled, i = 0..35: ldx #0 [i != 0] -: inx : bit $12 : bvs - ; wait end of HBlank -: inx : bit $12 : bvc - ; wait start of HBlank stx counts+i ; WRAM ; then (DP=0, 8-bit A): lda $213F -> b5 ; first: latch flag bit 6 should be 1; resets flip-flops lda $213C -> b0 ; lda $213C -> b1 ; lda $213D -> b2 ; lda $213D -> b3 ; then undisbeliever's "HBlanks until VBlank" loop (l.168-190), X starts at 36 ``` Only after that: check a WRAM magic (`$7E:1FF0` = `"WARM"`): present = `$5A`, absent = `$C0` (boot kind b6); write the magic; copy to SRAM. **Cycle count, reset vector to latch.** After the cycle that reads the vector high byte (`$00FFFD`), `LDA abs` runs four cycles: opcode fetch at `$00:xxxx` (8, bank `$00` is always SLOW), operand low (8), operand high (8), then the read of `$2137` (6). The latch happens in the 4th cycle, which starts **24 master clocks after the vector-high read ends** (plus the sampling point inside the 6-clock I/O cycle; ares samples 2 clocks in: `sfc/cpu/memory.cpp` `CPU::read()` steps the cycle length less 4 before the bus read). Before the vector, ares models the reset as 132 clocks of idle then the interrupt sequence (opcode 8 + IO 6 + three stack cycles 24 + vector 16) = 186 clocks (`sfc/cpu/cpu.cpp` `CPU::main()`, `component/processor/wdc65816/instruction.cpp` `WDC65816::interrupt()`), so the model predicts the latch ~212 clocks after its reset point: about V=0, H=53. That reset point is the model's, not the console's: this probe is what pins it. Spin-loop cadence (native, SLOW, DP=$4200): `inx` 14 + `bit $12` 22 + taken `bvc/bvs` 22 = **58 clocks per iteration**; the count resolves the reset phase to 58/n clocks across the 36 lines. **Bytes (96):** | Off | Bytes | Content | | --- | --- | --- | | R+0 | 1 | next slot (0-7) | | R+1 | 1 | boot counter | | R+2 | 56 | 8 slots x 7: `Hlo, Hhi_raw, Vlo, Vhi_raw, $213F_raw, S_lo_at_entry, boot_kind` | | R+58 | 36 | spin counts, latest boot | | R+94 | 2 | HBlanks until VBlank, latest boot | `S_lo_at_entry`: `tsx` after the spin loop (S is unchanged by then). **EverDrive caveat.** The X5 boots its menu first, so the first boot of the test ROM is the menu's launch, not a hardware reset; discard slot 0 of a session. Press the console Reset button several times (short presses) and check the X5 is set to reset to the game, not to the menu; each press fills a slot. Whether SRAM reaches the SD card depends on how the X5 saves (return to menu). --- ## 3. Multiplier and divider (offset `$070`, 768 bytes) - Q5, Q6, C4, C5, U4 **What undisbeliever's `wrmpyb-in-flight.asm` tests:** a second WRMPYB write 2-9 CPU cycles after the first, result read "after waiting 8+ cycles after the second `WRMPYB` write" (l.1-15). Each gap is preceded by a `wai` on an H-IRQ at `IRQ_X_POS = DRAM_REFRESH_CYCLE / 4 + 10` = 144 so refresh is not inside the test (l.130-139, l.248-253). **Author's recorded result:** no result values. One recorded observation, not stated whether console or emulator: "If `IRQ_X_POS` is between 53 and 62 (inclusive), the test output changes every frame as the DRAM refresh occurs in the middle of one or more tests." (`wrmpyb-in-flight.asm:136-137`). Doc claims: fullsnes "wait 8 clk cycles" / "wait 16 clk cycles", "the hardware does additionally set RDDIVL=WRMPYB, and RDDIVH=00h", "Division by zero returns Result=FFFFh, Remainder=Dividend" (fullsnes l.2813-2823); anomie "What happens before the time is up (or if you initiate another multiplication/division while calculating) is unknown" (l.309-313). ares model: one step per CPU cycle (`sfc/cpu/memory.cpp`: `CPU::idle()` and `CPU::read()` step after the cycle, `CPU::write()` before it) and 5 steps in the refresh pause (`sfc/cpu/timing.cpp` `CPU::step()`, `CPU::aluEdge()`); a WRMPYB write sets RDMPY=0, a WRDIVB write sets RDMPY=dividend, and **then** the write is ignored if busy (`sfc/cpu/io.cpp` `CPU::writeCPU` `$4203`, `$4206`). ### 3.0 Common setup DP=`$4200`, DB=`$80`, A/X/Y 8-bit, I=1. Every run is synced by SYNC with NMITIMEN=`$10`, HTIME=150 (H-IRQ every line; the test sits after the refresh at ~dot 133), one run per line. Before each run the ALU is idle for at least 24 cycles and preloaded: - mul runs: `lda #A : sta $02` (WRMPYA), Y = B. - div runs: first a mul with A=0, B=0 (leaves RDDIV=0, RDMPY=0 in the ares model), then `lda #lo : sta $04 : lda #hi : sta $05`, Y = divisor. ### 3.1 Offsets 0 and 1 are unreachable Offset k = number of CPU cycles strictly between the write cycle (WRMPYB / WRDIVB) and the read cycle of a result register. No 65816 instruction reads a data address in the cycle after its own data write, except BRK/COP/IRQ, whose reads are the vectors in ROM. The next instruction always needs its opcode and operand fetches first, so the smallest offset is **2** (`LDA dp`), then **3** (`LDA abs`). Measure k = 2..18 and extrapolate to 0/1: a result at k=2 that already shows 2 steps means neither the write cycle nor the read cycle steps the ALU before the sample (ares model). ### 3.2 Offset sequences ``` sty $03 (84 03) ; mul start (or sty $06 for div); write = cycle 3 [n x nop] (EA) ; each NOP = opcode + IO = 2 cycles k = 2+2n: lda $rr (A5 rr) ; rr = $14/$15/$16/$17 k = 3+2n: lda $42rr (AD rr 42) sta ``` One result byte per run (RDDIVL `$4214`, RDDIVH `$4215`, RDMPYL `$4216`, RDMPYH `$4217`): four runs per k, stored in that order. Start of the read cycle, in master clocks after the **start** of the write cycle: | k | n | read | FAST (fetch 6) | SLOW (fetch 8) | | --- | --- | --- | ---: | ---: | | 2 | 0 | dp | 18 | 22 | | 3 | 0 | abs | 24 | 30 | | 4 | 1 | dp | 30 | 36 | | 5 | 1 | abs | 36 | 44 | | 6 | 2 | dp | 42 | 50 | | 7 | 2 | abs | 48 | 58 | | 8 | 3 | dp | 54 | 64 | | 9 | 3 | abs | 60 | 72 | | 10 | 4 | dp | 66 | 78 | | 11 | 4 | abs | 72 | 86 | | 12 | 5 | dp | 78 | 92 | | 13 | 5 | abs | 84 | 100 | | 14 | 6 | dp | 90 | 106 | | 15 | 6 | abs | 96 | 114 | | 16 | 7 | dp | 102 | 120 | | 17 | 7 | abs | 108 | 128 | | 18 | 8 | dp | 114 | 134 | FAST: read at 6 + 6k. SLOW: dp 22 + 14n, abs 30 + 14n (NOP = 8 + 6, the I/O write and read cycles stay 6). **FAST vs SLOW separates "one step per CPU cycle" (same result at the same k) from "one step per fixed number of master clocks" (SLOW shows more steps at the same k).** SLOW = the same code with MEMSEL=0. Inputs chosen so the step count s is readable from one byte (the shift-add and restoring-division order of ares `sfc/cpu/timing.cpp` `CPU::aluEdge()`): - mul `A=$FF, B=$01`: RDMPY = 2^s - 1, RDDIV = `$01FF >> s` (s<=8). - div `$FFFF / $01`, prior RDDIV=0: RDDIV = 2^s - 1, RDMPY = `$FFFF >> s` (s<=16). ### 3.3 Sub-tests and bytes | Id | Off (abs) | What | Bytes | | --- | --- | --- | ---: | | 3a | `$070` | mul FAST, A=`$FF` B=`$01`, k=2..10, 4 bytes each (L/H of RDDIV, RDMPY) | 36 | | 3b | `$094` | mul FAST, A=`$A5` B=`$5A`, k=2..10 | 36 | | 3c | `$0B8` | mul SLOW, A=`$FF` B=`$01`, k=2..10 | 36 | | 3d | `$0DC` | div FAST, `$FFFF/$01`, k=2..18 | 68 | | 3e | `$120` | div FAST, `$1234/$56` (q=`$0036`, r=`$0010`), k=2..18 | 68 | | 3f | `$164` | div SLOW, `$FFFF/$01`, k=2..18 | 68 | | 3g | `$1A8` | div by zero, k=24 (12 NOPs + dp): dividends `$0000, $000C, $1234, $FFFF` x 4 bytes | 16 | | 3h | `$1B8` | div by zero partial: prior mul A=`$00` B=`$A5` (RDDIV=`$00A5`), `$1234/0`, k=2,5,9,13,17 x 4 bytes | 20 | | 3i | `$1CC` | undisbeliever replica (below): 10 rows x 8 gaps x [RDMPYL, RDMPYH] | 160 | | 3j | `$26C` | WRDIVB restart: `$FFFF`, d1=`$01`, d2=`$07`, gap g=2..17, 4 bytes after 24 cycles | 64 | | 3k | `$2AC` | WRDIVB during mul: mul `$FF x $FF`, WRDIV preset `$FFFF`, WRDIVB=`$07` at g=2..9, 4 bytes | 32 | | 3l | `$2CC` | WRMPYB during div: div `$FFFF/$01`, WRMPYA preset `$FF`, WRMPYB=`$01` at g=2,4..16, 4 bytes | 32 | | 3m | `$2EC` | WRMPYA=`$00` written mid-mul (`$FF x $01`) at g=2..7, [RDMPYL, RDMPYH] | 12 | | 3n | `$2F8` | WRDIVH=`$00` written mid-div (`$FFFF/$01`) at g=2,4,6,8,10,12, 4 bytes | 24 | | 3o | `$310` | refresh inside the window (below): 32 HTIME x [RDDIVL, RDDIVH, Hlo] | 96 | "4 bytes" = RDDIVL, RDDIVH, RDMPYL, RDMPYH, read with 8-bit `lda $14..$17` (all at least 20 cycles after the last write, so order does not matter). Gap g = cycles strictly between the two write cycles: `sty dp` gives 2+2n, `sty abs` gives 3+2n, with n NOPs before. Predictions to compare against (ares model, above): 3a s=k, so RDMPYL k=2..8 = `$03,$07,$0F,$1F,$3F,$7F,$FF`; 3g q=`$FFFF`, r=dividend (fullsnes agrees; MAME's remainder `$000C` is C5); 3h RDDIV = `($00A5 << k | (2^k-1)) & $FFFF`, RDMPY=`$1234` throughout. ### 3.4 3i: undisbeliever replica Exactly `RunOneTest` (`wrmpyb-in-flight.asm` l.222-325): DP=`$4200`, 16-bit A holding `B1<<8 | A`, 8-bit X/Y. ``` wai ; (here: SYNC H-IRQ HTIME=150, polled) sta $02 ; 16-bit: $4202=A then $4203=B1 (mul starts on the 2nd write) [filler] ; g=2: none + sty $03 | g=3: none + sty $4203 ; g=4: nop + sty $03 | g=5: nop + sty $4203 ... g=9: 3 nops + sty $4203 sty $03 / sty $4203 ; Y = B2 nop x4 ; "Wait 8 cycles" ldx $16 -> store ; ldx $17 -> store ``` Rows (author's defaults `test_a = test_b1 = $FF`, l.620-626, and the 9 B2 values `$80 >> i` of l.376-384): (A,B1,B2) = (`$FF,$FF,$FF`), then B2 = `$80,$40,$20,$10,$08, $04,$02,$01,$00`. Gaps 2..9. Bytes: row-major, gap-minor, RDMPYL then RDMPYH. ares model prediction (`sfc/cpu/memory.cpp` `CPU::write()`, `sfc/cpu/io.cpp` `$4203`): the second write steps the ALU once (aluEdge before the write), clears RDMPY, and is ignored while busy. So for g <= 6 the result is `B1 * ($FF - (2^(g+1) - 1))` whatever B2 is (g=2: `$F708`), and for g >= 7 it is `A * B2`. The SNESdev forum note "Writing $4203 twice too fast gives erroneous result (not emulated)" (C4) says this model is incomplete here. ### 3.5 3o: does the refresh pause step the ALU? For HTIME h = 104..135 (32 values), one line each: ``` SYNC H-IRQ (NMITIMEN=$10, HTIME=h) sty $06 ; div $FFFF/$01 starts lda $4214 ; k=3 (run A) -- run B identical but lda $4215 sta lda $2137 ; abs: latch, run A only ``` Store RDDIVL (run A), RDDIVH (run B), H low of run A's latch (read later via `$213C` x2). Arithmetic (anomie IRQ point `14+4h`, wake 12, FAST): the window between the write and the read spans clocks `4h+44 .. 4h+62` after dot 0, so the refresh (ares v1: clock 530, `sfc/cpu/cpu.cpp` `CPU::power()`) lands inside for h about 117-121; anomie's 536-538 moves that about 2 dots later. Outside: s=3, RDDIVL=`$07`. Inside, if the pause gives 5 steps (ares `CPU::step()`): s=8, RDDIVL=`$FF`, RDDIVH=`$00`. Other values = a different refresh shape (C3). The h where it flips locates the refresh to about 4 clocks, which also answers Q11 (section 6) independently. --- ## 4. `$213C/$213D` flip-flops, `$213F` reset, WRIO latch (offset `$370`, 40 bytes) - Q3, U5 **Claims:** "There are two separate 1st/2nd-read flipflops (one for OPHCT, one for OPVCT)" (fullsnes l.1373); "Reading from this register [$213F] also resets the latch flag (bit6), and resets the two OPHCT/OPVCT 1st/2nd-read flipflops" (fullsnes l.1400-1401); WRIO bit 7 1-to-0 latches "1 dot later than if the same memory access cycle were reading $2137" (anomie l.20-22). ares model: latching does not reset the flip-flops (`sfc/ppu/io.cpp` `PPU::latchCounters()`); the 2nd read returns `(previous PPU2 value & $FE) | bit8` (`PPU::readIO` `$213C`, `$213D`). No author result (not an undisbeliever test). **Sequences** (DP=`$2100`, FAST, any frame time, force blank fine): | Id | Sequence | Stores | | --- | --- | --- | | F1 | `lda $3F` ; `lda $37` ; `lda $3C` x4 ; `lda $3D` x4 | 8 | | F2 | `lda $3F` ; `lda $37` ; `lda $3C` ; `lda $3D` ; `lda $3C` ; `lda $3D` | 4 | | F3 | `lda $3F` ; `lda $37` ; `lda $3C` ; `lda $3F` (stored) ; `lda $3C` | 3 | | F4 | `lda $3F` ; `lda $37` ; `lda $3C` (store) ; `lda $37` ; `lda $3C` (store) | 2 | | F7 | `lda $3F` ; `lda $3F` (store) ; `lda $37` ; `lda $3F` (store) ; `lda $3F` (store) | 3 | | U5 | 8 pairs on lines V=50..57, SYNC(V,100) each: line A: `lda $2137` (abs, 4 cycles) ; line B (next frame, same V,H): `stz $4201` (abs, 4 cycles, write `$00` = 1-to-0) then `lda #$FF : sta $4201`. Store H low of each | 16 | Every stored value is the raw byte. Expected (fullsnes): F1 = lo, hi, lo, hi (H) then lo, hi, lo, hi (V); F2 = Hlo, Vlo, Hhi, Vhi (independent flip-flops); F3 third byte = lo again; F4 second = hi (latch does not reset, ares model) or lo (if it does); F7 = bit 6 `0, 1, 0`. U5: B - A = +1 dot per anomie, up to wake jitter (8 pairs). **Layout:** Q+0 F1 (8), Q+8 F2 (4), Q+12 F3 (3), Q+15 F4 (2), Q+17 F7 (3), Q+20 U5 (16, A,B pairs), Q+36 4 bytes `$00`. Q = `$370`, ends `$398`. --- ## 5. WRAM-to-WRAM DMA via `$2180` (offset `$3A0`, 88 bytes) - C7, U3, Q19 **Claims:** "WRAM-to-WRAM DMA isn't possible (neither in A-Bus to B-Bus direction, nor vice-versa). Externally, the separate address lines are there, but the WRAM chip is unable to process both at once." (fullsnes l.408-410). ares model, "transfers from WRAM to WRAM are invalid": A-to-B reads the A byte but drops the `$2180` write (WMADD does not advance); B-to-A returns `$00` without touching `$2180` and writes `$00` to the A address (`sfc/cpu/dma.cpp` `Channel::transfer()`, `readB()`, `writeB()`). What a console does: not recorded anywhere pinned. No author test. **Setup:** channel 0, DAS0 = 8, BBAD0 = `$80`, mode 0 (1 register), A-address increment. Pre-fill `$7E:3000-$301F` with `$C0..$DF` and `$7E:3100-$311F` with `$30..$4F`; A-to-B sources hold `$10..$17`; B-to-A destinations pre-filled `$AA`. Start with `lda #$01 : sta $420B`. Read results back with long WRAM reads (`lda $7E3000,x`), not `$2180`. "probe" = one read of `$2180` right after the DMA (no WMADD write): it returns the byte at wherever WMADD was left, so it shows whether the DMA advanced WMADD. | Id | Off | Direction, A address, WMADD | Stores | Bytes | | --- | --- | --- | --- | ---: | | W1 | +0 | A to B, ROM `$81:xxxx` (`$10..$17`), WMADD=`$7E:3000` (control) | `$7E:3000-3007`, probe | 9 | | W2 | +9 | A to B, `$7E:2100`, WMADD=`$7E:3000` | same | 9 | | W3 | +18 | A to B, `$00:1E00` (low mirror of `$7E:1E00`), WMADD=`$7E:3000` | same | 9 | | W4 | +27 | A to B, `$7F:2100`, WMADD=`$7E:3000` | same | 9 | | W5 | +36 | B to A (DMAP=`$80`), WMADD=`$7E:3100`, A=`$7E:2200` | `$7E:2200-2207`, probe, `$7E:3100-3107` | 17 | | W6 | +53 | B to A, WMADD=`$7E:3100`, A=`$00:1E40` | `$7E:1E40-1E47`, probe, `$7E:3100-3107` | 17 | | W7 | +70 | B to A, WMADD=`$7E:3100`, A=SRAM scratch (control) | the 8 SRAM bytes, probe | 9 | | W8 | +79 | A to B, A=`$7E:3000` and WMADD=`$7E:3000` (same bytes) | `$7E:3000-3007`, probe | 9 | Re-fill the pre-fill regions before each run. Readings: W1 control = `$10..$17`, probe `$C8`. ares model: W2-W4/W8 dest unchanged `$C0..$C7`, probe `$C0`; W5/W6 dest = `$00` x 8, probe `$30`, source unchanged; W7 = `$30..$37`, probe `$38`. Anything else (open-bus bytes, `$FF`, advanced WMADD with no write) is the console's answer to U3. Range `$3A0-$3F7`. --- ## 6. DRAM refresh and short line: free-running H sampler (offset `$400`, 420 bytes) - Q11, C2, C3, Q22 **Claims:** "The CPU is paused for 40 cycles beginning about 536 cycles after the start of each scanline ... the refresh pause begins at 538 cycles into the first scanline of the first frame, and thereafter some multiple of 8 cycles after the previous pause that comes closest to 536." (anomie l.68-72). ares model: version 1 = fixed 530 every line (`sfc/cpu/cpu.cpp` `CPU::power()`), version 2 = `530 + 8 - dmaCounter()` recomputed per line (`sfc/cpu/timing.cpp` `CPU::scanline()`). Short line: "scanline $f0 of every other frame (those with $213f.7=1) is only 1360 cycles" (anomie l.62-63); wiki "Short scanline: NTSC with interlace off, field=1, V=240" ... "340 dots of 4-clocks" (`Timing.wiki` l.39, l.49). Author's result: none (the wrmpyb note at l.136-137 is the only refresh observation). ### 6.1 The sampler unit (7 ROM bytes, 74 clocks, FAST) DP=`$2100`, A and X 8-bit, S pointed at a WRAM bank-0 buffer (`$1FFF` down). ``` lda $37 A5 37 op 6 + operand 6 + read $2137 6 = 18 latch (in the read) lda $3C A5 3C 18 H low pha 48 op 6 + IO 6 + write WRAM 8 = 20 store ldx $3C A6 3C 18 H bit 8 (discarded) = 74 clocks = 18.5 dots per sample ``` The `ldx $3C` is required: the latch does not reset the flip-flop (ares model), so without the second read every other sample would return the high byte. A `$213F` read would cost the same 18 clocks. Unroll 96 units (672 ROM bytes). Normal spacing between latched H values is 18 or 19 dots; a sample pair that straddles the refresh is 28 or 29 dots apart (114 clocks). With 96 samples the run covers about 5.3 lines, so it sees 5 refreshes and every line start. `pha` stores in reverse; the ROM copies the buffer to SRAM in time order. ### 6.2 Runs Each run: wait for VBlank, read `$213F` at V about 230 (field bit of the current frame), if it is not the wanted parity wait a frame, then SYNC(239, 10) (HV-IRQ), optional prelude, then the 96 units. The short line (V=240) is inside every run; it is short only on the field=1 frame. | Run | Off | Field wanted | Prelude | Bytes | | --- | --- | --- | --- | ---: | | S1 | +0 | 0 | none | 1 (`$213F` raw) + 96 | | S2 | +97 | 1 | none | 97 | | S3 | +194 | 0 | `lda $00` (reads `$2100`, open bus, 18 clocks) | 97 | | S4 | +291 | 1 | `lda $00` | 97 | | S' | +388 | 8 consecutive frames | below | 24 | | - | +412 | | `$00` | 8 | **S' (cross-check, cheap):** each of 8 consecutive frames: SYNC(239,100), `lda $37` (latch: H_start), then `ldx #$0100 : -: dex : bne -` (16-bit X; 30 clocks per iteration, 7680 clocks, about 5.6 lines, crosses V=240), then `lda $37` (H_end). Store `$213F_raw, H_start_lo, H_end_lo` per frame. Expected: H_end - H_start is one dot larger on field=1 frames (line 240 is 4 clocks shorter, so everything after it is 4 clocks later relative to its line). ### 6.3 Analysis Convert each latched dot to a clock within the line (dots 323 and 327 are 6 clocks on normal lines and 4 on the short line: anomie l.326-327, ares `sfc/ppu/counter/inline.hpp` `PPUcounter::hdot()`). Sample times are `t0 + 74 i + 40 r_i` (r_i = refreshes before sample i). Per line: the refresh lies between the two samples whose spacing is 114; with S1/S3 (prelude shifts the cadence by 18 clocks) and the per-line drift of the cadence ((1364 + 40) mod 74 = 72, so -2 clocks per line), the refresh start is bracketed to about one CPU cycle. Compare the 5 lines of each run: a fixed position (ares model, v1) or a position that wanders by multiples of 8 (anomie/v2). S1 vs S2 (and S3 vs S4): identical up to V=240 dot ~323, then a one-dot shift on the field=1 run = the short line. Section 3.5 gives the refresh position independently, to 4 clocks. **Byte budget:** 4 x 97 + 24 + 8 = 420. Range `$400-$5A3`. --- ## 7. IRQ and NMI landing positions (offset `$5B0`, 202 bytes) - Q12, Q13 **Claims:** "If H=0, $4211 bit 7 gets set 1374 master cycles after dot 0.0 of the previous scanline. Otherwise, it gets set 14+H*4 master cycles after dot 0.0 of the current scanline ... no IRQ will trigger for dot 153 on the short scanline in non-interlace mode, and no IRQ will trigger for dot 153 on the last scanline of any frame." (anomie l.118-123). "The internal timer will set its NMI output low at H=0.5 at the beginning of V-Blank" (l.94-95); after a DMA "there is a 24-30 cycle delay between the end of DMA and the NMI handler, time enough for an instruction or two" (l.102-105). The ares model instead forbids only the last dot of a field (`sfc/cpu/irq.cpp` `CPU::irqPoll()`: "IRQs cannot trigger on last dot of fields"), a different rule from anomie's dot 153. Author's results: none (undisbeliever's only datum is "Mesen-S event viewer shows 24 dots between IRQ triggering and the store to INIDISP", `inidisp_enable_display_mid_frame.asm:434`, an emulator reading). ### 7.1 7a: H landing per HTIME, polled (155 bytes, off +0) HTIME list (31): `0,1,2,3,4,5,8,16,100,101,102,103,152,153,154,255,256,257, 321,322,323,324,325,326,327,328,329,338,339,340,511`. Two reps (VTIME=100 and 101, one frame each). ``` SYNC(100+rep, h) ; HV-IRQ, I=1 lda $37 ; DP=$2100: latch on the 3rd cycle after the wake lda $4211 ; ack (abs) lda $213C x2, lda $213D x1 (rep 0 only), lda $213F (reset flip-flops) ``` For HTIME 340 and 511 do not `wai` (it would hang): poll `$4211` bit 7 for two frames; if never set store `$FF $FF $FF` / `$FF $FF`. Per HTIME: rep0 `Hlo, Hhi_raw, Vlo`, rep1 `Hlo, Hhi_raw` = 5 bytes, 31 x 5 = 155. Rough expectation (anomie IRQ point + 12-clock wake + `LDA dp` 12 + ~2): latch about 4h + 40 clocks after dot 0, so **H about h + 10** (h=0: about dot 12 of V=100), with up to a dot of wake jitter (that is what the two reps show) and the long dots shifting h >= 323. ### 7.2 7b: through the IRQ vector (18 bytes, off +155) HTIME `1, 100, 153, 256, 323, 339`, VTIME=100: as 7a but `cli : wai`; native IRQ vector `$00FFEE` points to a bank-`$00` (SLOW) handler whose **first** instruction is `lda $37` (DP=`$2100` inherited), then ack `$4211`, store `Hlo, Hhi_raw, Vlo`, `rti`. Entry cost: opcode fetch at the interrupted PC (6, FAST) + IO 6 + 4 pushes to WRAM 32 + vector 2 x 8 = 60, then `LDA dp` 16 + ~2: **H about h + 26**. (anomie: the first cycle is "an opcode fetch cycle from PB:PC ... not an IO cycle", l.191-193.) ### 7.3 7c: the dot-153 rule (6 bytes, off +173) For (HTIME,VTIME) = `(153,240), (152,240), (154,240), (153,261), (152,261), (153,100)`: HV-IRQ, I=1, no WAI; poll `lda $4211 : bpl` and count rising flags over exactly 4 frames (frames counted by `$4212` bit 7 rising). Store the count (1 byte each). anomie predicts `2, 4, 4, 0, 4, 4` (the short line is on the 2 field=1 frames); the ares rule predicts `4, 4, 4, 4, 4, 4`. ### 7.4 7d: NMI (23 bytes, off +179) | Id | Off | Sequence | Stores | | --- | --- | --- | --- | | N1 | +179 | NMITIMEN=`$80`, `sei : wai`; NMI vector `$00FFEA` handler: first `lda $37`, then `lda $4210`, `rti` | `Hlo, Hhi_raw, Vlo` (3) | | N2 | +182 | SYNC(224, 250), ack, NMITIMEN=`$80`, then a 128-NOP sled starting at `$xx00` (FAST, 12 clocks each). Handler: `lda $37`, then `lda $02,s` (stacked PCL) | `PCL - sled_lo, Hlo, Hhi_raw, Vlo` (4) | | N3 | +186 | SYNC(224, 300), ack, NMITIMEN=`$80`, DMA ch0 ROM to `$2180` (WMADD = `$7E:4000`), DAS = n, `sta $420B`, then the same NOP sled. n = 16, 32, 64, 128 | 4 bytes as N2, per n (16) | N1 expectation: NMI at V=225 H=0.5, then 12 (wake) + 60 (entry) + 18: about V=225 H=23. N2: the stacked PC says which NOP the NMI followed and the latch says when. N3: DMA starts about 15 dots after the sync and runs 8n + 16 clocks plus alignment (anomie l.207-221), so for every n the NMI falls during the DMA; anomie predicts the handler 24-30 clocks after the DMA ends, so the stacked PC is sled index 1 or 2 ("After $420b is written, the CPU gets one more CPU cycle before the pause", l.207-208). Range `$5B0-$679`. --- ## 8. Lines per frame and field bit (offset `$680`, 24 bytes) - Q22 **Claim:** "Frames are 262 scanlines in non-interlace mode, while in interlace mode frames with $213f.7=0 are 263 scanlines." (anomie l.64-65). No author test. **Sequence:** display on (INIDISP=`$0F`, TM=0, black). SETINI=`$00` for 4 consecutive frames, then SETINI=`$01` (interlace), skip one frame, 4 more. Each frame: at V about 100 read `$213F` (store raw), then loop `lda $37 ; read $213D twice ; keep max` until V decreases; store `maxV lo, maxV hi_raw`. **Bytes:** 8 frames x `($213F_raw, maxVlo, maxVhi_raw)` = 24. Expect 261 (`$05`, bit 0 of hi = 1) every non-interlaced frame and 262 on interlaced frames with field bit 0. Range `$680-$697`. --- ## 9. PPU memory written outside blanking (offset `$6A0`, 285 bytes) - CPU-measurable part of `vram-mid-scanline-test`, `inidisp_forgot_to_force_blank*` (Q15, Q16, U2) **What the author's tests do:** `vram-mid-scanline-test.asm` writes 3072 words of `$1234` to VMDATA after VBlank ends, every frame, and shows "WHITE: VRAM writes are ignored / RED tiles: VRAM writes change VRAM (and/or corrupt VRAM)" (l.4-7, l.124-135). `inidisp_forgot_to_force_blank.asm` and `_2` turn the display on, then upload VRAM, CGRAM and OAM by DMA during the visible frame (V=40 in the first, V=103 H=137 in `_2`: "This position produces a nice looking glitch") and show the corruption. **Author's recorded result: none** (the outputs are on screen). snes-python's MAME vs Mesen2 comparison (both run as closed boxes, OBSERVED) differs by 36,376 pixels on `inidisp_forgot_to_force_blank` (`docs/validation.md`): the detectors disagree, a console decides. ares model prediction (`sfc/ppu/io.cpp` `PPU::writeVRAM()`, `readOAM()`, `writeOAM()`, `writeCGRAM()`): VRAM writes dropped while the display is on and V < 225 (HBlank included); OAM reads/writes go to the PPU's own current OAM address for the whole rendering period; CGRAM writes go to the PPU's current palette address only for clocks 88-1095 of lines 1-224 (HBlank writes land normally). ### 9.1 Setup (force blank, VBlank) BG mode 0, BG1 tilemap at `$0000` all tile 1, tile 1 (2bpp at `$1000`) with every row bitplane0=`$55`, bitplane1=`$33` (pixels cycle colours 0-3), TM=`$11` (BG1+OBJ). OAM baseline: low table bytes `$F0` (all sprites at Y=240, off-screen), high table `$00`. CGRAM baseline all `$00`. VRAM test region `$2000-$21FF` = `$0000`. Then INIDISP=`$0F`. ### 9.2 Runs Three runs per memory, each on its own frame: **run0 active** = SYNC(100, 20), **run1 HBlank** = SYNC(100, 276), **run2 control** = SYNC(230, 20) (VBlank). - **VRAM:** VMAIN=`$80`, VMADD=`$2000` set before the SYNC. Burst: `stx $18 : inx` (16-bit X, value `$A000+i`; 36 clocks per word), 64 words (run1: 4 words). After the burst, in the next VBlank under force blank, write the marker word `$BEEF` without touching VMADD. Then read back `$2000-$21FF`. - **CGRAM:** CGADD=`$40` before the SYNC. Burst: `lda #v : sta $22` with v = `$01..$10` (30 clocks per byte), 16 bytes (run1: 6). Marker: in the next VBlank under force blank write `$55, $2A` without touching CGADD. Read all 512 bytes back (CGADD=0, 512 reads of `$213B`). - **OAM:** OAMADD=`$0040` (byte `$080`) before the SYNC. Burst: `lda #v : sta $04`, v = `$C1..$D0`, 16 bytes (run1: 6). Marker: **immediately** after the burst set force blank (`lda #$8F : sta $00`) and write `$AA, $55` (the VBlank OAM address reload would otherwise hide where the address was left). Read all 544 bytes back in VBlank. ### 9.3 Bytes | Memory | Off | Per run | Runs | Bytes | | --- | --- | --- | ---: | ---: | | VRAM | `$6A0` | marker word index from `$2000` (2, `$FFFF` = not found), changed-word count in `$2000-$20FF` (1), first 4 changed words x (offset lo, value lo, value hi) (12) | 3 | 45 | | CGRAM | `$6CD` | changed-byte count (2), first 12 x (addr lo, addr hi, value) (36), marker byte address (2) | 3 | 120 | | OAM | `$745` | changed-byte count (2), first 12 x (addr lo, addr hi, value) (36), marker byte address (2) | 3 | 120 | "Changed" = differs from the baseline. Range `$6A0-$7BC`. --- ## 10. `$213E` overflow flags: CPU-measurable `object-dropout-test` (offset `$7C0`, 56 bytes) - Q17 **What it tests:** `object-dropout-test.asm` (v3) draws five OAM groups: 36 small sprites on one line (32-sprite limit), 12 staggered 32x32 sprites (34 sliver limit), the same flipped, 8 sprites at X=256 + 32 on-screen (do X=256 sprites count toward 32?), 8 on-screen 32x32 + 4 at X=256 (do their slivers count toward 34?) (l.186-300; high table l.307-330). OBSEL size 8x8/32x32. **Author's recorded result:** not in the source; the snesdev wiki cites it: "Hardware test by undisbeliever verifying 32 sprite, 34 sliver, and x=-256 behaviours" (`Sprites.wiki:100`), stating "off-screen sprites with an X coordinate -256 ($100) will count towards this limit" (`Sprites.wiki:38`) and "if the sprite is placed at X coordinate -256 ($100) all of its slivers will be counted against the limit, regardless" (`Sprites.wiki:45`). His console(s), not yours. Flag timing: "Bit6 when V=OBJ.YLOC/H=OAM.INDEX*2, bit7 when V=OBJ.YLOC+1/H=0"; "cleared at end of V-Blank, but NOT during forced blank" (fullsnes l.1389-1392). **Scenarios** (each loaded alone, all other sprites `$F0` bytes as in his `fill (128 - __nObjects) * 4, -16`; same X/Y/size per sprite as his macros): | Id | OAM | fullsnes/wiki expectation `$213E` bits 7,6 | | --- | --- | --- | | D1 | TimeOverflowTest (36 x 8x8, l.157-181) | 0,1 | | D2 | RangeOverflowTest (12 x 32x32, l.184-204) | 1,0 | | D3 | RangeOverflowTest_Flipped (l.207-227) | 1,0 | | D4 | X256 SpritesPerScanline (8 at X=256 + 32, l.230-246) | 1,1 (if X=256 counts for both) | | D5 | X256 TilesPerScanline (8 x 32x32 + 4 at X=256, l.249-264) | 1,0 | | D6 | D4 with the 8 sprites at X=`$1C0` (-64, fully off left) | 0,0 | | D7 | D5 with the 4 sprites at X=`$1C0` | 0,0 | **Sequence:** load OAM in VBlank under force blank, INIDISP=`$0F`, OBSEL = `$23` (8x8/32x32, base `$6000`), TM=`$10`. Wait for VBlank end. Poll (DP=`$2100`): `-: lda $3E : and #$C0 : beq -` (48 clocks per loop, 12 dots); on exit `lda $37` immediately, store the flag byte; then poll for the remaining bit the same way. Exit both loops on VBlank (`$4212` bit 7). In VBlank read `$213E`. **Bytes per scenario (8):** `final $213E raw`, first rise `($213E raw, Vlo, Hlo, Hhi_raw)`, second rise `(Vlo, Hlo, Hhi_raw)` (`$FF` x3 if none). 7 x 8 = 56. The latched H is about 4-16 dots after the true set point (poll + latch); fullsnes predicts D1 bit 6 at H = 32 x 2 = 64 on the band's first line. Range `$7C0-$7F7`. **Needs a photo:** which slivers drop (highest priority first, Errata l.10), and the flipped variant's dropout pattern. --- ## 11. Enabling the display mid-frame (offset `$800`, 27 bytes) - CPU-measurable part of `inidisp_enable_display_mid_frame` **What it tests:** an H/V IRQ turns force blank off at a user-chosen (x, y) each frame (l.84-100), across BG modes 0/1/3 with and without sprites. **Author's recorded result:** "Mesen-S event viewer shows 24 dots between IRQ triggering and the store to INIDISP. -16 dots for tile buffer pre-load. -8 dots produces the most interesting glitches on my SFC." (l.434-436): the glitch is on screen. anomie: "At the beginning of V-Blank if force-blank is disabled, the internal OAM address is reset to the value last written to $2102-3 ... byuu reports the reset occurs on any 1->0 transition of $2100 bit 7." (l.376-379). The ares model resets at the start of V-Blank when not force-blanked (`sfc/ppu/object.cpp` `Object::scanline()`) and otherwise only on an INIDISP write while force-blanked at V=225 (`sfc/ppu/io.cpp` `PPU::writeIO` `$2100`), not on every 1-to-0 transition. **E1 (21 bytes, +0):** OAM: 33 small sprites at Y=59 (lines 60-67), rest `$F0`. Force blank from VBlank. SYNC(59, h) for h in `0, 32, 64, 66, 128, 274, 330`, then `lda #$0F : sta $2100`. Then poll `$213E` bit 6 as in section 10. Store `Vlo, Hlo, Hhi_raw` of the first rise (`$FF` x3 if none). Shows from which line and dot sprite evaluation runs after the display is switched on. **E2 (6 bytes, +21):** OAM filled with byte = address & `$FF`. Each case: under force blank set OAMADD=`$0010` (byte `$20`), read `$2138` four times (address now `$24`), then: | Case | Then | Read `$2138` once under force blank, store | | --- | --- | --- | | a | stay force-blanked through V=225 | at V=230 (`$24` = no reload, `$20` = reload) | | b | display on from V=200 through V=225 | at V=230 after setting force blank | | c | force blank; at V=225 H=100 write `$0F`, at V=226 write `$8F` | then | | d | force blank; at V=100 H=100 write `$0F` then at once `$8F` | then (1-to-0 mid-frame) | | e | as d but `$8F` written one line later (V=101 H=100) | then (where the PPU left the address) | | f | force blank; at V=230 write `$0F` then `$8F` | then (1-to-0 in VBlank) | Range `$800-$81A`. **Needs a photo:** the first-line tile/brightness glitch the author shows. --- ## 12. INIDISP early-read glitch: exploratory CPU check (offset `$820`, 12 bytes) **What the author's tests do:** `inidisp-early-read-glitch/` writes `$2100` in a tight loop with different values on the data bus just before (`stx $20FF` with X=`$0F8F`, `$0F00`, `$0F0F`, `$8F0F`; `sta $802100`; `sta $0F2100`), and `inidisp-early-read-glitch-hdma/` does the same by HDMA. The effect is a sprite glitch on screen. Recorded: "This test does not show any glitches" (`inidisp-hammer-0f0f.asm:3`); "This test confirms there are no corrupted tiles when using the `sta $0f2100` mitigation" (`inidisp-hammer- long-0f2100.asm:3-4`); "This test does not glitch on my console." (`hdma-2100-glitch-2ch-0a.asm:6`). Mechanism per the wiki: "the PPU doesn't wait for the value to be put on the bus ... rendering about one pixel where INIDISP has been set to whatever was on the data bus before" (`Errata.wiki:18`). **Is it CPU-measurable?** Mostly no: a one-pixel force blank changes pixels, not memory. The only CPU-visible handle is the overflow flags, if a one-pixel force blank during range evaluation or sliver fetch changes a line's counts. Cheap exploratory probe: OAM: 32 small sprites on lines 100-107 (exactly the limit), 17 16x16 sprites on lines 150-165 (exactly 34 slivers; OBSEL size 8x8/16x16). Correct render: `$213E` bits 6,7 = 0. Variants, each for 16 frames: G1 hammer `stx $20FF` with X=`$0F8F` from V=1 to V=224 (`-: stx $20FF : bit $4212 : bpl -`), G2 X=`$0F0F` (control, author: no glitch), G3 `sta $0F2100` long with A=`$0F` (mitigation). Read `$213E` each VBlank. **Bytes:** per variant a 16-bit mask of frames with bit 6 set and a 16-bit mask with bit 7 set = 4; 3 x 4 = 12. Range `$820-$82B`. A non-zero mask on G1 with zero masks on G2/G3 would be the first CPU-side evidence; zero masks prove nothing. **Needs a photo:** the glitch itself, and all `inidisp-early-read-glitch-hdma/` variants. --- ## 13. IPL transfer speed (offset `$830`, 27 bytes) - U8 (partial) **What's in `hardware-tests/audio/`:** only `ipl-speed-test.asm`. It needs no sound driver: it sends 32768 bytes (`fill 128, i` for i = 0..255) to ARAM `$0200` through the S-SMP IPL ROM protocol and prints the number of VBlanks the transfer took (l.1-5, `MeasureIpl` l.124-186, `_IplWriteLoop` l.196-241). **Author's recorded result:** none. **Sequence:** as his `Main` (l.274-341): NMI on (handler increments a frame counter), `TestSetup` (wait for `$BBAA`), then per run: `wai` twice (start at a VBlank), latch (`lda $2137`) and store `Hlo, Hhi_raw, Vlo, Vhi_raw`, run `MeasureIpl` exactly (same loop, same FAST setting, the loop timing is the measurement), latch again at the final acknowledge, store the 4 counter bytes and the frame-counter delta. Three runs back to back (the IPL accepts new transfers after each). **Bytes:** 3 x (frames 1 + start 4 + end 4) = 27. Range `$830-$84A`. Elapsed master clocks = frames x 357,368 (+/- the short line) + the counter difference; the S-SMP side is the IPL's fixed loop, so the elapsed time tracks the S-SMP clock relative to the master clock (the resonator ratio of U8), coarsely (the CPU loop and port polling dominate the rest). --- ## 14. Byte map | Section | Off | Size | | --- | --- | ---: | | 1 Header | `$000` | 16 | | 2 Reset position | `$010` | 96 | | 3 Mul/div | `$070` | 768 | | 4 `$213C/D/F`, WRIO | `$370` | 40 | | 5 WRAM-WRAM DMA | `$3A0` | 88 | | 6 Refresh/short-line sampler | `$400` | 420 | | 7 IRQ/NMI | `$5B0` | 202 | | 8 Lines per frame | `$680` | 24 | | 9 PPU writes outside blanking | `$6A0` | 285 | | 10 `$213E` flags | `$7C0` | 56 | | 11 Mid-frame display enable | `$800` | 27 | | 12 INIDISP early read (exploratory) | `$820` | 12 | | 13 IPL speed | `$830` | 27 | | **Total** | | **2,123 bytes (`$84B`)** | Within the ~3 KiB budget with ~900 bytes spare. If space is short, cut in this order: 3b and 3e (second input sets, -104), section 6 runs S3/S4 (-194), 3i rows 2-9 (keep row 1 and B2=`$00`, -128). --- ## 15. Needs a photo (the CPU cannot measure these) - `inidisp_brightness_0.asm`: "brightness 0 is not black on a SNES console" (l.1): analog output level. - `inidisp_brightness_delay.asm`: "the brightness delay on a RGB modded 1-chip console" (l.1); Errata: "On a 3-chip SNES, it may only take a few pixels ... on a 1-chip SNES it may be a gradual fade that takes 72 pixels or more" (`Errata.wiki:16`). Analog. Your 3-chip console should show the short form. - `inidisp_enable_display_mid_frame.asm`: the first-line tile and brightness glitch (section 11 measures only sprite evaluation and the OAM address). - `inidisp_forgot_to_force_blank*.asm`: the pixels drawn while the uploads land (section 9 measures where the bytes went). - `object-dropout-test.asm`: which slivers drop, flipped vs unflipped (section 10 measures the flags and their timing). - `inidisp-early-read-glitch/*`, `inidisp-early-read-glitch-hdma/*`: the one-pixel glitch itself (section 12 is only a long shot). - `setini-early-read-obj.asm`: HDMA writes `$02` to COLDATA then `$00` to SETINI; an early read briefly sets OBJ interlace and garbles sprite tiles. The HDMA write lands at dot ~278 (sliver fetch, not range evaluation), and OBJ interlace changes which tile row is fetched, not how many: no flag changes. Recorded: "~60% of the time on my 3-chip 2/1/3 SFC console and ~30% of the time on my 1-chip SFC console" (l.11-12). Several resets per photo. - `setini-early-read-mode7ex.asm`: EXTBG toggled by an early read shows red or blue dots. Recorded: "~20% of the time on both my 3-Chip 2/1/3 SFC console and my 1-Chip SFC console" (l.24-25). Pure pixel effect. - From the open items: U9 (first hi-res sub-screen dot) and U10 (brightness curve) are photographs too.