ZX84
An MCP server providing a ZX Spectrum emulator for AI testing, enabling loading and running of Spectrum software with debugging, display, and audio features.
README
ZX84
A ZX Spectrum emulator for your browser & MCP server for AI testing
https://zx84.envytech.workers.dev
Experience the legendary ZX Spectrum with authentic CRT filtering, and a powerful integrated debugger. Built from scratch in TypeScript with zero runtime dependencies.
This project has been extensively developed using AI - specifically Claude Code.
⨠Features
đŽ Complete Spectrum Family
- 48K â The original rubber-key classic
- 128K / +2 â 128KB RAM, AY sound chip, improved BASIC
- +2A / +3 â Built-in disk drive support with full +3DOS emulation
đšī¸ Authentic Hardware Emulation
- Z80 CPU â Cycle-accurate with contended memory timing
- ULA â Precise video rendering with floating bus emulation
- AY-3-8912 â 3-channel programmable sound chip (128K models)
- Beeper â 1-bit audio with DC-blocking filter
- uPD765A FDC â Full floppy disk controller (+3 only)
đ Universal File Support
Load your software instantly with drag-and-drop:
- Snapshots:
.sna(48K/128K),.z80(v1/v2/v3),.szx(ZX-State) - Tapes:
.tap,.tzxwith instant ROM-trap loading - Disks:
.dskfor +3 models (standard & extended formats) - Archives:
.zipfiles with automatic extraction
đ¨ Authentic CRT Display
Relive the 80s with customizable visual filters:
- Scanlines â Adjustable horizontal line intensity
- Phosphor Masks â RGB aperture grille or shadow mask patterns
- Curvature â Authentic barrel distortion
- Brightness/Contrast â Fine-tune the picture
- Border Modes â None, standard, or full (for overscan effects)
- Sub-frame Rendering â Pixel-perfect rainbow effects including Nirvana+
đĩ Crystal-Clear Audio
- AudioWorklet â Low-latency, glitch-free sound
- Stereo Modes â ABC, ACB, BAC, or mono mixing
- Volume Control â Individual beeper and AY levels
- Frame Pacing â Audio-buffer-driven timing (no drift)
đšī¸ Controller Support
Play your way with multiple input options:
- Keyboard â Full PC keyboard mapping with extended symbols
;,:,',#,?,@,~,{,},-,+,=,_,[,]ESCas BREAK (CAPS SHIFT + SPACE)
- Joystick Emulation â Kempston, Cursor, Sinclair IF2, Sinclair 1
- Gamepad â Dual physical controller support via Gamepad API
- Mouse â Kempston mouse and AMX mouse support
- On-screen D-Pad â Touch and mouse controls
đ§ Powerful Debugger
Built-in development tools for reverse engineering and learning:
- Breakpoints â Double-click to set, visual indicators
- Stepping â Step Into, Step Over, Step Out
- Run to Cursor â Right-click any instruction
- Live Disassembly â Real-time Z80 code view at PC
- Register Inspector â All CPU registers with tooltips
- Memory Viewer â Banking state and layout (128K)
- Execution Tracing â Full, Contention, or Port I/O modes
- Loop Detection â Automatic stuck-loop analysis
đ Activity Monitoring
Watch your Spectrum work in real-time:
- Activity LEDs â Keyboard, Kempston, Tape, Beeper, AY, Disk
- Tape Deck â Block list, position, play/pause control
- Disk Drive â Motor, head, track, sector, operation status
- Performance â T-states/frame, clock speed (MHz)
- Turbo Mode â ~50MHz for fast-loading
đž Smart Persistence
- Auto-save â ROMs stored in IndexedDB
- Last Session â Restores your last loaded file on startup
- UI State â Model, scale, display settings, pane layout
- Custom Fonts â Load and store
.ch8font files
đ¯ Transcription Tools
Extract text and graphics from running programs:
- Pixel OCR â Live character recognition from screen
đ Peripherals
Hardware add-ons for expanded capabilities:
- Multiface 1 / 128 / 3 â Snapshot/poke hardware with NMI button
- VTX-5000 â Viewdata/Prestel modem with ROM overlay (48K only)
- +3 Floppy Drive â Motor and seek sound effects
đ Getting Started
Installation
npm install
npm run dev
Open http://localhost:5173 in your browser.
Quick Start
- Choose a Model â Select 48K, 128K, +2, +2A, or +3 from the hardware pane
- Load a ROM â Click "Load ROM" and select the appropriate ROM file for your model
- Load Software â Drag and drop a
.sna,.z80,.szx,.tap,.tzx,.dsk, or.zipfile onto the window
That's it! For tape files, the emulator will start playback automatically.
Keyboard Controls
- ESC â BREAK (stops tape loading)
- Arrow Keys â Mapped to CAPS SHIFT + 5/6/7/8
- Backspace â DELETE (CAPS SHIFT + 0)
- All symbols â Extended mappings for
;:'"#?@~{}-=_[]
đŽ Controls
Debugger
- Play/Pause â Run or pause emulation
- Step Into â Execute one instruction (when paused)
- Step Over â Execute, stepping over CALLs (when paused)
- Step Out â Run until RET (when paused)
- Double-click â Toggle breakpoint on disassembly line
- Right-click â Context menu with "Run to here"
- Trace â Select mode (Full, Contention, Port I/O, Loop Analysis)
Display
- Scale â 1x to 4x integer scaling
- Border â None, Standard, or Full
- Scanlines â 0-100% intensity
- Curvature â Off, Low, Medium, High
- Mask Type â None, RGB, Aperture Grille
- Sub-frame â Enable for rainbow/raster effects
Audio
- Volume â 0-100% master volume
- Stereo Mode â ABC, ACB, BAC, Mono
đī¸ Build for Production
npm run build # TypeScript check + Vite build â dist/
npm run preview # Serve production build locally
đ License
đ Acknowledgments
Built with inspiration from the ZX Spectrum community and based on extensive hardware documentation. Special thanks to all the homebrew developers keeping the Spectrum alive!
Enjoy your trip back to 1984! đ
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.