diff options
| author | gbc dev <gbc@localhost> | 2026-07-15 16:53:28 +0200 |
|---|---|---|
| committer | gbc dev <gbc@localhost> | 2026-07-15 16:53:28 +0200 |
| commit | 95fa3f0095d6f383840992cab6833cac92493a60 (patch) | |
| tree | b0ce39e89f15bdffbe38c3f1896750e702644952 /src/control.h | |
| parent | tools: stitch_overworld.py - DFS EXPLORE's connection graph into one overworl... (diff) | |
| download | sl0pboy-95fa3f0095d6f383840992cab6833cac92493a60.tar.gz sl0pboy-95fa3f0095d6f383840992cab6833cac92493a60.tar.xz sl0pboy-95fa3f0095d6f383840992cab6833cac92493a60.zip | |
control: video frame capture + deterministic input-movie replay
Two socket features for building reproducible showcase clips:
- record start <path> [everyN] / record stop: append the RGB888 framebuffer of
each produced frame to a flat 'GBCV' capture file (downsample with everyN).
tools/gbgif.py turns it into a GIF (or PNG frames). Capture is decoupled from
wall-clock/turbo/frameskip, so timing is always correct.
- input play <path> [reset] / input stop: drive the joypad from a synthesized
TAS-style movie (text: '<frames> [buttons...]' per line), frame-locked so
replay is deterministic. 'reset' does an exact power-on (preserve cart
ROM+SRAM, zero all other state) so a movie replays byte-identically -- verified
by hashing two runs. tools/gbmovie.py is a Python builder for movies.
Diffstat (limited to 'src/control.h')
| -rw-r--r-- | src/control.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/control.h b/src/control.h index a625853..db5ee93 100644 --- a/src/control.h +++ b/src/control.h @@ -33,4 +33,12 @@ bool control_paused(void); // is inactive this simply runs a full frame like the plain emulator loop. void control_run_frame(GB *gb); +// If a recording is active (see the `record` command), append the frame just +// produced by control_run_frame() to the capture file. No-op otherwise. +void control_record_frame(GB *gb); + +// If a movie is playing (see the `input play` command), set this frame's joypad +// state from it. Call once per loop iteration *before* control_run_frame(). +void control_input_frame(GB *gb); + #endif |
