Posted By
bubis on 2018-10-24 08:44:56
| Re: Starting off again
Hi Doug,
This is what I would do: 0. Start the game and create a snapshot. 1. Run it for T time, if no crash yet, create a new snapshot. Repeat (1) until you have a crash. 2. Let T=T/2 (or decrease it some other way), load last snapshot and go to (1) again.
This way you will have a series of good states closer and closer to the crashing point. You choose a reasonably close one and debug it in the emu's monitor.
There is a slight chance that you can automate this in Plus4Emu, because it has Lua scripting. I am not sure if the API for saving snapshots is exposed in Lua though.
UPDATE: I got a quick look on the code. You can't save snapshots from Lua, but it is not difficult to add this functionality. The source files of interest are: script.hpp/.cpp and plus4vm.hpp/.cpp. The Plus4VM has saveState(...)/loadState(...) functions, but currently only saveProgram(...)/loadProgram(..) is exposed in Lua.
|