Skip to content
GattoDev edited this page Jul 23, 2026 · 3 revisions

HW-SW

A fake retro hardware stack running inside Godot Engine. It has a CPU, a PPU (graphics), APU (audio), and RAM (memory) — all written in GDScript — and you program it by writing ROM scripts that talk to the hardware to make things happen on screen and through speakers.


How to run it

  1. Get Godot 4.6.3-stable
  2. Open the project
  3. Press F5

Controls while running:

Key What it does
Enter Pause / unpause the CPU
Page Down Trigger a crash (demo ROM only)

How it fits together

CPU
├── PPU  (graphics)
├── APU  (audio)
├── RAM  (memory)
└── ROM  (your program)

The CPU creates the PPU, APU, RAM, loads the ROM, injects references to everything into it, and calls rom.tick(delta) every frame. That's the whole system.


Pages

  • CPU — lifecycle, halt, panic
  • PPU — framebuffer, drawing functions, font
  • APU — channels, waveforms, register interface
  • RAM — memory
  • Writing a ROM — how to write programs for this thing

Clone this wiki locally