Is there some kind of unit test for saving and restoring the Z-Machine? I’m trying to track down some bugs in my ZVM and am stuck. Most games seem to work great but a minimal I7 game crashes.
Or does anyone have any recommendations for a windows program for diffing binary files? (Manually inspecting the savefile compared to frotz might illuminate the bug.)
A unit test would just save a game and then restore. Maybe also save, restart, restore. You can do that by hand and I guess you’re seeing a crash, which is what the test would tell you.
Try saving in frotz and then restoring in your ZVM, and then vice versa. Hopefully that’ll reveal which side the problem is on.
Thanks to Matthew Wightman I’ve got it working. The problem was I was restoring only bytes not words to the locals and stack. So I’m really confused how it could work for the I6 games. I guess that the I6 function which called @save was relatively close to Main(), and that not many locals or stack values had been pushed.