spjewkes / jrnz

A work-in-progress ZX Spectrum emulator
MIT License
1 stars 0 forks source link

Valhalla snapshot immediately crashes. #45

Closed spjewkes closed 2 months ago

spjewkes commented 3 months ago

This doesn't seem to happen if I load the same file in Fuse.

I suspect this isn't a z80 instruction issue but something to do with my handling of the snapshot. I've a feeling that I've read somewhere that snapshots that start in the ROM can have problems and this may be the case here.

spjewkes commented 2 months ago

This was exactly the same issue as I found with the Z80 file for Inca Curse. The issue was to do with the way my emulator was handling the IM2 interrupt. With this interrupt, we do not know what the state of the data bus is for the lower byte of the vector address. However, some snapshots and emulators assume this is always 0xff. I'd assumed 0x00. Changing this fixes Valhalla