3 ms·
Static code. Also, very fine details of the machine because less important. When emulating a NES (for example), you really have to emulate every register, how
by CJefferson 6mo ago
Static code. Also, very fine details of the machine because less important.
When emulating a NES (for example), you really have to emulate every register, how registers change, and also weird effects like instructions that take longer to read or write values, as games rely on that stuff. Once you have modern systems where much of the code was originally C, it becomes less important to ensure every register has exactly the right values when a subroutine finishes in most cases, you can rely that (most) of the code follows standard calling conventions.
- charcircuit 6mo agoYou really don't. Most of the time the code will be doing normal things. So you can have other code that also does the same thing. >and also weird effects like instructions that take longer to read or write values The percentage of a code in the ROM that depends on such things is a small percent.
- CJefferson 6mo agoThe problem with NES emulation (having written a fairly bad one) is it can be hard to predict when you need to be careful, particularly in the presence of self-modifying code and interrupts. If it was easy to figure out, emulators wouldn't have to keep such careful track of this stuff either.