play96
play96 is a Rust library and CLI for running *96 libretro fantasy-console
cores in automated test harnesses. It can step cartridges frame by frame,
control input, inspect framebuffer pixels, make assertions, capture PNG files,
exercise save states, and compare deterministic frame logs.
Build and test
The build produces the play96-cli executable and Rust, C, and C++ compatible
libraries. C headers are in include/.
Rust library
Add the repository dependency to a test harness or library:
[]
= { = "https://codeberg.org/compu96/play96.git" }
For a packaged release, use play96 = "0.1" after publishing it to the
configured Cargo registry.
use ;
pixel and pixel_xrgb return colors for custom assertions. Failed built-in
assertions report the coordinate and both expected and actual colors.
Only one Session may execute at a time because libretro callbacks are global
to the dynamically loaded core.
C++ wrapper
Link against the generated play96 library and include include/play96.hpp:
int
The wrapper throws std::runtime_error when loading, execution, or an
assertion fails. include/play96.h provides the underlying exception-free C
ABI for other languages.
CLI
Screenshots are written as PNG files. A recorded netplay log can be checked by
running the same command with --netplay-check instead of --netplay-log.