To further my challenge of perfecting my zx81 emulator I shifted testing to focus on Z-Xtricator and its pseudo hires INT mode 2 routine. It has been an excellent exercise for identifying and correcting some flaws.
1) Have any of you fired up Z-Xtricator on a real ZX81 recently? See the attached screen shots on my emulator and Eighty One (via WINE on Mac OS X). Both seem to have a too short lefthand side margin (but only in the main scrolling game section using the hires routine). My effort seems to be off by 16 pixels and Eighty One by just 8 pixels. Before I start analysing the cycles used in this routine, on a real machine is the margin centred correctly with the 4 characters in both side margins?
2) Why did Software Farm decide to split it into two tape files? Any technical reason? The only advantage I can fathom is perhaps cheaper production costs with a shorter tape by using both sides of the cassette.
3) http://www.pictureviewerpro.com/hosting ... refarm.htm - So any update on Julian Chappell's whereabouts post Software Farm?
This screenshot also shows the first video line is offset after the top margin, which had me stumped for months with my own emulator until I read Wilf’s article: http://www.user.dccnet.com/wrigter/inde ... 81WAIT.htm (in addition to all the other points in his excellent Video Tutorial http://www.user.dccnet.com/wrigter/inde ... torial.htm) Paraphrased in my own source code comments: “The TR1 in the ZX81 schematic is used for syncing the NMI response at L0066. This is done by inserting the WAIT state betweens T2 and T3 of the M1 cycle of the RST to L0066. In other words, after the first 2 clock cycles (T1 & T2), for the remaining duration of the NMI pulse the normal 11 cycles to get to L0066 is extended by waits so that the NMI routine always starts at exactly the same point within the 206 repeated cycles.”. Eventually after careful experimenting I had something that worked with technically justifiable values from the explanations found in various web sources documenting the Z80 and ZX81. Seemed to work well in all cases until I came across this margin problem in Z-Xtricator… So back to reviewing large instruction traces and their cycles against the interrupts..
sirmorris - Took me couple of attempts to load the p files on Spud81 for the Z-Xtricator until I found a different set of files on the web that loaded perfectly. I suspect some .p sources for some reason have a strange E-LINE value, which often isn’t a problem if it is just being plonked into the memory instead of being tape loaded.
In my experience some programs omit the $80 value as last byte as marker for VARS_ADDR / begin of WORKSPACE.kpalser wrote:sirmorris - Took me couple of attempts to load the p files on Spud81 for the Z-Xtricator until I found a different set of files on the web that loaded perfectly. I suspect some .p sources for some reason have a strange E-LINE value, which often isn’t a problem if it is just being plonked into the memory instead of being tape loaded.
The emulator Eightyone takes the program anyway but real hardware won't when this byte is missing.
For some reason EightyOne make the border a little too wide and has a nasty hangover on the right edge when running FortyNiner.
The positive thing from all this is I've decide to update Spud81 and add a few more features, ideas welcome!!
Just a thought.
You're right about eighty one there does seem some jiggery pokery going on with the screen display at certain times.
The H4th ROM runs ok display wise on eighty one but burn the ROM file to an EPROM and use on real kit, the screen is definitely too far up and to the right.
Also if you print a full screen of chr$ then invert the screen the mask is printed one chr$ to the left leaving a one chr$ wide non-inverted right hand margin.
But on eighty one runs ok so suggesting a bit of kerfluging somewhere.
So obviously in the photos below I’m using a modern TV 16:9 flatscreen. This is with the original TV lead (no composite video mod) and the result is some shocking ghosting.
Important detail: Even before I load Z-Xtricator into the real ZX81, when I filled the screen with characters I could see that the left hand side margin is about 12% larger than the right margin. I take this to be just negligible given that the TV is processing an old analogue signal. Certainly it is no where near the in 1:3 margin difference in favour of the RHS during the hires routine. This detail aside, the image is stretched proportionally along the width of the screen.
Conclusion from the photos:
The Z-Xtrictor has a clearly smaller LHS margin. The RHS margin is approximately double the width.
Since there is already a 12% error noted above in the TV margin before running the game, it would be fair to assume that under perfect conditions the LHS margin would be even smaller and even closer to my emulators results.
So I am satisfied that my emulator is reproducing accurately the correct margins for this game. If someone can prove me wrong I’d genuinely welcome your input (for example pics on a good CRT display).
Another strange point about the game. Depending on the p file sources that I load into my real ZX81 there are versions with a start screen and versions without. The following is from the .P Package from http://www.zx81stuff.org.uk/zx81/genera ... cator.html.
Note that it is perfectly centred. I can’t tell you whether the same is true of the in game graphics because it soft reseted as soon as I passed the screen that explains the keys to use to control the ship. If you do add more images or test data to this thread please include the URL to the game source files used.