Home

Awesome

ProjectDMG

ProjectDMG is a C# coded emulator of the Nintendo Game Boy wich was originally codenamed Dot Matrix Game (DMG).

This is a personal project with the scope to learn about hardware and the development of emulators.

ProjectDMG dosn't use any external dependency and uses rather simplistyc C# code.

All the CPU opcodes are implemented and it passes Blaarg tests. The emulator have accurate cycle timings to the opcode degree. Including Game Boy related hardware design flaws/bugs as the HALT bug, as some software relies on this specific behaviour.

Note: This is not a M-Cycle or micro-ops accurate emulator. Accuracy and syncronization between the various hardware subsystems as the Pixel Processing Unit (PPU), the Memory Managemet Unit (MMU) or the Timer relies on hardcoded fixed values and varies from 4 to 24 CPU cycles depending on the executed Opcode or hardware interrupts.

Compability

Game Boy catalog compatibility should be around +95% as the support have focused on the most popular cartridges types (MBCs 1,2,3 and 5). The full list goes as follows:

Supported Cartridge TypesUnsupported Cartridge Types
00h ROM ONLY08h ROM+RAM
01h MBC109h ROM+RAM+BATTERY
02h MBC1+RAM0Bh MMM01
03h MBC1+RAM+BATTERY0Ch MMM01+RAM
05h MBC20Dh MMM01+RAM+BATTERY
06h MBC2+BATTERY1Ch MBC5+RUMBLE
0Fh MBC3+TIMER+BATTERY1Dh MBC5+RUMBLE+RAM
10h MBC3+TIMER+RAM+BATTERY1Eh MBC5+RUMBLE+RAM+BATTERY
11h MBC320h MBC6
12h MBC3+RAM22h MBC7+SENSOR+RUMBLE+RAM+BATTERY
13h MBC3+RAM+BATTERYFCh POCKET CAMERA
19h MBC5FDh BANDAI TAMA5
1Ah MBC5+RAMFEh HuC3
1Bh MBC5+RAM+BATTERYFFh HuC1+RAM+BATTERY

Note: SRAM save files are not supported at the moment so your progress on games will be lost on exit.

Using the emulator

Execute the emulator and drag and drop a valid Game Boy rom dump to the GUI. The Game Boy will power on and begin execution.

Note: A valid Game Boy BootRom/BIOS file is not needed anymore. The CPU and MMU defaults to post BootRom init values.

Once power on, Input is mapped as:

Screenshots

blaargcpu blaarginstrtiming k1 k2 m1 m2 t z p p2