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/main.c | |
| 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/main.c')
| -rw-r--r-- | src/main.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -137,7 +137,9 @@ int main(int argc, char **argv) { // Emulate a full frame, honoring debugger pause/step/breakpoints when // the control socket is active (otherwise a plain full frame). + control_input_frame(gb); // drive input from a replay movie if playing control_run_frame(gb); + control_record_frame(gb); // append to the video capture if recording // decide whether to draw this frame bool do_render = (since_render >= frameskip); |
