English | Espaรฑol
An ultra-clean, state-of-the-art CHIP-8 Virtual Machine & Interactive Debugging Workstation built with pure Vanilla JavaScript (ES6 Modules), HTML5 Canvas, and modern CSS3. Designed with Clean Code and Clean Architecture principles, featuring zero external runtime dependencies.
- Pure Architecture & Zero Dependencies: 100% standard web technologies (HTML5, CSS3, ES6 Modules, Web Audio API). No npm installs, webpack, vite, or external frameworks needed.
- Time-Travel Debugging:
- Continuous Rewind: Hold Backspace or Tab during gameplay to smoothly rewind time up to hundreds of frames back.
- Single-Instruction Step-Back (F8): Step backward precisely one CPU opcode at a time to inspect previous register states and branching decisions.
- Live Didactic Disassembler: Real-time opcode decoding accompanied by natural-language explanations explaining why the CPU is executing each operation and highlighting register value changes.
- Immersive Retro CRT Fullscreen: A vintage 1970s curved television chassis complete with beveled bezels, phosphor glass reflections, scanlines, knurled rotary knobs, and illuminated status indicators.
- Hardware Inspector with 7 Interactive Tools:
- ๐ Registers & Stack: Live general-purpose registers V0-VF with delta pulsing, plus PC, I, SP, DT, ST, and 16-level call stack preview.
- ๐ Trace Log: Detailed chronological execution log with opcode mnemonic decoding, freeze-inspection mode, and auto-scroll control.
- โน๏ธ ROM Details: Comprehensive technical metadata, release year, recommended controls, and synopsis.
- ๐ป TTY Console: Standard output stream for system messages and developer telemetry.
- ๐ฎ ROM Catalog: Categorized library of built-in games, graphics demos, tests, and utility programs with drag-and-drop support.
- ๐บ๏ธ RAM Heatmap (4KB): Interactive memory visualizer showing interpreter reserved regions, fontset, and live program space with mouseover address inspection.
- ๐พ Sprite Viewer & Audio Oscilloscope: Real-time 8-pixel sprite visualizer for pattern address
Iand Web Audio square-wave oscilloscope.
- Smart Floating Tooltips Engine: Zero-clipping floating tooltip overlay mounted directly on
document.bodythat automatically clamps within viewport boundaries and flips below elements near the screen edge. - 6 Curated Retro Themes: Jeffrey Massung Slate, NES Classic (1983), Super Nintendo (1990), Terminal Green VT220, Amber CRT, and Game Boy DMG-01.
- Zero-Collision Controls: Essential gameplay keys (R, S, F, Space) are 100% reserved for virtual machine execution without conflict.
Enter fullscreen (F11) to center the display inside a curved, 1970s wood-and-gold cathode-ray tube television:
Easily switch between all 7 diagnostic tools using the navigation arrows (โน / โบ) or the 1/7 โพ quick menu:
Inspect executed instructions step-by-step with plain-English descriptions and register diff tags:
Switch visual aesthetics instantly in real time without restarting your game or losing machine state:
| Terminal Green (VT220 Phosphor) | Game Boy (DMG-01 1989) |
|---|---|
![]() |
![]() |
| NES Classic (1983 Nintendo) | SNES Super Famicom (1990) |
![]() |
![]() |
| Cyberpunk (Outrun Synthwave) | Jeffrey Massung Slate (1977) |
![]() |
![]() |
| CHIP-8 Hex Key | PC Keyboard Key | CHIP-8 Hex Key | PC Keyboard Key |
|---|---|---|---|
1 |
1 |
C |
4 |
2 |
2 |
D |
R |
3 |
3 |
E |
F |
4 |
Q |
A |
Z |
5 |
W (or Space) |
0 |
X |
6 |
E |
B |
C |
7 |
A |
F |
V |
8 |
S |
9 |
D |
| Action | Primary Shortcut | Alternative |
|---|---|---|
| Play / Pause | P | Escape |
| Step Back 1 Instruction | F8 | Shift + F10 |
| Step Forward 1 Instruction | F10 | โ |
| Step Forward 1 Frame (1/60s) | F9 | โ |
| Continuous Rewind (Hold) | Backspace | Tab |
| Reset Virtual Machine | Alt + R | โ |
| Fullscreen Mode (CRT TV) | F11 | Alt + Enter |
| Quick Save State | F1 | Alt + S |
| Quick Load State | F5 | Alt + L |
| Take Screenshot (PNG) | F12 | โ |
| Keyboard Shortcuts Modal | ? | Toolbar Button |
The application follows strict modular decoupling with separation of concerns:
CHIP-8-Studio-Debugger/
โโโ index.html # Semantic HTML5 layout with resizable workstation panels
โโโ css/
โ โโโ styles.css # CSS3 with themes, responsive layout, CRT shaders & smart tooltips
โโโ js/
โ โโโ chip8.js # Pure Virtual Machine core: CPU, registers, memory, opcode decoding
โ โโโ disassembler.js # Opcode decoder with natural-language didactical explanations
โ โโโ time-travel.js # Circular buffer snapshot engine (rewind & instruction step-back)
โ โโโ audio.js # Web Audio API square-wave synthesizer & oscilloscope
โ โโโ keypad.js # 16-key hex keypad state manager & default key mappings
โ โโโ themes.js # 6 CSS theme profiles with dynamic token application
โ โโโ i18n.js # Bilingual dictionary (English / Spanish) & DOM reactive translator
โ โโโ ui.js # UI controller, floating tooltips, panel resizers, and event glue
โ โโโ app.js # Application orchestrator, game loop (requestAnimationFrame), and ROM loader
โโโ roms/
โ โโโ games/ # Classic ROMs: Space Invaders, Pong, Tetris, Pacman, etc.
โ โโโ demos/ # Graphic & audio demos: Stars, Sierpinski, Maze, etc.
โ โโโ programs/ # Clock, Keypad Test, Life, etc.
โ โโโ manifest.json # Structured ROM catalog metadata
โโโ docs/
โ โโโ assets/ # High-resolution screenshots and showcase images
โโโ tests/
โโโ chip8.test.js # Complete unit test suite for CPU opcodes & edge cases
โโโ disassembler.test.js# Validation for disassembler accuracy
โโโ shortcuts.test.js # Automated collision & separation audit for all keyboard keys
โโโ themes.test.js # Verification of all 6 theme CSS tokens
โโโ trace.test.js # Trace log & circular buffer limit testing
Since this project uses native ES6 modules without compilation or build steps, run it using any local static web server:
python3 -m http.server 8080Open http://localhost:8080 in your browser.
npx serve .Right-click on index.html and select "Open with Live Server".
Run the built-in Node.js native test runner (zero external testing libraries required):
node --test tests/*.test.jsAll 24 test suites validate:
- Fontset & memory layout (0x000 - 0x1FF and 0x200 start)
- Arithmetic, bitwise shifts, and carry/borrow flags (
VF) - Subroutine jumps, returns, and stack overflow/underflow safeguards
- XOR sprite blitting and collision detection
- Save state serialization and deserialization
- Keyboard shortcuts zero-collision matrix
- Theme registry token completeness
This project is licensed under the MIT License - see the LICENSE file for details.









