How rck1439/c8emu works
c8emu is a desktop Chip-8 interpreter. The user supplies a ROM, then the client runs an event/update/render loop: Chip8 coordinates ROM loading, emulation, keypad input and drawing; the renderer presents the display and optional debug overlay. CPU execution, RAM, ROM, and call-stack responsibilities are shown separately. The README documents the QWER keypad mapping and F3 overlay. Some subsystem links rely on source-index references or README statements because not all implementation excerpts were provided.
Main entry points: Chip8.cpp Chip-8 coordinator · CPU.cpp CPU execution · Client.cpp Client loop · Renderer.cpp Renderer
Components 20
Desktop client
- Application entry
src/EntryPoint.cpp - Client loop
src/Client/Client.cpp - Window configuration
src/Client/Config.hpp
Chip-8 emulation
- Chip-8 coordinator
src/Emulator/Chip8.cpp - ROM loader
src/Emulator/ROM.cpp - Memory and font
src/Emulator/RAM.hpp - CPU execution
src/Emulator/CPU.cpp - Opcode definitions
src/Emulator/Instructions.cpp - Call stack
src/Emulator/CallStack.cpp - Keypad mapping
src/Emulator/Keyboard.hpp - Chip-8 specification
src/Emulator/Spec.hpp
Display and diagnostics
- Renderer
src/Renderer/Renderer.cpp - Debug overlay
src/Renderer/DebugOverlay.hpp
Core support
- Byte buffer
src/Core/Buffer.hpp - Overlay font data
src/Core/NintendoNESFont.hpp - Random values
src/Core/Random.hpp - Logging and errors
src/Core/Debug.hpp - Shared types
src/Core/Types.hpp
Other components
- ROM user
- SFML
Connections 23
- ROM user → Application entry: starts with ROM
README.md - Application entry → Client loop: creates
src/EntryPoint.cpp - Client loop → Window configuration: uses settings
src/Client/Client.cpp - Client loop → Chip-8 coordinator: loads and updates
src/Client/Client.cpp - Client loop → Renderer: initializes and draws
src/Client/Client.cpp - Client loop → SFML: handles window events
src/Client/Client.cpp - Chip-8 coordinator → ROM loader: loads ROM
src/Emulator/Chip8.cpp - Chip-8 coordinator → CPU execution: updates CPU
- Chip-8 coordinator → Memory and font: owns memory
- Chip-8 coordinator → Keypad mapping: maps key events
src/Emulator/Chip8.cpp - Chip-8 coordinator → Renderer: draws display
src/Emulator/Chip8.cpp - CPU execution → Memory and font: reads and writes
src/Emulator/CPU.cpp - CPU execution → Opcode definitions: dispatches opcodes
src/Emulator/CPU.cpp - CPU execution → Call stack: uses stack
- CPU execution → Random values: generates random values
src/Emulator/CPU.cpp - Memory and font → ROM loader: loads ROM data
- ROM loader → Byte buffer: stores bytes
- Renderer → Debug overlay: renders overlay
- Renderer → Overlay font data: uses font data
src/Renderer/Renderer.cpp - Renderer → SFML: renders graphics
- CPU execution → Chip-8 specification: uses constants
- Memory and font → Chip-8 specification: uses memory layout
src/Emulator/RAM.hpp - Logging and errors → Shared types: uses types
src/Core/Debug.hpp