# Handoff brief: the Atari Jaguar console board For the session that builds the board. It stands on its own; the subject documents hold the evidence ([README.md](README.md) lists them). Phase 0 was done on 2026-11-11 and 2026-11-12; no emulator code exists. ## 1. Scope The **base console**: the 68000 (from `m68000-python`), the GPU and DSP (from `jrisc-python`), and everything else of Tom and Jerry inside this board: memory controller and bus arbiter, video time base, line buffers, CLUT and CRY/RGB pixel path, Object Processor, Blitter, Tom's interrupt controller and PIT, Jerry's clocks, PITs, interrupt controller, I2S and PWM DACs, UART, joystick decodes and GPIO strobes; the cartridge with its serial EEPROM; the boot ROM and its signature check, run for real. NTSC first, PAL as a machine row. Not in scope: the Jaguar CD (a later add-on board, `jaguarcd-python`; this board offers its sockets, [sockets.md](sockets.md)); CoJag (a later consumer of the Tom and Jerry classes); the Voice Modem, JagLink play, the light gun and analogue controllers (sockets only). ## 2. Names | Thing | Name | | --- | --- | | Distribution / repository | `jaguar-python` | | Package | `jaguar_python` (family pattern: `pcengine_python`, `a2600_python`; open decision 1) | | The machine | `jaguar_python.Jaguar` (the console: wires everything, owns the scheduler) | | Chips | `tom.Tom`, `tom.video.VideoTimeBase`, `tom.op.ObjectProcessor`, `tom.blitter.Blitter`, `jerry.Jerry`, `jerry.i2s.SerialPort`, `jerry.uart.Uart`, `jerry.pads.ControllerPorts` | | Bus | `bus.Bus` (arbiter + memory controller), `memory.Dram` | | Cartridge | `cartridge.Cartridge`, `eeprom.Eeprom93Cxx(address_bits=6)` | | Machine table | `machine.Machine` rows `NTSC`, `PAL` | | CLI | `jaguar-python run|screenshot|trace|lockstep`, options `--skip-boot`, `--pal`, `--boot-rom`, `--wave-rom` | | Environment | `JAGUAR_BOOT_ROM`, `JAGUAR_WAVE_ROM` (bring your own; read in place) | The module layout is in [start-here.md](start-here.md). ## 3. Dependencies and pins - **`m68000-python` at `3029f56`** (HEAD 2026-11-12: v0.1.0 `f557abf` plus README fixes; `megadrive-python` pins the older `38dbd0f`). It has `step()`, `cpu.step_clocks` inside a bus callable, `set_ipl`, `acknowledge(level)` returning a vector (the Jaguar's `$40` on level 2), STOP, `reset_devices`. It **lacks**, to raise as issues on the core, not as a fork ([bus-arbitration.md](bus-arbitration.md)): (a) a tested guarantee that host stall clocks added inside a callable are correct at every access of every instruction; (b) the clock at which each access *starts* (the Jaguar's memory controller decides each 68000 cycle's length: U12); (c) exact STOP wake timing (provisional in its claims). None blocks M1-M6. The *Hardware Bugs* sheet's `clr.l`/`move.l -(An)` word-order bug is a direct test of the core's claimed bus sequences ([memory-map.md](memory-map.md)). - **`jrisc-python`**: Phase 0 in progress in parallel (`/data/emu/jrisc-python`, documents landing 2026-11-12; no code). Pin it when it passes the rung that replays the boot ROM's GPU trace; M2 waits for that. - Python floor 3.11 (PyPy); PyPy must work. No runtime dependencies beyond the two cores. ## 4. The import boundary Read with jrisc-python's `docs/interrupts.md` ("Who owns what", agreed) and its forthcoming brief. **`jrisc` (the core) owns**: both register banks, flags, the instruction set and microcode, prefetch queue, scoreboard, divider, MAC/MMULT, the control registers at `F02100-F0211F` / `F1A100-F1A123` and their behaviour (including `G_END`'s `BIG_IO`/`BIG_PIX`/`BIG_INSTR` bits), the interrupt enables, latches, `IMASK`, priority and entry sequence, the `CPUINT` and self-interrupt bits, and (proposed, open decision 3) **the local bus controller with its RAM**: the 4 KiB / 8 KiB bytes, the DSP's wave-ROM slot, and the local-bus priority (outside I/O, then gateway, then load/store, then program fetch) of `GPU_MEM.NET` / `DSP_MEM.NET`. The GPU's `LOCK` bit lives in `GPU_MEM.NET` too: the core implements it, its reset value is a constructor argument. **The board owns**: the main bus and everything on it; the address decode that reaches the processors; the **16-bit pairing latch** of the outside I/O port (`GPU_CPU.NET`: a low-address write latches, the high-address write commits; a low-address read fetches and latches; `+$8000` is the 32-bit port), using the core's `big_io` state; the Blitter (registers decoded on the GPU's local bus, implemented here); the DAC/I2S registers (decoded on the DSP's local bus, implemented here); every interrupt *source* and its shaping into a one-tick pulse (edge detectors on Jerry's line, the I2S strobe, timers, the OP, the Blitter); Tom's `INT1`/`INT2`, Jerry's `J_INT`; bus arbitration; the `NOCPU` strap; the wave-ROM image (handed to the DSP). **The contract (proposal; names agreed so far with jrisc's drafts)**: ``` core = JaguarGPU(bus, local_io, reset_lock=False) # JaguarDSP(bus, local_io, wave_rom=bytes) # core -> board bus.read(address, width, clock) -> (value, done_clock) # width 1, 2, 4, 8; outside local space bus.write(address, value, width, clock) -> done_clock local_io.read(offset, clock) / local_io.write(offset, value, clock) # Blitter regs; DAC/I2S regs on_cpu_interrupt() # CPUINT written # board -> core core.io_read32(address, clock) / core.io_write32(address, value, clock) # the slave port core.raise_interrupt(n) # a one-tick pulse, already shaped core.run_until(clock); core.next_event_clock(); core.big_io; core.running ``` **The disagreement (open decision 3)**: the first board draft gave the local RAM bytes to the board, the jrisc draft to the core. Board side: four masters reach that RAM (68000, Blitter, DSP over the bus, the GPU itself), the board already models every other memory, and MAME keeps it as a board-side share. Core side, which this brief now recommends: the netlist puts the RAM and its arbitration inside the processor's own local bus controller (`GPU_MEM.NET`: "the local bus controller associated for the graphics processor, and is also responsible for controlling local memory"); outside accesses are a priority port on that bus that steals a tick from the processor; instruction fetch, `MMULT` operand reads and the interrupt entry's stack push all touch it every tick, so a callback per access would be the hottest path in the emulator; and a CoJag board would reuse it unchanged. The board keeps full access through `io_read32/io_write32`. ## 5. Sockets Eleven, in [sockets.md](sockets.md): cartridge slot (claims, writes, `WAITL`, pass-through), cartridge EEPROM lines, GPIO strobes, `EINT0/1`, the I2S port (master or slave clocks), UART, controller ports, audio out, external bus master (paper only), reset, straps. The Jaguar CD needs the cartridge slot (BIOS overlay at `800000-83FFFF`, Butch at `DFFF00-DFFF3F`), the I2S port in slave mode (`SMODE` `$14`), `EINT0`, and nothing for audio (Red Book audio is copied to the DACs by a DSP handler). Defined with test-only fakes in M0; the gate: attaching a fake that claims nothing changes no lockstep trace or smoke result. ## 6. Unknowns | # | Unknown | Decided by | Where | | --- | --- | --- | --- | | U1 | Whether a retail console straps `NOCPU` (`MA4`) high, which is what turns the GPU lock on at reset; MiSTer straps it low and boots | console schematic or a console's MEMCON1 bit 13 read-back; default off | [memory-map.md](memory-map.md) | | U2 | That the 68000 does the RSA decryption and the boot ROM merges cart `$400` into MEMCON1 (no disassembly made) | M1 lockstep trace, read as code | memory-map, file-formats | | U3 | `200000-7FFFFF` with 2 MiB fitted: mirror (MAME) or open bus | `MEM.NET` decode + `COLS`/`DWIDTH` | memory-map | | U4 | Power-on DRAM contents (*Battle Sphere* depends on them) | none available; a machine option | memory-map | | U5 | The "VDE bug" behind the Software Reference's `VDE` = `$FFFF` rule, while the boot ROM writes `$1F0`/`$206` | `VID.NET` | [video.md](video.md) | | U6 | The PAL video constants | run the boot ROM with the PAL strap (M3) | video | | U7 | Whether silicon's CRY ROMs match the manual's printed tables | none: the manual is the judge | video | | U8 | Operand order of the OP's `vly`/`vgy` comparator | `OB.NET` l.626 or simulation | [object-processor.md](object-processor.md) | | U9 | Order between an OP header write-back and a racing CPU/GPU write | arbitration model + simulation | object-processor | | U10 | Whether `CLK1` does anything in a console | `JCLK.NET` | [jerry.md](jerry.md) | | U11 | Console audio = I2S into a serial DAC with the PWM pins unused (two tier 4-5 witnesses) | console schematic | jerry | | U12 | When each 68000 bus access starts on Tom's bus and how long Tom makes it | `MEM.NET` + a core hook (§3 b) | [bus-arbitration.md](bus-arbitration.md) | | U13 | The clock at which each interrupt pulse is sampled relative to its cause | simulation | [interrupts.md](interrupts.md) | | U14 | JK latch behaviour when set and clear meet | cell model | interrupts | | U15 | Whether a pending-but-masked DSP interrupt 0 can be lost | simulation | interrupts | | U16 | EEPROM size per aftermarket image (no header field) | sweep failures, then a hash table | [eeprom.md](eeprom.md) | | U17 | Whether Butch (CD) ever masters the bus (MiSTer's `addr_ch3`) | the CD board's Phase 0 | sockets | | U18 | The banking scheme of the 16 MiB *The Snowman* image | the image's code | sockets | | U19 | Which Tom/Jerry revision the netlists describe, and how retail silicon differs | none found (AtariAge thread 296040 unreachable, per jrisc) | [validation.md](validation.md) | | U20 | Interlace stepping, the clock `VI` is raised within its half-line, the light-pen latch (`LPH` = HC is reported) | `VID.NET` | video | ## 7. Contradictions between sources | # | Contradiction | Resolution | Where | | --- | --- | --- | --- | | C1 | `JPIT4` at `F10002` [TRM p.86] vs `F10006` [TR10 p.5] | TR10 (by elimination) | memory-map, jerry | | C2 | `ASIDATA` at `F10030` [TRM p.94] vs `F10039` [TR10] | TRM (word-aligned) | memory-map | | C3 | PAL 68000 clock 13.296695 [TR10] vs half of 26.593900 = 13.29695 | the half | memory-map | | C4 | 655 pixels for divisor 2 [TR10] vs 1330/2 = 665 | 665 | video | | C5 | Branch object CC "bits 14-15" with five codes [TRM] vs a 3-bit code in `OB.NET` | netlist | object-processor | | C6 | GPU object tests YPOS [TRM] vs no YPOS term in `OB.NET` | netlist | object-processor | | C7 | Stop object always interrupts [TRM] vs needs phrase bit 3 [`OB.NET`] | netlist | object-processor | | C8 | Intensity port names `Intensity 0..3` [TRM] vs `B_I3..B_I0` [TR10, `JAGUAR.INC`] | the netlist or a picture decides the lane | [blitter.md](blitter.md) | | C9 | The lock is on out of reset [TRM p.133] vs its reset value is the `NOCPU` strap, MEMCON1 bit 13, "unused, set to zero" [TRM p.10; `ABUS.NET`, `GPU_MEM.NET`] | netlist; strap default off (U1) | memory-map | | C10 | HC "incremented by the pixel clock" [TRM] vs one count per video clock (arithmetic of `HP`) | video clock | video | | C11 | CRY tables: manual p.28 vs Virtual Jaguar (2 red entries) vs MAME (4 green entries) | manual | video | | C12 | `VDE` "should be set at `$FFFF`" [Software Reference v2.4 p.13] vs the boot ROM's `$1F0`/`$206` | open (U5) | video | | C13 | Virtual Jaguar: "size divisible by 1 MiB means a cartridge" vs 9 real cartridges in the census that are not | test the header | [file-formats.md](file-formats.md) | ## 8. What Phase 0 found that common knowledge has wrong 1. The "undocumented cartridge lock" is in the netlist, clears on any `G_END` write, and its reset state is a **board strap** (`NOCPU`, MEMCON1 bit 13) that MiSTer leaves off; the manual's own register table calls that bit unused. 2. Every CRY table in circulation has errors: Virtual Jaguar's (copied into JagNetlists' ROM images and the MiSTer build) 2, MAME's 4; the manual prints the right ones. 3. The netlist corrects the manual on GPU objects (no YPOS test), stop-object interrupts (need bit 3) and branch codes (3 bits); interrupt latches are set only if enabled at the pulse. 4. Virtual Jaguar's "accurate" blitter was written from **Jaguar II** (Midsummer) documents. 5. MAME rates the console "preliminary" yet boots *Tempest 2000* through the real boot ROM. 6. No-Intro's "(ROM)" set is exactly "(J64)" minus the first `$2000` bytes (91 of 91): Alpine images, unsigned, unbootable through the real ROM. 7. On *Tempest 2000* the DSP executes more instructions than the 68000 and GPU together (about 18 M per second). 8. The Blitter and the DAC/I2S registers are **local peripherals** of the GPU and DSP, decoded by the processors' own local bus controllers; a GPU write to the Blitter never touches the main bus. 9. The 68000's `clr.l` and `move.l -(An)` break GPU/DSP writes because the 16-bit port commits on the high-address half. ## 9. Games tied to quirks (leads from sources, none verified here) | Game (census: present) | Quirk | Source | | --- | --- | --- | | *Doom* | MAME's vector-copy size; pace about 4 fields per frame on a console | MAME `machine_reset`; libretro measurement | | *Battle Sphere* / *Gold* | power-on RAM and Blitter idle status | MAME `machine_start` hack | | *Val d'Isere Skiing* | `OB0-3` bit mapping | libretro errata | | *Troy Aikman NFL Football*, *Double Dragon V*, *Brutal Sports Football* | `B_COUNT` = 0 | Virtual Jaguar notes | | *Cybermorph* | Z comparator lane in the accurate blitter | Virtual Jaguar | | *Raiden* (alternate) | needs the real boot ROM | Virtual Jaguar database | | *Doom*, *Protector*, *Battle Sphere*, *Phase Zero*, *Cybermorph*, *Attack of the Mutant Penguins* | "requires DSP" | Virtual Jaguar list | | *Kasumi Ninja*; *Towers II*, *Checkered Flag*; *Flip Out*; *Rayman* | R30 at interrupt entry; `ABS $80000000`; GPU timing; DSP starvation | jrisc-python's leads (core-side) | | 42Bastian's boot intros | the Series M boot ROM (not in any set; the board must not need it) | their README | ## 10. Milestones Each milestone ends with its exit test passing and a local commit. Smoke list (curated, from §9 plus classics): *Tempest 2000*, *Doom*, *Alien vs Predator*, *Cybermorph*, *Iron Soldier*, *Rayman*, *Wolfenstein 3D*, *Super Burnout*, *Zool 2*, *Raiden*, *Battle Sphere Gold*, *Val d'Isere Skiing*, *Troy Aikman NFL Football*, *Kasumi Ninja*, *Flip Out*, *Missile Command 3D*, *Hover Strike*, *Attack of the Mutant Penguins*, *Protector*, plus *Expressway* (16-bit cart) and the 240p suite and pad test homebrew. | M | Content | Exit test | | --- | --- | --- | | M0 | package skeleton, machine table, sockets Protocols + fakes, loaders, decode table | the census reproduced by the loaders (J64/ROM/ABS/COFF detection; "(ROM)" = "(J64)" minus `$2000` for 91 of 91); decode table unit tests from [memory-map.md](memory-map.md) | | M1 | 68000 + DRAM + boot ROM + reset-time ROM mirror + Tom/Jerry registers as storage + `-log`-style register-write log | lockstep with MAME's 68000 trace from reset to the `G_CTRL` write (68000 clock 15,286,586): every instruction's PC and registers equal, MAME's `$400`-byte vector copy excepted; Tom/Jerry register-write sequence equal to MAME's `-log` | | M2 | `jrisc` GPU wired through the contract (§4), the I/O pairing latch, `G_END`, lock strap | no cart: the GPU's PC sequence equals MAME's 34,840-instruction trace and the 68000 reaches `$50B8`; every signed cartridge in the census leaves `$03D0DEAD` at `F03000` and the 68000 jumps to the cart's `$404` address | | M3 | video time base, VI, line buffers, CLUT, CRY/RGB from the manual's tables, OP bitmap objects | boot-screen line buffers (no cart: red screen with the logo outline) and *Tempest 2000*'s logo match MAME's snapshots after colour conversion, allowing only MAME's 4 green-table entries; one VI per 524 half-lines | | M4 | OP complete: scaled, RMW, GPU, branch, stop objects, write-back, the netlist table of [object-processor.md](object-processor.md) | directed object-list tests, one per table row and per documented bug (16-bit fetch every 3 clocks, wide-object clip, RMW last column); *Tempest 2000* title matches MAME | | M5 | Blitter at bus-cycle level from the netlist modules | directed tests per `B_CMD` mode and per reproducible bug (9, 10, 11, 18, 20); title screens of *Cybermorph*, *Doom*, *Alien vs Predator* against MAME and Virtual Jaguar (detectors); if open decision 6 builds the harness, its cycle sequences on the directed tests | | M6 | `jrisc` DSP, Jerry PITs, `J_INT`, I2S, DACs, audio out; **first speed measurement** | *Tempest 2000*'s DSP runs the same PC sequence as MAME's frame-200 window once aligned; timer periods from register values exact; audio stream pitch and onsets match MAME's; speed recorded against the estimate in [start-here.md](start-here.md) | | M7 | bus arbitration per memory cycle, `INT2`/`ihandler`, refresh, MEMCON costs, DSP 16-bit cycles | priority unit tests from `ARB.NET`'s table; cycle costs from MEMCON; logging of `DMAEN`/`BUS_HOG`/`BUSHI` per game; *Doom* attract demo pace near 4 fields per frame (weak tier 1) | | M8 | EEPROM, pads, Team Tap, rotary | Atari's `eeprom.s` driver run on the emulated 68000 writes and reads back 64 words; a game save survives a restart; the pad-test homebrew shows each button | | M9 | first games | each smoke-list game reaches gameplay with a scripted input; differences against MAME/Virtual Jaguar triaged against tier 1-2 sources | | M10 | smoke sweeps, then the full library (No-Intro J64 + aftermarket) only at a commit point where the board might be ready | failures become the next smoke list | | M11 | `jaguarcd-python` Phase 0 audits the sockets before this board is tagged | the CD Phase 0's socket audit has no unmet need | ## 11. Open decisions for Aubrey **Decided by Aubrey on 2026-11-12** (recorded after a walk through all fourteen Phase 0 briefs): - The Python package is `jaguar_python` (family rule set the same day: a repository `x-python` always imports as `x_python`); read any other package name in these documents as that. - Decision 3: **the core owns the GPU/DSP local RAM and local bus controller**; this board keeps the 16-bit pairing latch. Confirmed. - Decision 11: the three hook issues on m68000-python are **approved**. Decision 9: use the manual's CRY tables; reporting the errors upstream is deferred. - Referees built from die-derived material are built just before the rung that needs them, not up front. - Outside contacts proposed below are **deferred until the core or board exists**; Aubrey sends them himself, from a draft. - Remote: local through Phase 0; after the first passing rung or milestone, a private GitHub remote. Where a recommendation below names a different point, this replaces it. - Every other recommendation below is **accepted as written** unless a line here says otherwise. 1. **Package name.** `jaguar_python` (distribution `jaguar-python`), as every family board does, or the shorter `jaguar` used in the task text. *Recommendation*: `jaguar_python`; and suggest `jrisc_python` to the core for the same reason. 2. **Machine scope.** NTSC console first, PAL as a strap-and-clock row from M3, CoJag later as its own board reusing `tom`/`jerry`, Jaguar CD as `jaguarcd-python` after M9. *Recommendation*: yes to all four. 3. **Who owns the GPU/DSP local RAM.** Core (the netlist's local bus controller holds it; hottest path; CoJag reuse) or board (four masters reach it; MAME's choice). *Recommendation*: the core, with the board's 16-bit pairing latch and `io_read32/io_write32` (§4). The jrisc brief should take the same line; if it does not, this is the one point to settle between the two Phase 0s. 4. **Boot.** Run the real boot ROM and the real signature check by default; `--skip-boot` (PC from `$404` or the executable's header, registers as the ROM leaves them) for Alpine `.rom` images and homebrew executables only. The `NOCPU` lock strap defaults to off (U1). *Recommendation*: yes. 5. **Netlist text and its licence.** The netlists are Atari/Flare design source with no licence. *Recommendation*: the code describes behaviour in its own words and cites `file:line`; it never transcribes equations or comments. Ask before any closer transcription. 6. **Build a netlist simulation harness?** Verilator 5.053 exists locally (oss-cad-suite under `sm83-python/reference/build`). The Blitter shares the `graphics` island with the GPU harness the jrisc core estimates at 2-4 days (+1-2 days for the Blitter); the Object Processor island 3-5 days; the whole-console testbench port 2-5 days ([validation.md](validation.md)). *Recommendation*: yes, built jointly with jrisc-python as tooling in a git-ignored build tree, before M4; it is the only tier 1 referee either repository can have. 7. **One Blitter.** Written from Tom's netlist modules at bus-cycle level, instead of a fast pixel loop plus an accurate engine as Virtual Jaguar has. *Recommendation*: one. 8. **Tom and Jerry stay inside this board** until a CoJag board exists (chip rule: no other family emulator uses them; no CPU in them besides the jrisc pair, which already has a core). *Recommendation*: yes. 9. **CRY tables.** Use the manual's printed tables; offer friendly reports upstream (MAME's 4 green entries, Virtual Jaguar's 2 red entries, which JagNetlists and MiSTer inherit), naming the model per the posting rule. *Recommendation*: tables yes; posting is Aubrey's call. 10. **EEPROM size by hash.** A small table keyed by SHA-1 for aftermarket images that need a 93C56/66/86, filled from sweep failures. *Recommendation*: yes. 11. **Issues on `m68000-python`** for the three hooks in §3 before M7. *Recommendation*: yes, as issues on the core (core quality-of-life rule), not a fork. 12. **BigPEmu** as a manual detector only (closed source, no trace mode). *Recommendation*: yes. 13. **Remote.** Local until M1 passes, then a private GitHub remote (remotes-as-needed rule). *Recommendation*: yes.