/pokegb

A gameboy emulator that only plays Pokemon Blue, in ~70 lines of c++.

Primary LanguageC++MIT LicenseMIT

pokegb

A gameboy emulator that only plays Pokemon Blue, in ~70 lines of c++.

See the technical write-up.

Features

Plays Pokemon Blue (and Red).

Building

Only builds on Linux and macOS AFAIK.

$ make

On macOS, you'll need to create a save file too (just the first time):

$ make rom.sav

Running

Put Pokemon Blue in rom.gb, then run:

$ ./pokegb

The save file is written to rom.sav.

Keys:

Action Key
DPAD-UP
DPAD-DOWN
DPAD-LEFT
DPAD-RIGHT
B Z
A X
START Enter
SELECT Tab

Updating keys

Look for line 30 the source. The following table shows which numbers map to which keyboard keys:

number default key gameboy button
27 X A Button
29 Z B Button
43 Tab Select Button
40 Return Start Button
79 Arrow Right DPAD Right
80 Arrow Left DPAD Left
81 Arrow Down DPAD Down
82 Arrow Up DPAD Up

Replace the numbers on this line with one from the SDL scancode list.