The 128K Spectrums have 70908 T in a frame and the Pentagon 128 has 71680 T. A big difference is that the Pentagon has no contention so that difference is actually larger than it seems if a good deal of time is spent accessing contended memory like the display file.Heimdall wrote: ↑Wed Jun 17, 2020 8:18 am Could you please elaborate a bit on 128K ? I'm asking as I would love to have a parallel [to Next] codepath for a 3.5 MHz rasterizer. Save for 1-bit vs 8-bit, most of rest of the code should be same.
I plan to use a few larger LUTs, hence 128 KB. From what I've seen so far, cycle differences between Pentagon and regular Spectrum aren't huge - well as long as one is only doing low-framerate game, anyway. Couple thousands cycles per frame difference shouldn't matter in a ~10 fps scenario, I reckon.
A couple of websites that give an overview of differences between the models can be found below. They're not complete and not too in depth but they give a good idea about the main issues.
https://faqwiki.zxnet.co.uk/wiki/ZX_Spectrum_128
https://spectrumforeveryone.com/technic ... ty-issues/
For the 128K machines the main thing is that the contended banks are different. The original 128K and +2 contend odd memory banks 1, 3, 5, 7 due to a hardware bug (the intention was to contend banks 4, 5, 6, 7). The +2A/+3 contends banks 4, 5, 6, 7. Amstrad was likely following the original design spec instead of the reality of the first 128K models when it made the +3.
The contention method is also different between the 128K/+2 on the one hand and the +2A/+3 on the other. The former stops the cpu clock and the latter uses the /wait signal and in a different set of circumstances. This leads to different secondary behaviour when programs affected by contention run.
Lastly the floating bus behaviour is different. The 128K/+2 sees the same sort of floating bus behaviour as the 48K and a small number of programs used that to snoop on the ULA to find out which part of the screen was being drawn. Until recently it was thought the +2A/+3 had no floating bus behaviour but it turns out it does, though it must be detected in a different and incompatible way.
If you're writing new software the main thing to worry about is which memory banks are contended because accessing data or executing programs out of contended memory is a lot slower. Because the 128K/+2 and +2A/+3 contend different banks, programs oblivious to this will run more slowly on one machine than the other. There is a huge gotcha in connection to contended ram however --- if the I register points at contended memory and you're executing code out of a contended memory bank, you can cause the machine to crash. I don't know the exact mechanism for this but it has been seen in modern day games, tested on a 128K spectrum, but found to crash on a +2A. Anyway the main outcome of all these words is that you should point I at uncontended memory and you may want to change what memory banks you load stuff into depending on the model so that your code/data sits in (un)contended memory as you intend irrespective of the model.