What means "emulation"?
In computing, emulation is the technique used so one machine gets the same results as another
- PSX: EPSX, PCSX
- PS2: PCSX2
- GBA: VBA, VBA-m
- Wii: Dolphin
- Misc: QEMU
Case Study: Gameboy
- Release date: April 21, 1989
- Discontinued: March 23, 2003
- Z80-like CPU
- 8k RAM
- 8k Video RAM
- 256kb - 8mb ROM
Emulator components
CPU
GPU
MMU
Timer / Input / Sound ...
CPU
Basically maps integer to JS code
0x80 means "Add A and B, then put the result in A"
How CPU are typically implemented
- A huge switch/case table
- Array of functions
- JIT
GPU
4-states machine (hblank, vblank, dma, oam)
Update the screen texture each frame
The Gameboy works with a tile system
Random fun, sorry Scrooge
MMU
- Physical memory: what the driver uses
- Virtual memory: what your program uses
How does this port in Javascript?
Let's use Virt.js!
Many features
- Node-compatible
- Runtime introspection
- Standard devices
- Simple API
- Debug tools
Some examples!
Evolutions to come
More systems
(and more contributors :)
Here we are !
Waiting for your feedbacks