Changes

Jump to: navigation, search

Speccy Port

199 bytes added, 14:55, 2 April 2023
/* Random numbers */
=====Random numbers=====
Sometimes Spectrum games generated generate random numbers by reading from the Spectrum 's ROM which is always readable in the memory range &0000-&3fff.
''Consequences for CPC:''
- * There is often not enough memory to store the Spectrum ROM in the Amstrad's memory therefore . If the same method can't range read could be useddetermined then possible a smaller range could be stored. * It may would be possible wasteful to store a small part or all of the Spectrum's ROM depending on in the memory range read by the program. * It is possible not legal to use store any part of the CPCSpectrum's ROM when paged in memory* An alternative random number method is needed but 1) it's contents will differ so is likely the random numbers produced will also differ and compared to reading from the ROM therefore the gameplay will would be different (although maybe not enough to . It may be an issue)subtle, it may be significant. An alternative on the CPC is 2) it may take more CPU instructions to do this. Some games may use a function the 'R' register to generate a semi-random number -  ''Consequences for CPC:'' * The R register value is based on the number and which may result in more CPU instructions compared to are executed. It is likely that the Spectrum random number generation method - or worse of instructions between each read of the 'R ' register which is not really random enoughcould differ.
=====Double buffering=====
2,541
edits