Closed kborowinski closed 4 years ago
Should be working now in current GitHub, also "nextreg $50-$57"-banking. Use "Z80N": true in "zsim" configuration.
I just saw your commits! Thanks mate! I'll test it later today!
I just couldn't wait and compiled the latest DeZog. There is a problem in zsim when debugging with interrupts enabled. I get the Z80CPU Error: IM 0 not supported. It's easy to workaround by just forcing IM 1 before enabling interrupts but I guess that should be a default.
Edit:
Can I ask for another feature. To display T-States in debug console window for executed instructions?
The IM is set to 0 on reset according Zilog spec. On the other hand I implemented Spectrum like interrupts that occur every 20 "ms". Normally the Spectrum ROM switches to IM1. But without an "interrupt" happens and the mode is still 0.
Changing the IM to 1 doesn't sound right. I.e. one could use the simulator also for plain Z80 simulation, not ZX Spectrum.
I guess it's better that I add another option: Something like "zxVerticalInterrupt": true/false. But it means you have to take care yourself for the right IM mode.
For T-states: Do another feature request :-) (I didn't know that it is so helpful)
OK, that sound right. I tend to forget that this is not only ZX Spectrum emulator. The zxVerticalInterrupt will do. As for the T-States I find it very helpful to have it in debug console (similar to Zesarux output). I'll do feature request ASAP.
Since zsim supports ZX Spectrum Next memory layout it would be worth to add Z80N support to the emulator as well.