I was reading an Ars article by someone who'd hacked up Apple II and Atari 2600 emulators to provide state introspection/reproducible input via MCP, sockets, file I/O - would that work?
https://github.com/benj-edwards/atari800-ai https://github.com/benj-edwards/bobbin