3 ms·
The slowest bit of emulating old machines is executing everything in lockstep -- people would count CPU cycles, to know exactly how far through drawing the scre
by CJefferson 5y ago
The slowest bit of emulating old machines is executing everything in lockstep -- people would count CPU cycles, to know exactly how far through drawing the screen the console was. It was common to do things like "after drawing line 51 of the frame, quickly reconfigure the graphics hardware to change sprites/colours/etc.
In some cases games would even rely on facts what happened after each cycle of a 3 cycle CPU instruction.
Fortunately for emulator writers, that's not possible on modern hardware. They operate much more like a series of independent boxes, and you can't do such exact cycle counting. That means you can do things like rewrite ARM into x86 and just run the CPU, and only need an approximate count of how many cycles it has done.