No ROM files found in roms/ directory. Select ROM files below, or place them in the roms/ folder.
Not loaded (required)
Not loaded
Not loaded
Not loaded
Not loaded
Not loaded
Not loaded
Not loaded (for TRD/SCL disks)
You can also drag & drop ROM files onto this dialog.
Select File to Load
The archive contains multiple files. Select one to load:
0RZX:-๐ผ๐พ๐พ-
Bookmarks:
Search:
Regs
System
Flags
Stack
Pages
DEC0
HEX0
OCT0
BIN0
ASCII
History
Bookmarks:
Search:
No breakpoints
No labels
POKE:
Auto-Map:
XRefs:
Text:
Page 1/1
Export:Stop:
Include:
Port I/O:
Port filter:
All ports (no filter)
Output
Press Assemble to compile
0000h: 8x8
Keyboard Port (IN #xxFE)
Read keyboard half-rows via port #FE. High byte selects row(s). Bit = 0 when key pressed (active low).
High Byte
Bit 0
Bit 1
Bit 2
Bit 3
Bit 4
#FE (254)
Shift
Z
X
C
V
#FD (253)
A
S
D
F
G
#FB (251)
Q
W
E
R
T
#F7 (247)
1
2
3
4
5
#EF (239)
0
9
8
7
6
#DF (223)
P
O
I
U
Y
#BF (191)
Enter
L
K
J
H
#7F (127)
Space
Sym
M
N
B
Bits 5-7 always return 1. Multiple rows can be scanned at once (AND high bytes together).
Kempston Joystick (IN #1F / #DF)
Read joystick state via port #1F (or #DF). Bit = 1 when pressed (active high โ opposite to keyboard!).
Bit
Direction/Button
0
Right
1
Left
2
Down
3
Up
4
Fire
5-7
Not used (typically 0)
Kempston Mouse
Mouse interface uses three ports:
Port
Function
Notes
#FBDF
Buttons
Bit 0=Right, Bit 1=Left, Bit 2=Middle (active low: 0=pressed)
#FFDF
X position
0-255, wraps around
#FADF
Y position
0-255, wraps around
Input State Summary
Device
Pressed State
Not Pressed
Keyboard
0 (active low)
1
Kempston Joystick
1 (active high)
0
Kempston Mouse buttons
0 (active low)
1
Border/Attribute Colors
Value
Color
Bright
0
Black
Black
1
Blue
Bright Blue
2
Red
Bright Red
3
Magenta
Bright Magenta
4
Green
Bright Green
5
Cyan
Bright Cyan
6
Yellow
Bright Yellow
7
White
Bright White
Border: bits 0-2 of port #FE. Attributes: INK (bits 0-2), PAPER (bits 3-5), BRIGHT (bit 6), FLASH (bit 7).
ULAplus (Extended Palette)
ULAplus extends the Spectrum to 64 simultaneous colors from a 256-color palette.
Port
Function
Access
#BF3B
Register select
Write only
#FF3B
Data port
Read/Write
Register port (#BF3B) format:
Bits
Function
7-6
Group: 00=Palette, 01=Mode
5-0
Palette entry (0-63) when group=00
Palette data format (GRB):
Bits
Color
Range
7-5
Green
0-7
4-2
Red
0-7
1-0
Blue
0-3 (expanded to 0-7)
Blue expansion: 00โ000, 01โ011, 10โ101, 11โ111
Palette organization (4 CLUTs ร 16 colors):
Entry
CLUT
Type
Index
0-7
0
INK
Attr bits 0-2
8-15
0
PAPER
Attr bits 3-5
16-23
1
INK
BRIGHT=1
24-31
1
PAPER
BRIGHT=1
32-39
2
INK
FLASH=1
40-47
2
PAPER
FLASH=1
48-55
3
INK
FLASH=1, BRIGHT=1
56-63
3
PAPER
FLASH=1, BRIGHT=1
CLUT selection: (FLASH ร 2 + BRIGHT). Border uses PAPER color from CLUT 0.
Mode register (group=01): Bit 0 = ULAplus on/off, Bit 1 = Grayscale mode.
Raster effects: HAM256 and similar demos that update palette mid-frame are fully supported. The emulator tracks palette writes with T-state timing and applies them per 16-line group.
AY-3-8910 Sound Chip (128K)
The AY sound chip is clocked at 1.7734 MHz on 128K models.
Port
Function
Access
#FFFD
Register select / read
Read/Write
#BFFD
Data write
Write only
Registers:
Reg
Function
Bits
0
Channel A pitch fine
8
1
Channel A pitch coarse
4
2
Channel B pitch fine
8
3
Channel B pitch coarse
4
4
Channel C pitch fine
8
5
Channel C pitch coarse
4
6
Noise pitch
5
7
Mixer control
8
8
Channel A volume
5
9
Channel B volume
5
10
Channel C volume
5
11
Envelope period fine
8
12
Envelope period coarse
8
13
Envelope shape
4
Mixer (R7): Bit 0-2 = Tone off (A,B,C), Bit 3-5 = Noise off (A,B,C)
48K: Screen lines use 192 T-states for drawing. Memory contention occurs when CPU accesses 4000-7FFF during screen drawing (lines 64-255, T-states 14-126).
128K/+2: Screen lines use 196 T-states for drawing (228 total per line). Contended banks: 1, 3, 5, 7 (odd).
+2A: Same timing as 128K. Contended banks: 4, 5, 6, 7 (high). In special paging mode, contention applies per-slot based on the mapped bank.
Pattern repeats every 8 T-states: 6, 5, 4, 3, 2, 1, 0, 0 (delay in T-states)
I/O contention: ULA port (xxFE) also causes delays when accessed during screen time.
+2A Differences (vs 128K)
4 ROM banks (64KB) selected via ports 0x7FFD bit 4 + 0x1FFD bit 2
Port 0x1FFD: special paging, ROM high bit, disk motor
4 special all-RAM paging modes (port 0x1FFD bit 0 = 1)
Expression evaluation: type formulas like "FF+10*2"
Interactive bit grid for toggling individual bits
History panel preserves calculations when switching views
Base selector disabled during formula input to prevent conversion errors
Disassembly View
Live disassembly from current PC with label support
Click address to set "run to cursor" target
Right-click for context menu (labels, regions, operand format, subroutines)
Hover over addresses to see cross-references
Subroutine separators (IDA-style) for marked routines
Syntax coloring: registers, numbers, chars
Subroutines
Right-click → "Mark as subroutine" to manually mark
Auto-detected during Auto-Map Apply (CALL targets)
Displays IDA-style separator before subroutine start
Uses label name if available, or generates sub_XXXX
Code Folding
Collapse subroutines and custom blocks to reduce clutter in disassembly:
Click ▾ toggle on subroutine header to collapse, ▸ to expand
Collapsed view shows summary: "(N bytes, M instructions)"
Right-click → "Create fold block..." for custom regions (data tables, init code)
User fold markers displayed in magenta
"Collapse all folds" / "Expand all folds" in context menu
Auto-expands if PC enters a collapsed region
Fold state saved in projects and localStorage
Operand Formatting
Right-click any disassembly line and select "Operand format..." to change how numeric operands are displayed:
Hex: FFh, 1234h (default)
Decimal: 255, 4660
Binary: %11111111, %0001001000110100
Char: 'A' (for printable ASCII)
Format settings persist per instruction address and are saved with projects.
Stack View
Shows current stack contents with return addresses highlighted.
Bookmarks
Quick navigation: click bookmark to jump, right-click to set bookmark at current address. 5 slots for disassembly, 5 for memory view.
Context Menu Navigation
Right-click any address in disassembly or memory view for quick navigation:
Disasm left/right: Open address in left or right panel as disassembly
Memory left/right: Open address in left or right panel as memory dump
In memory view, right-click works on both hex bytes and address column
Labels
Labels provide meaningful names for memory addresses in the disassembly view.
Adding Labels
Right-click address in disassembly → "Add Label"
Or use the Labels panel "Add" button
Display Modes
Address only: Show hex addresses
Label only: Show label names
Both: Show "address (label)"
Features
Labels appear in operands: CALL main_loop
Persistent storage per loaded file (localStorage)
Import/Export to JSON files
Click label in list to navigate
Breakpoints & Watchpoints
Execution Breakpoints
Click gutter (left margin) in disassembly
Or press F9 at current PC
Execution pauses when PC reaches breakpoint
Conditional Breakpoints
Add conditions to break only when criteria are met:
Type
Examples
Registers
A==0, HL>4000, BC!=DE
Flags
Z, NZ, C, NC, P, M
Memory
(HL)==FF, (4000)==0, (IX+5)>10
T-states
T>=14335, TSTATES<20000
Operators
==, !=, <>, <, >, <=, >=, &, |
Literals
Hex: FF, 4000h / Decimal: 255
Watchpoints
Break on memory access:
Read watchpoint: Break when address is read
Write watchpoint: Break when address is written
Port Breakpoints
Break on I/O port access (IN/OUT instructions).
Memory Tools
Memory Dump
Hex view with inline editing (click byte to edit)
Click and drag to select range
Right-click selection for region marking
Memory Diff
Click Snap to snapshot current memory
Run the program
Changed bytes are highlighted in the dump
POKE Search
Find memory locations storing game values (lives, score, etc.):
Snap - Take initial memory snapshot
Play game and change target value
Search with mode:
Decreased - value went down
Increased - value went up
Changed - any change
Unchanged - stayed same
Equals - specific hex value
Repeat to narrow candidates
Click result to view in memory dump
Graphics Viewer
View and analyze sprite/tile graphics stored in memory. Features a continuous memory dump view (EmuzWin-style). Access via the Graphics tab.
Memory Dump View
The main area shows memory rendered as graphics. Each byte is displayed as 8 horizontal pixels. A red rectangle marks the current sprite selection.
Controls
Address: Current sprite address (hex). Press Enter to jump.
Width: Sprite width in bytes (1-32). Each byte = 8 pixels. Max 32 = full screen width.
Height: Sprite height in lines (1-64)
Invert: Swap foreground/background colors
Grid: Show grid lines (vertical between bytes, horizontal every 8 rows)
x1/x2/x3: Zoom level for main dump view
Navigation
-1/+1: Move sprite selection by 1 byte
-Line/+Line: Move by one line (width bytes)
-Row/+Row: Move by 8 lines (character row)
-Spr/+Spr: Move by full sprite (width ร height bytes)
-Page/+Page: Move by 24 rows (192 lines ร width bytes)
Mouse wheel: Scroll the dump view
Actions
Mark Region: Mark sprite as Graphics region (stores width/height)
Copy Selection: Copy current selection as assembler DB statements
Save Selection: Save current selection to .asm file
Export All Marked: Export all marked Graphics regions to single file
โ Disasm: Jump to address in disassembly
โ Memory: Jump to address in memory dump
Memory Regions
Mark memory regions for reverse engineering analysis. Affects how memory is displayed in disassembly and memory map.
Region Types
Code
Executable code (default)
DB
Data bytes - shown as DB nn,nn,...
DW
Data words - shown as DW nnnn,...
Text
ASCII strings - shown as DB "text"
Graphics
Sprite/tile graphics
SMC
Self-modifying code
Auto-Map
Automatically detect regions during execution:
Executed addresses marked as Code
Read addresses marked as Data
Code that gets overwritten marked as SMC
Memory Map Dialog
Visual 256x256 map of entire 64KB memory. Click to navigate, colors indicate region types.
Export ASM
Export disassembly as sjasmplus-compatible ASM file from the Memory Map dialog:
Uses memory regions to determine code vs data
Code regions disassembled as Z80 instructions
DB/DW/Text regions exported with appropriate directives
Graphics regions exported as DB with width/height metadata
Includes labels and CPU state in header
Addr+Bytes option adds address and hex bytes as comments
Screen memory ($4000-$5AFF) exported as INCBIN directive
Cross-References (XRefs)
Track where addresses are referenced from in the code.
Generating XRefs
Scan - Scan visible disassembly range
Scan All - Scan full 64KB memory
Runtime checkbox - Collect refs during execution
Viewing XRefs
Hover over an address operand in disassembly to see tooltip showing all references to that address.
Reference Types
CALL - subroutine calls
JP - absolute jumps
JR/DJNZ - relative jumps
LD - data references
File Formats
Snapshots (Load & Save)
Use the Save dropdown to choose format (SNA/Z80/SZX).
SNA
48K/128K - simple format, widely supported
SZX
Spectaculator format with zlib compression
Z80
v1/v2/v3 load, v3 save (48K/128K/+2/Pentagon)
Quicksave / Quickload
Instant state save/restore during gameplay using browser localStorage.
F2
Quicksave - saves current state
F5
Quickload - restores saved state
Also accessible via Save โ Quick (F2) and Load โ Quick (F5). Uses SZX format internally.
Tapes
TAP
Standard tape format
TZX
Extended tape format (turbo blocks, pure tone, loops)
Loading modes:
Flash Load (default, checkbox on): Instant loading via ROM traps - most reliable
Real-time (Flash Load off): Cycle-accurate playback with border stripes and sound
Note: Real-time tape loading is work in progress. Standard loaders and many turbo loaders work; some copy protection schemes may fail. Use Flash Load for problematic tapes.
Input Recording
RZX
Playback with embedded snapshot (may desync)
Disk Images
TRD
TR-DOS disk image (Pentagon/Beta Disk)
SCL
TR-DOS file archive (more compact format)
DSK
+3 disk image (standard and extended CPC DSK format)
Boot File Injection
Automatically add a boot loader to TRD disk images via Settings โ Media โ Boot File:
Click Select... to choose a boot file source (TRD or Hobeta)
Select the injection mode from the dropdown
No change
Load TRD images as-is (default)
Add boot
Add boot only if TRD has no boot file
Replace boot
Replace existing boot, or add if none
Supports TRD disk images and Hobeta files (typically .$b or .$c). When replacing, the new boot file reuses the old boot's disk location if it fits. Settings are saved in localStorage.
Archives
ZIP
Select file from archive dialog
Game Browser (Load โ Web)
Search and download games online from Spectrum Computing (ZXDB database).
Search by title - results sorted alphabetically
View screenshots, year, publisher, genre, authors
Direct download links for TAP, TZX, Z80, SNA files
Drag downloaded files into emulator to play
Powered by ZXInfo API (api.zxinfo.dk). Zero dependencies - works directly from browser.
Project Files
Save/Load complete session state:
Current snapshot
All breakpoints and watchpoints
Labels and comments
Memory regions
Cross-references
Bookmarks
Loaded media (TAP/TRD/SCL) with tape position
AY Music Export (PSG)
Record AY chip output to PSG file format in Settings โ AY Capture:
Record - Start capturing AY register writes
Export - Stop and save as .psg file
Cancel - Discard recording
Changed only - Export only modified registers (smaller files)
Get Player - Download Z80 assembly player source
The player source is sjasmplus-compatible. Use INCBIN "music.psg" to include your recorded music, then assemble to create a playable .sna file.
Screen Export
Capture frames in Settings โ Export section:
ZIP
PNG sequence in ZIP archive
GIF
Animated GIF
SCR
ZX Spectrum screen (6912 bytes)
BSC
Screen + border (11136 bytes)
SCA
Animation format (see below)
SCA Animation Export:
Type 0 - Full 6912-byte SCR frames (larger files)
Type 1 - 8-byte fill pattern + 768-byte attributes per frame (multicolor)
Type 1 Fill Patterns:
Automatic
Detect pattern from screen bitmap
53c (AA 55)
Checkerboard dithering
127c (DD 77)
Ink-biased dithering
Vertical 4x8
4-pixel vertical stripes (F0)
Horizontal 8x4
4-row horizontal stripes (FF/00)
Custom
Enter 8 hex bytes manually
Type 1 is for multicolor animations where bitmap stays constant and only attributes change. Automatic mode detects if screen uses a consistent 8-byte pattern; prompts for choice if not detected.
Z80 Assembler
Integrated sjasmplus-compatible Z80 assembler for writing and testing code directly in the emulator.
ZX-M8XXX stands for ZX Matrix โ a nod to the iconic 8-bit architecture and the intricate web of code, memory, and pixels that make up the Spectrum experience.
License
This software is released under the GPL-3.0 license.
You are free to use, modify, and distribute this software under the terms of the GNU General Public License version 3.
Test Programs: The test programs in the tests/ folder (z80ccf, z80doc, z80docflags, etc.) are copyright of their respective authors. These programs are included for emulator validation purposes only.
Chained prefix interrupts: On real Z80, interrupts can occur between chained DD/FD prefix bytes (each prefix is a separate instruction fetch). This emulator processes prefix chains atomically within a single step, so interrupts cannot occur mid-chain. This rarely affects real software.
Floating bus: Not fully emulated. Some copy protection schemes may not work.
Z80 save uncompressed: Z80 snapshots saved without RLE compression for compatibility (~131KB for 128K, ~49KB for 48K).
Technical References
Z80 CPU User Manual (Zilog)
The Undocumented Z80 Documented (Sean Young)
World of Spectrum documentation
Greetings
Greetings fly out to:
The ZX Spectrum demo scene and retro computing community
All the developers keeping the Speccy spirit alive
Everyone who contributed to documenting the Z80 and ZX Spectrum hardware
Amstrad for allowing free distribution of Spectrum ROMs