I built a cycle-accurate SAP-3 8-bit CPU emulator in TypeScript with real-time visualization

This project started as a way to learn computer architecture fundamentals, but grew into a full-featured emulator with some unique features: 🔧 Technical highlights: - TypeScript implementation with Zustand state management - Cycle-accurate execution with microinstruction-level timing - Real-time CPU visualization using React/SVG - Custom assembler with label resolution and macro support - Banking system for >256 byte programs - WebSocket-based program sharing The emulator runs in the browser and includes an interactive schematic that lights up as instructions execute. You can watch data flow through registers, ALU, and memory in real-time. Architecture details: SAP-3 extends the basic SAP-1 with expanded instruction set, stack operations, indexed addressing, and conditional jumps. 
submitted by /u/biokys
[link] [comments]