matja from WOS has recorded a RZX file with Fuse 1.1.1 and gets this error on playback:
Wrong number of INs in frame 0: expected 14, got 8
The file has some embedded snapshots and Fuse stops the playback after loading the snapshot located at block 63. The last instruction in the previous frame is HALT and a .Z80 snapshot can't store this state. libspectrum_z80_write2() consider that a minor info loss, which could be right for the initial snapshot but IMO we should use .SZX snapshots to store intermediate states on RZX recordings as they are more reliable.
I've attached a patch and a RZX file rearmed with SZX snapshots. Fuse properly plays the new recording.
But Spectaculator and SpecEmu stop the playback after loading the snapshot located at block 2. In this case the snapshot happens in the middle of a long LDIR. I suspect that Fuse is saving a bad snapshot but I can't see what is wrong.
I think that using SZX snapshots in these circumstances is reasonable.
The proposed patch is simple and assumes the SZX format for embedded snapshots. A finer solution would be to elevate some checks from MINOR_INFO_LOSS to MAJOR_INFO_LOSS: `halted' for sure. Maybe last_instruction_ei and last_instruction_set_f too.
Yes, that sounds like another good option.
Committed in [r5070]. That fix the playback of Raster Scan on Fuse.
Unfortunately, recordings of this game show some kind of incompatibility between Fuse and SpecEmu/Spectaculator, e.g.,
Spectaculator:
Specemu:
The incompatibility fades away if the recording is finalised. I suspect it has to do with retriggered interrupts.
Related
Commit: [r5070]
I've rearmed this rzx file again with fresh snapshots to test recent changes in the z80 core. The rzx done with Fuse is still not playable with Spectaculator and Specemu.
Spectaculator:
Not enough port reads for frame 1 (8 available, 0 requested).
Specemu:
Incorrect IN count. Expected 8, executed 0 during frame 252.
These patches were used for dumping fresh snapshots and the script for rearming the rzx file.
On a second thought, not saving the initial snapshot as SZX format could also lead to trouble. I'll set the SZX format barring objections.
Related discussion:
http://www.worldofspectrum.org/forums/discussion/50962/
Sounds good to me!
Commited in [r5528].
Despite previous efforts being worthwhile, I still can't close this bug. It seems that RZX files with interspersed snapshots cannot be played back with Spectaculator or Specemu.
It seems a generic problem rather a game specific issue, e.g., this recording without keypresses.
Related
Commit: [r5528]