74

Note: This answer mainly focuses on the NES, since that's what I'm most familiar with. Yes; this is called static recompilation or static binary translation, and it is theoretically possible -- jamulator by Andrew Kelly does it. However, recompilation can be incredibly difficult (to the point that falling back to interpretation at runtime may be required ...


13

The problem is that the emulator is emulating a LOT more than just the CPU. So in addition to transpiling the 6502 code to Intel code (and don't think that's simple - making the timing come out right would be a fascinating problem), you also need to provide code (analogous to the standard libraries that any program uses) that provide an emulated I/O ...


5

I don't know if any TurboGrafX16 games suffered from this problem, but they were not fundamentally immune. Any game pushing the limits of a console in this era could have lag frames, even if the limits are higher. A bug could cause it even in a game that doesn't come anywhere near to pushing the limits. A NES with a faster CPU could potentially fix the lag ...


5

You are probably referring to the status register. This is a hardware register in the CPU, and is not stored in RAM. Generally speaking, the HuC6280 is similar to a 6502-family CPU. You may want to acquaint yourself better with those parts; familiarity with them will make the HuC6280 easier to understand.


4

Whether or not it's possible isn't the only defining factor that goes into development. Keep in mind that the quality of an emulator is very much connected to it's ability to create TAS, Savestate, use RAMWatch, and so on, all of which would not be possible if the ROM was converted to a .EXE file. With this in mind, developers haven't been interested in ...


4

The HuC6280 used an instruction set and architecture which was largely identical to the 65C02 -- each instruction is represented by a one-byte opcode, followed by up to three bytes of immediate data. The amount of immediate data is implied by the opcode. (The flags are a CPU register, not part of an instruction.) The HuC6280 appears to support all ...


4

The processor is a modified 6502 so one word is 8 bits. Many instructions are encoded as multiple words but for those the processor just fetches them in sequence when required. I believe the graphics processors use a wider bus, hence the '16' part of the name.


3

Yes, all machines of the era could have this kind of lag frame. The issue here is that under certain very specific circumstances the Nintendo console can't finish all the processing it needs to do in one frame. Normally the game limits the amount of processing to be done so that it all finishes in one frame, but if a particular glitch used in speed running (...


2

Not quite a complete answer; however, many emulators of the consoles like playstation and alike do in some sense the same you are asking about. Instead of precisely executing the code and precisely emulating the hardware, some typical code pieces (mostly connected with 3D transformations and rendering) are recognized as a whole and the end result is just ...


2

Compiling the instructions of an arbitrary processor (e.g. a 6502) into code that will run on a modern PC should be pretty easy. After all, it's not far different from what's done by any just-in-time compiler for a language that's distributed as bytecode (e.g. Java, .NET, and so on) and simpler than a JIT compiler for a language that needs non-trivial ...


Only top voted, non community-wiki answers of a minimum length are eligible