Emulation
Pretend to be a SNES. The emulator reads the game’s machine code as data and carries out each instruction as it comes.
- The game’s machine coderead as data, a few bytes at a time
- Interpreter loopfor every instruction, every time it runs
- A simulated SNESCPU, RAM, graphics, sound and DMA, kept in step
- Your OS, GPU and audio
- Your CPU
- Emulator source codewritten once, for every game
- C compileroptimizes the emulator, not the game
- Nothing game-specificthe emulator loads the ROM as is