From: Fredrick M. <fr...@sp...> - 2021-03-10 10:31:46
|
Hi Alexander, Just as a caution, I’m no expert on the RZX format or API. > On 10 Mar 2021, at 07:50, Alexander Lyashuk <moo...@gm...> wrote: > > There is libspectrum_rzx_playback_frame() which seems to want to update some pointer to a snapshot (why?), Some RZX files (those that have used the RZX autosaves feature for example) have embedded snapshots inside the file at various points. > and libspectrum_rzx_playback() which gets a pointer to the libspectrum_byte, so maybe it would be able to write the inputs?.. But from which frame/block and how does it know the size.. You might find reading the RZX specs helpful if you haven’t already. https://web.archive.org/web/20080705124004/http://www.ramsoft.bbk.org/rzxform.html <https://web.archive.org/web/20080705124004/http://www.ramsoft.bbk.org/rzxform.html> I think the inputs array for a frame has libspectrum_rzx_instructions() number of values. > There is also a way to iterate over blocks, but doesn't seem to be any way to extract any information except snapshots from the blocks.. The data is probably in the array pointed to by the libspectrum_byte pointer above. > Also I'm a bit puzzled by "libspectrum_rzx_playback: more INs during frame %lu than stored in RZX file (%lu)" error message in libspectrum sources, why would it know about number of actual INs, if it's just a library to read a file. You maybe could reasonably make the argument that its the emulator’s job to track this rather than libspectrums. I wouldn’t know if there was a specific reason it was done this way. Fred |