The $(EMU) target only depended on main.cpp and shim.h, so editing the
sketch (.cpp) did not trigger a rebuild - stale binaries silently ran.
Add the sketch to the prerequisites; propagate to cyberspace-demo copy.
Make the template foolproof to copy-and-fill for a new demo:
- examples/Conway/ replaced by a neutral examples/Demo/Demo.cpp sample
(bouncing box) documenting the full sketch contract (setup/loop,
emuGfx::fb, emuGfx::dirty, emu::keyboard)
- Makefile passes the sketch path as -DAPP_SRC; main.cpp now includes
APP_SRC instead of hardcoding Conway.cpp, window title uses APP_NAME
- Safety hatch: emulator auto-exits after 10 seconds by default so a
runaway demo can't hang and eat resources; --user-run disables the
cap, --timeout MS adjusts it (default 10000)
- README rewritten as a step-by-step recipe: replace the Demo sketch,
run 'make run'; documents all CLI flags, drops the unimplemented
--dump-interval flag
Verified: fresh copy + sketch swap builds and renders; hatch fires at
10s (and at --timeout 2000); --user-run runs until --frames cap.
Complete self-contained SDL3 emulator-only template for prototyping
sketches without hardware:
- Makefile: single-TU build (host + sketch), run/smoke/clean targets
- shim.h: minimal Arduino API shim (millis, random, String, GPIO stubs)
- src/main.cpp: SDL3 host loop presenting emuGfx::fb, CLI frame dumps
- examples/Conway: Conway.cpp sketch + .ino reference copy
- .gitignore: exclude built binaries and captured BMP frames
The Conway sketch previously started with paused=true, which prevented
render() from being called each frame, leaving the framebuffer all-black
and resulting in a black SDL3 window. Changed to paused=false so the
simulation runs immediately.