-
BUG in SZX snapshots ???
I create snapshots of same code in ZX emulators ZXSPIN, SPECEMU, SPECTACULATOR, FUSE and one with SNAPCONV convertor.
In snapshot is this code:
DI
go OUT (254),A
JR go
Before snapshot saving I set register A to value 1. Probram must set after start blue border.
Each SZX filename contain emulator name ( snap-fuse.szx / snap-spectaculator.szx / snap-specemu.szx / snap-zxspin.szx / snap-snapconv.szx )
result:
- SZX snapshots from emulators SPECTACULATOR / SPECEMU / ZXSPIN write AF and AF' registers correct (as in SZX documentation) - first is LOW BYTE(F) next is HIGH BYTE(A). This snapshots will run incorrect in emulator FUSE - after start SZX is set A=F and F=A. Fuse detect SPIN's SZX snapshot and correct AF values before start.
- SZX snapshots from emulator FUSE write AF and AF' registers incorrect (not as in SZX documentation) - first is HIGH BYTE(A) next is LOW BYTE(F).
Only ZXSPIN detect FUSE's SZX snapshot and correct AF values before start.
Is bug in FUSE or in all other emulators and this documentation ? :
http://www.spectaculator.com/docs/zx.../z80regs.shtml
-
According to documentation, AF regpair is stored as unsigned word- it's not clear how to store without note about byte order. While Spectaculator works in win32 and it's LittleEndian only, first byte of regpair should be F, next byte should be A.
According to FUSE's sources, it's libspectrum library issue:
Код:
...
libspectrum_snap_set_a ( snap, **buffer ); (*buffer)++;
libspectrum_snap_set_f ( snap, **buffer ); (*buffer)++;
libspectrum_snap_set_bc ( snap, libspectrum_read_word( buffer ) );
libspectrum_snap_set_de ( snap, libspectrum_read_word( buffer ) );
libspectrum_snap_set_hl ( snap, libspectrum_read_word( buffer ) );
libspectrum_snap_set_a_ ( snap, **buffer ); (*buffer)++;
libspectrum_snap_set_f_ ( snap, **buffer ); (*buffer)++;
...