This new version of commanderdoesn't work for me sadly.
On my already established version of the emulator it just crashes so downloaded SZ-81 again and installed on a different computer so everything nice and fresh, and whilst it will run your test version of commander there is nothing inside the folders when you open them.
Only the root directory shows executable P files.
Personally this is no problem for me as I have little use for emulation but happy to test and find a solution for others that do.
sz81 emulator
Re: sz81 emulator
I've noticed an interesting issue with the 16kB rezurrection demo on SZ81. On the final screen the text "Calodox - we own ZX81" becomes corrupted, as can be seen in the attached screen shot. This corruption does not occur on my "real" ZX81.
Looking through the rezurrection code, the issue seems to be that a VSYNC is generated shortly before an HSYNC. This results in the linecounter being incremented once too often, compared to a real ZX81, leading to the character corruption. I reassembled the final screen of rezurrection, changing the timing so that the VSYNC coincided with HYSNC, and the issue went away.
I "fixed" this in SZ81 (and my PicoZX81 derivative!) by adding a work around, and effectively skipping the first linecounter increment if VSYNC occurs just before HSYNC. This case was identified by checking the value of the hsync 207 tstate counter at the point VSYNC is triggered.
The question is, from a hardware perspective, does this workaround make physical sense? I did have a look at the latest EO code, and there are checks to merge HSYNC and VSYNC pulses if they occur close together, so hopefully there is a hardware explanation as to why this workaround is valid?
What do you think please?
Looking through the rezurrection code, the issue seems to be that a VSYNC is generated shortly before an HSYNC. This results in the linecounter being incremented once too often, compared to a real ZX81, leading to the character corruption. I reassembled the final screen of rezurrection, changing the timing so that the VSYNC coincided with HYSNC, and the issue went away.
I "fixed" this in SZ81 (and my PicoZX81 derivative!) by adding a work around, and effectively skipping the first linecounter increment if VSYNC occurs just before HSYNC. This case was identified by checking the value of the hsync 207 tstate counter at the point VSYNC is triggered.
The question is, from a hardware perspective, does this workaround make physical sense? I did have a look at the latest EO code, and there are checks to merge HSYNC and VSYNC pulses if they occur close together, so hopefully there is a hardware explanation as to why this workaround is valid?
What do you think please?
Re: sz81 emulator
Thank you for writing about the issue with rezurrection. I seem to remember trying it some years ago and that it worked correctly, so possibly some later improvement introduced the issue. I think it is still unknown how the ULA works exactly, but if something works on a real ZX81 it should work on an emulator (or ULA replacement). But indeed without knowing how the ULA works exactly it cannot be known if an implementation is completely correct. Is your fix available online?
Re: sz81 emulator
Works ok for me on SZ-81 (file no 2.1.8.1) and only corrupts the lettering as the final screen is actually being drawn. once drawn it's ok.
Re: sz81 emulator
@olofsen Thanks for getting back to me, and many thanks for all of your work on SZ81, it is a great emulator, and the code is really nice to work with.
The diff of the workaround can be found at: https://github.com/SegHaxx/sz81/compare ... diff=split
I've also attached the updated zx81.c here.
head.p is just the final screen from rezurrection.
@Moggy Yes the text corruption only occurs as the page is being scrolled up, not after it has stopped at its final position, so I think you are seeing the same thing that I am. There is no text corruption on a "real" ZX81 as it is being scrolled. Am I right in thinking 2.1.8.1 is a Windows build of sz81(aka. 2.3.10)?
The diff of the workaround can be found at: https://github.com/SegHaxx/sz81/compare ... diff=split
I've also attached the updated zx81.c here.
head.p is just the final screen from rezurrection.
@Moggy Yes the text corruption only occurs as the page is being scrolled up, not after it has stopped at its final position, so I think you are seeing the same thing that I am. There is no text corruption on a "real" ZX81 as it is being scrolled. Am I right in thinking 2.1.8.1 is a Windows build of sz81(aka. 2.3.10)?
Re: sz81 emulator
2.1.8.1 is the file version I get when I right click on the SZ-81 EXE and look at the details tab.