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

No breakpoint

๐Ÿ”’ ROM Protection

๐Ÿ”’ ROM is read-only

๐Ÿ’€ Memory Corruption

Ready to corrupt...

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)
          
No ROM Loaded 0 FPS Cycles: 0 Mode: -- ROM: 32KB | Cart RAM: 8KB | Sys RAM: 1KB (mirrored)