# Undocumented behaviour, revision differences, contradictions, open items ## The CPU (6507 against the NMOS 6502) The 6507 is the 6502 die with A13–A15, IRQ, NMI, SO and SYNC not bonded out. 6502-python's `MOS6502` is it unchanged: the board masks addresses to 13 bits and never requests an interrupt. BRK still works (vector $FFFE → $1FFE). The PC stays 16 bits; MAME and Stella both show it that way. The undocumented opcodes behave as on any NMOS 6502 (SingleStepTests `6502/v1`); a handful of homebrew use LAX/SAX/DCP. ANE/LXA constants vary by chip: the 6502-python default ($EE) stands until a 2600 test needs otherwise. ## The bus - **TIA reads drive only D7/D6** and leave D5–D0 floating; the value read there is normally the last byte on the bus (the instruction's last operand byte). Some chips pull floating lines low (Stella's user option to drive unused TIA pins randomly finds programs that depend on it). Stella 5's first core treated D7/D6 as undriven when the register had no bit there; Stella 4, other emulators and hardware drive them low (Stella #173): C5. - **The pads are open-drain**: every TIA video and sound output (SYNC, LUM0–2, COL, AUD0/1, BLK, RDY) is a pull-down transistor and nothing more; Φ0 is the only real driver (tia-fpga README:291-293, from the netlist). The console's resistors make the levels. This matters only for the analogue stage (palette, mixing). - **Cartridge RAM write-on-read**: reading a Super Chip / CBS / M-Network write window writes the floating bus value ([cartridge.md](cartridge.md)). ## The TIA The quirks games rely on are mostly the circuit doing what it does: HMOVE's comb, late HMOVE with no comb, Cosmic Ark's endless motion clocks, retriggered players (more than three copies), sprites wrapping across the line, 18/33/66/162-CLK retrigger delays, RESBL's immediate START, playfield writes mid-line (asymmetric playfields), VDEL for six-digit scores. They are specified in [timing.md](timing.md) from Towers and the netlist, and are not "undocumented" in the sense of needing a rule beyond the circuit. What is genuinely unsettled is listed under Contradictions and Open items. ## TIA revisions as data The Atari Compendium's "All about the Atari TIA" (Scott Stilphen, updated 2026-01-02, pinned with its photos as hardware-captured evidence) records **at least 12 NTSC TIA versions** and the games that show them: "2 or 3" (Stolberg's demo shows 2 or 3 sprite columns, and on some chips changes as the chip warms up), Cosmic Ark / Journey Escape / Boulder Dash / Stay Frosty starfields (three distinct patterns), Kool-Aid Man / Thunderground / Spider Fighter score counters, Pesco and Ebivision Pac-Man stray dots, He-Man's title, Pitfall II's missile mask on the one-chip NTSC Jr., PAL Centipede, Frogger II on some 7800s, Wall Ball. The one-chip Jr. (C101688-002, 1987) has mono sound. Stella and Gopher2600 offer these as named TIA-type switches, each named after the game that shows a symptom. Their names are what the programs' own interfaces print (Stella's `dev.tia.type` choices in its help text and settings); how either implements them is not known here and is not a source (the table that stood here was read from their GPL source and is struck: [provenance.md](provenance.md)). **Milestone 7 derived the board's revision fields from ale-79's #699 serial tables** (six PAL/SECAM consoles; `machine.TIARevision`). Running every table on the reference board and listing, console by console, the cells it misses showed exactly two kinds of split, each a clean pattern: | Field | Reference (10444D, die) | Consoles that differ | The pattern in their tables | | --- | --- | --- | --- | | `merge_steps` | an HMOVE pulse merged into the visible-line clock steps the object half a clock early and swallows the next MOTCK: no net motion | PAL 7800, PAL Jr. '91 (player 0, the only object `early_HMOVE` moves) | every HMOVE from cycle 4 on moves player 0 right by one clock per merged pulse (all 896 split cells of `early_HMOVE`): the pulse swallows a MOTCK without stepping | | `strobe_drops` | a stuffed pulse in the two half clocks after a RESxx strobe is kept and steps the ring when the hold lets go (C28) | players: PAL light sixer; missiles: light sixer, Jr. '84, Jr. '91, Vader | the object one clock right in exactly the cells where a stuffed pulse falls two half clocks after the strobe (260 cells of each `HMOVE_RESPx` table, one alignment in four cycles) | The alternative readings were tried and rejected by the tables: a pulse on the strobe's own half clock kept (the light sixer's `_P0` then misses 525 cells), a pulse in the hold's later half clocks dropped (515). The ball splits nowhere. Objects a table does not exercise keep the reference behaviour (HYPOTHESIS). Thermal drift (#246: a 7800 that changes as it warms) is not modelled: the tables are each console's state when it ran them. **The board's position**: one reference TIA, modelled as a circuit, with revision differences as fields on the machine row, each defaulting to the reference behaviour and carrying its source. **Which chip is the reference is a decision** ([handoff-brief.md](handoff-brief.md)): the only die-level model, Sim2600, is the visual6502 photograph of an Atari **10444D** TIA (die shots pinned under `reference/die/`), so that chip is the only one with a judge below the emulator tier. A revision field is added only when a hardware photo or capture shows it and the reference model provably differs. ## The RIOT - Timer edges and the post-underflow divider: [timing.md](timing.md), C6, C7. - PA7 edge detection sets TIMINT D6; reading TIMINT clears it (the 6532 data sheet's interrupt flag register). Harmony's menu setting the PA7 flag caused false "hardware" timer values in Stella #108 (ale-79's 2020 retest matched Stella). - The IRQ output is unconnected; the timer's A3 interrupt-enable bit does nothing visible. - Power-on state: C8. ## Contradictions found while gathering Numbered for citation; each names both sides. "Settle with" names the tier that decides. | # | Subject | One side | Other side | Settle with | | --- | --- | --- | --- | --- | | C1 | Sim2600's licence | LICENSE.md and GitHub: CC0-1.0 | README.txt (Greg James 2014) and tia-fpga's patch header: MIT | either permits our use; cite both | | C2 | Sim2600's Φ2 wiring | upstream feeds the TIA's Φ2 from the 6507's Φ1 | the console feeds the inverse; five rules move (tia-fpga README:372-384) | use `sim/traces/phi2/` (console wiring) as the judge | | C3 | RSYNC | Towers: "requires more investigation" (219-226); Stella's RSYNC called incomplete in its own tracker (Stella #5, cwilkson 2025) | tia-fpga: the netlist settles RSYNC's restart | **settled** (milestone 2): restart seven steps after the last strobe step with PH0 low; every die trace and Donkey Kong's power-on match (timing.md) | | C4 | What RESxx does | Towers: resets the counter, "4 CLK to reset" | netlist: holds the object clock in H@1, counter clears on next H@2; a decoded copy survives | **settled**: the netlist rule; `players`, `resets_hblank` and this project's `retrigger` (RESP0 retriggered at 5-55 cycles from four phases) match | | C5 | Undriven TIA read bits | Stella 5 early core: D7/D6 undriven where unused | Stella 4, hardware, others: driven low (#173) | hardware reports in #173; board drives them low | | C6 | Timer flag clear | 6532 data sheets: a read of INTIM clears it | MCS6500 HW Manual p.78: a read or write on the interrupt cycle does not (#606) | **settled** (milestone 3): neither a read nor a write on a wrap cycle clears it, on the first wrap or later ones; the board shows #606's console results on all twelve ROMs (`tests/test_timer_roms.py`) | | C7 | Timer after underflow | documented: count at 1T, reset to interval on read | hardware (#97): the programmed divider keeps running; after a read the count resumes from its phase | #97 tests with photos (one image is "(faked)", thrust26's own words) | | C8 | Power-on RIOT | Gopher2600: to be observed through HEADLESS `RIOT TIMER` (the value first written here came from its source: struck); Stella randomises INTIM, RAM, A/X/Y/P (OBSERVED: runs differ, and its options say so) | ale-79 (#249) citing the data sheet: I/O registers zeroed on reset | parameters with documented defaults; no game should care | | C9 | Cosmic Ark stars | thrust26's PAL Vader: widths 1,2,3,2 | sa666666's light sixer differs; SpiceWare's light sixer matches DirtyHairy's Jr.; Compendium: three patterns by chip | per-revision field; the die trace `hmove` (includes Cosmic Ark) fixes the 10444D's | | C10 | HMOVE vs RESxx race | Stella: a choice of TIA type | per console *and per object* in ale-79's serial tables (#699); a 7800 changes as it warms (#246) | **settled for the six consoles** (milestone 7): two revision fields, `merge_steps` and `strobe_drops`, derived from the tables; each console's row matches every cell of its own tables; die for the 10444D | | C11 | Stella's own TIA types | help text lists 9 | (struck: the other side was read from Stella's source) | not a question for this board: revision fields come from #699 and photos | | C12 | Hardware vs hardware | #1101: a VDELP + NUSIZ artifact on splendidnut's console | JetSetIlly and sa666666 cannot reproduce it | unresolved; revision field only with a photo | | C13 | NTSC palette | #1173: a palette called "hardware-verified" | Stella's maintainer: "no right palette" | none available; label the palette's origin | | C14 | SECAM colours | "8 colours" | the TV's alternate-line memory blends more (#1097, lidnariq) | frontend concern | | C15 | Sim2600 speed | README: several ms per pixel; tia-fpga: ~3 ms per half clock | measured here: 11–12 ms per half clock | measured | | C16 | WSYNC release | MAME: the instruction after is stamped ≡ 2 mod 76, i.e. resumes at line cycle 1; Stella's trace: resumes at line cycle 0 (OBSERVED) | the netlist's "RDY's release" moved with the Φ2 wiring (tia-fpga README:380) | **settled**: release on step 454, the read resumes in the line's first cycle (Stella's 0; MAME's count is one off its own line origin); confirmed on Sim2600's 6507 by `die_board.py` (timing.md) | | C17 | Playfield write latency | Towers: the next 4-clock bit boundary, without the phase | tia-fpga: "exactly when a mid-line playfield write reaches the screen" read from the die | **settled**: read on H@1, shown on H@2 (`playfield` trace) | | C18 | Hobo (USA) (Proto) bankswitch | MAME softlist: no slot, size default F8 (and `supported="no"`) | Stella's detection (`-rominfo`): UA; the board's own detector: UA (it touches $0220 and $0240) | **settled** (milestone 5, restart): as UA it boots to its "UA Ltd. 1983" title | | C19 | INPT0–3 with nothing (or a joystick) connected | Stella: D7 reads 0 (OBSERVED: its debugger shows `inpt0`–`inpt3` low) | MAME: a joystick's pot pins return $FF (BSD-3 a2600.cpp:396-417) | **settled** for the board: 0 (the schematic gives the pad nothing to charge it but the pot); `controllers.Paddles` models a paddle's RC when one is plugged in | | C20 | The byte a hotspot read returns | (Stella side struck: read from its source) | MAME: the old bank's (a read tap after the read, BSD-3 rom.cpp:125-126) | HYPOTHESIS: the board returns the new bank's, on the reasoning that the bank latch settles within the cycle, before the data is sampled at the end of Φ2; a logic-analyser capture of a hotspot read would settle it. No game in milestone 1's lockstep reads a hotspot's value | | C21 | When MAME's RIOT sees a timer write | the access's own cycle (Stella; the board) | MAME: the instruction's stamp, two cycles early for a 4-cycle STA (measured on Adventure: INTIM's steps fit the stamp exactly) | MAME artefact; the lockstep replays MAME's timer reads, Stella checks the timer | | C22 | MAME's timer against its own CPU | — | MAME's INTIM slips one more cycle within the first emulated second (Pitfall!, River Raid, Adventure all diverge near cycle 1,191,875) | MAME artefact, cause not traced into MAME's scheduler; same remedy as C21 | | C23 | What Sim2600's 6507 sees | the die drives D7/D6 on a TIA read (its drive pins in every trace) | Sim2600's console glue (`sim2600Console.py` `readMemory`) samples them before they are enabled, so its CPU reads every TIA register as 0; its RIOT is a behavioural model (`emuPIA.py`: first decrement a whole interval after the write, stops at 0 after underflow, reads clear nothing, SWCHB $0B) | harness artefacts, not the die: `die_board.py` imitates them for its comparison only | | C24 | VBLANK and the collision latches | (both sides as first written were read from source, Stella's and tia-fpga's RTL: struck) | the question: does VBLANK stop the latches setting? | **settled** by this project's `vblank_collisions` die trace: with VBLANK on, CXPPMM reads 0 over overlapping players (the board gates on the blanking latch) | | C25 | When a colour write shows | tia-fpga: colour registers reach the pads through the falling-edge latch (so a write would show at the next falling edge) | the die: a COLUBK written on a falling edge shows on that same half clock (`retrigger` trace, record 17,661) | **settled** by the die; none of tia-fpga's eleven cartridges changes a colour mid-line | | C26 | AUDC C-F from %0000 or %0001 | a lockup guard that would steer the pulse counter into the divide-by-six cycle (the Stella attribution first written here was read from its source: struck) | the netlist has neither term: the die steps %0000 to %1111 and then alternates, a divide-by-two (tia-fpga "Audio") | **settled** by the die: the `audio` trace switches AUDC B (pulse %1111) to C, and the probed pulse-counter wires go %0000, %1111, %0000; the board matches both audio traces only without the guards | | C27 | HMOVE's window edges | the board's first model set the comb latch on the write and rested the motion counter at 0; Sim2600's netlist clears a latch set on the wrap's own half clock (an HMOVE on cycle 74) | seven consoles (Bradford Mott's NTSC table, 1998; ale-79's six PAL/SECAM ones, #699): an HMOVE on cycle 74 (75 in their 1-based count) gets the comb on the next line | **settled**: the `hmove_cycles` die trace fixes the rest (the latch samples the strobe on H@2 at least five half clocks after the write, so cycle 20 is too late for RHB; cycle 75 extends the next line; the motion counter rests at 15) and the board matches it everywhere but the tie, where it follows the seven consoles over the die (tier rule): 482 half clocks of that trace, counted in `tests/test_die_traces.py`. With that the board matches all 415 cells of `early_HMOVE` where the six consoles agree | | C28 | RESxx struck while HMOVE is still stuffing pulses | the board's first model: the strobe holds the ring in H@1 and every clock pulse during the strobe and its hold is lost, as with MOTCK | the die (`hmove_resp0`: RESP0 3-24 cycles after an HMOVE on cycles 72-75, 0-2) drew the player one colour clock further left in a regular pattern; ale-79's `HMOVE_RESPx` tables (six consoles) disagreed in the same rows | **settled** by the die: a stuffed (HMOVE) pulse arriving after the strobe's own half clock and before the hold lets go is not lost but steps the ring once the hold is over. Stuffed pulses come on the falling edge, MOTCK on the rising, so only stuffed pulses meet the strobe's steps and every MOTCK trace is unchanged. With it `hmove_resp0` matches everywhere but the C27 tie | | C29 | The playfield on a line HMOVE's comb blanks | the board's milestone 2 model: the playfield counter starts where HBLANK ends, so the comb (HBLANK to LRHB) delayed it two bits, 8 pixels | Gopher2600 and Stella: the comb hides the first 8 pixels, the playfield stays where it is (found in milestone 4: Pitfall!'s tree trunks, which are gaps in a playfield drawn on lines that all strobe HMOVE, stood 8 pixels right on the board) | **settled** by this project's `hmove_playfield` die trace (an aperiodic playfield on lines with the comb from cycle 2 and from cycle 75, plain and reflected): the playfield counter starts at RHB whatever HBLANK does; the old rule misses 832 half clocks of it. No tia-fpga trace draws a playfield on an HMOVE line | | C30 | When a GRP write reaches the picture | Gopher2600: at least three half clocks after the die (Crystal Castles' castle, where a GRP1 write copies GRP0 through VDELP0 while player 0 draws its last pixel: Gopher2600 draws that pixel, the board does not; with GRP writes made three to six half clocks late the board matches Gopher2600 on every frame); Stella: the same pixel, the same way | the board: a GRP write, and the VDEL copy it makes, acts from the next half clock like every other register | **settled** by this project's `grp_mid_draw` die trace (GRP0 cleared on cycles 20-28 while player 0 draws, at three positions a colour clock apart, directly and through VDELP0): the board matches it. The detectors are late; none of tia-fpga's cartridges writes graphics while a player draws | | C31 | A mid-line VBLANK write | Gopher2600 and Stella: blanking starts (and ends) one colour clock after the die's | the die: the second falling edge at or after the write (tia-fpga "VBLANK does not blank where it is written", the `vertical` trace) | **settled** by the die (milestone 2); found again in milestone 4, where Adventure turns VBLANK on at visible clock 4 of its last picture line: one pixel a frame, which disappears from both detectors' comparisons when the board's VBLANK writes are made two half clocks late | | C32 | The ball's colour in score mode | the board's milestone 2 model and the Stella Programmer's Guide's wording: SCORE colours "the playfield" and the board gave the ball the half's player colour too | Stella: the ball keeps COLUPF (Alpha Beam with Ernie, where a ball drawn under CTRLPF $32 differed by its colour) | **settled** by this project's `ball_score` die trace: a pixel lit only by the ball is COLUPF under SCORE, a playfield pixel takes the half's player colour (and where both are lit, the player colour); the old rule misses 24 half clocks. No tia-fpga cartridge shows the ball under SCORE | | C33 | When an ENAM or ENABL write reaches the picture | Stella: at least three half clocks after the die (24 sweep dumps, among them Space Invaders, Warlords, Midnight Magic and Swordfight, differ by missile or ball pixels at a disabling write; with ENAM0, ENAM1 and ENABL writes made three or four half clocks late the board matches Stella on every frame, with one or two it does not) | the board: an enable write, like every other register, acts from the next half clock | **settled** by this project's `enable_mid_draw` die trace (missile 0 and the ball disabled on cycles 20-28 while they draw, at three positions a colour clock apart, the ball also through VDELBL): the board matches it, and so it does with those writes one or two half clocks late, but three misses 32. Stella is late, as for GRP (C30) | | C34 | A stretched player's wrapped pixels on an HMOVE line | the board's milestone 2 model: the stretch gate (which lets one scan clock in two or four through) is caught on MOTCK only, so HMOVE's stuffed pulses under the comb left a 2x or 4x player's wrapped pixels waiting, and they were drawn after the comb (Sea Hawk, where a quad player crossing the right edge left three pixels at visible clocks 8-10 that Stella does not draw) | Stella; Towers: "a HMOVE can gobble up the wrapped player graphics" | **settled** by this project's `hmove_wrap` die trace (a 4x and a 2x player started so far right they cross the line's end, at seven positions, the next lines with and without an HMOVE on cycle 2 and HMP0 $00, $80, $70): the gate is caught on the stuffed pulses too, and the old rule misses 698 half clocks. A board bug | | C35 | RESP0 as a stretched player starts | the board's milestone 2 model: a RESxx hold left a 4x player's stretch gate as the two-phase state had it and let a START already latched begin the scan | the die (no detector or document looked at it) | **settled** by this project's `resp_start` die trace (a 1x, 2x and 4x player reset on cycles 36-44 around the start of the copy an earlier RESP0 placed) and `hmove_wrap`: the hold opens a 2x gate and shuts a 4x one, and the scan counter takes START only on a clock the gate lets through, so a 4x copy whose start falls in the hold is not drawn and a 4x copy reset five clocks in draws four pixels longer. Found while building the C34 cartridge; no sweep dump is known to depend on it. A board bug | | C36 | When an HMxx write reaches the motion comparators | the board's milestone 2 model: two half clocks after the write (BASIC Programming and Stellar Track write HMP0/HMP1 just as an HMOVE's motion runs out, and agree with Stella only once the board's HMxx writes are made three or four half clocks late) | Stella: those writes count | **settled** by this project's `hm_late` die trace (HMP0 changed from $70 to $90 on cycles 18-30 after an HMOVE on cycle 2): the comparators see HMxx as it stood four half clocks before; two (the old rule) and three miss 156 half clocks, five or more break tia-fpga's `hmove` trace on its own wiring. A board bug | | C37 | When a REFP write reaches the picture | Stella: at least three half clocks after the die (Strawberry Shortcake, which sets REFP0 at visible clock 75 while a player draws; with REFP writes three half clocks late the board matches Stella on every frame) | the board: from the next half clock, like every other register | **settled** by this project's `refp_mid_draw` die trace (REFP0 set and cleared on cycles 36-45 while an asymmetric player draws): the board matches it, and so it does with those writes one or two half clocks late, but three misses 8. Stella is late, as for GRP (C30) and the enables (C33) | | C38 | Where RESMP leaves a missile it lets go | the board's milestone 2 model: the lock reached the missile's ring two colour clocks after the player's scan counter showed 1, so a released missile started six clocks into a 1x player and eight into a 2x one (Frostbite and Der kleine Bär, whose ice floes are player 1 and an 8-clock missile 1 released every frame: the board drew a 2-pixel gap Stella does not) | Stella: four and six | **settled** by this project's `resmp_release` die trace (missile 1 locked and released on cycle 26 at player sizes and copies $30, $36, $06, $00, $35, $37 with and without HMOVEs, then alone at every missile width with 1x, 2x and 4x players): the lock holds the ring from the step the scan counter shows 1, with no delay; the old rule misses 160 half clocks. tia-fpga's `missiles` trace releases RESMP only with a 1-clock missile inside a $FF player of the same colour, where the position cannot show. A board bug | | C39 | A stretched player's wrapped pixels under HMOVE's comb when it starts at the very end of the line | Stella and Gopher2600: the comb hides them (Meteor Defense and Missile War, whose double-width player 1 is reset at visible clock 147 and wraps: both draw nothing at visible clocks 8-13 on the HMOVE lines; the picture then differs from frame 76, and a collision read after it sends the program elsewhere) | the board: the stuffed pulses shift out only what falls under them (C34), and a tail that starts after them is drawn from visible clock 8 | **settled** by this project's `hmove_wrap_end` die trace (2x, 4x and 1x players reset on cycles 70-73, the next lines with and without an HMOVE on cycle 2): the board matches it; the die draws the tail at clocks 8-9 after the comb for a 2x player reset on cycle 71, as the board does. Both detectors are wrong here | ## Open items 1. *(Closed in milestone 2.)* The write edge: writes land on the step where Φ2 falls, steps ≡ 4 mod 6 of the line (timing.md). 2. **The reference TIA revision** (the decision in the brief), and whether the PAL TIA (C011903 per tia-fpga; one sound pad) differs in anything but colour. 3. **The RIOT has no die model.** Timer edges rest on the data sheet, the Hardware Manual and console results posted in Stella issues. A logic analyser capture on a real console would settle C6/C7; none exists in raw form (Stella #5 has only screenshots of one). 4. **Paddle RC constants**: R and C are the schematic's, the pot range and the TIA's trip point a fit; the threshold is not in the die traces. 5. **Audio mix** is derived from the schematic's resistors with the transistors as ideal switches; no hardware audio capture of a 2600 was found to check it. 6. **Keypad column settle time**: no document found gives it; the board settles instantly (HYPOTHESIS; a program that waits reads the same). 7. **NTSC console HMOVE tables**: ale-79's serial-output tests (#699) have results from six PAL/SECAM consoles and none from NTSC. **This project has no hardware** (the user's rule, 2026-10-21: emulation only), so no NTSC table will be made here: on the NTSC row the judge is the die (Sim2600 models an NTSC 10444D), and the #699 tables count only where all six consoles agree.