P1
P2
P1: โ โ โ โ = D-Pad | Z = Btn1 | X = Btn2 | Enter = Pause
P2: W/A/S/D = D-Pad | Q = Btn1 | E = Btn2 | R = Pause/Reset
๐ง Debug Panel
โผ
CPU Registers cpu/z80.js
Flags
VDP Registers vdp/tms9918a.js
Disassembly debug/disassembler.js
Breakpoint debug/debugState.js
๐ ROM Protection
๐ Memory Corruption
Memory Viewer memory/memoryMap.js
๐งช Z80 CPU Test Suite cpu-tests/
Validate Z80 CPU accuracy using standard CP/M-based test ROMs. The test harness uses a flat 64KB memory model with BDOS call traps, completely independent of the SG-1000 memory map.
Load Test ROMs cpu-tests/roms/
Not loaded
Not loaded
Not loaded
Test Results cpu-tests/testRunner.js
Test
Status
Cycles
Expected
Diff
Instructions
prelim.com
โ
โ
8,721
โ
โ
zexdoc.cim
โ
โ
46,734,978,649
โ
โ
zexall.cim
โ
โ
46,734,978,649
โ
โ
Test Console Output cpu-tests/testHarness.js
Architecture Notes
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ cpu-tests/testHarness.js โ TestIO โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Flat 64KB Memory (Uint8Array(0x10000)) โ โ
โ โ No mapping, no mirrors, no VDP/PSG โ โ
โ โ readByte(addr) / writeByte(addr, val) โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ CP/M BDOS Trap Mechanism: โ
โ 0x0000: OUT (0),A โ testFinished = true โ
โ 0x0005: IN A,(0) โ BDOS console output โ
โ 0x0007: RET โ return to caller โ
โ โ
โ Port 0 Intercept: โ
โ OUT โ program exit IN โ BDOS call (C reg) โ
โ C=2: print char(E) C=9: print string at DE โ
โ โ
โ ROM loaded at 0x0100 (CP/M .COM convention) โ
โ CPU.pc starts at 0x0100 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Z80 CPU (cpu/z80.js) uses pluggable I/O interface:
โข SG-1000 mode โ memory/memoryMap.js + io/ports.js
โข Test mode โ cpu-tests/testHarness.js (TestIO)