Skip to content

Jabolol/gameboy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gameboy

An accurate gameboy emulator written in C from scratch.

development

In order to run the emulator, you need to have cmake, a build system like ninja and a C compiler. SDL2 is included as a submodule and will be compiled along with the project.

  1. Clone the repository
git clone --recurse-submodules git@github.com:Jabolol/gameboy.git .
  1. Add the ROMs directory with the ROMs to be loaded in the web version
mkdir ROMs && cp /path/to/rom.gb ROMs
  1. Compile the project
cmake -B build -G Ninja && cmake --build build
  1. Run the emulator
./build/gameboy /path/to/rom.gb

features

  • Bus (Memory Management)
  • CPU
  • PPU (Graphics)
  • Input (Joypad)
  • Timer
  • Interrupts (V-Blank, LCD, Timer, Serial, Joypad)
  • MBC1 (Memory Bank Controller 1)
  • Save States (.sav files)
  • Web version at gameboy.deno.dev

controls

  • Arrow Keys - D-Pad
  • A - A
  • B - B
  • Enter - Start

web version

The emulator is also available as a web version using emscripten and deno. In order to run the web version, you need to have deno installed.

Some games are preloaded in the web version, just append ?game=${game} to the url to load a different game. The supported games are shown here.

The web version will bundle the ROMs available at ROMs directory and serve them at http://localhost:8000.

deno task --cwd www start

screenshots

Legend of Zelda, The - Link's Awakening

Dr. Mario

Mega Man - Dr. Wily's Revenge

Contra - The Alien Wars

Kirby - Dream Land

Tetris

resources

license

This project is licensed under the MIT License - see the LICENSE file for details.

About

An accurate GameBoy emulator written in C from scratch

Topics

Resources

License

Stars

Watchers

Forks

Languages