/Gameboy

A simple gameboy simulator in C, developed using Visual Studio on Windows 10. Cross-platform.

Primary LanguageCMIT LicenseMIT

TinyGameBoy

A very naive GameBoy emulator written in C, developed with Visual Studio on Windows 10.

Features

  • Accurately simulate each cpu instruction

  • Support for MBC1, MBC2, MBC3 and MBC5

  • Multimedia using light-weight, cross-platform Simple DirectMedia Layer (SDL) library

  • Window resizing

  • Disable/enable each audio channel individually

Screenshots

tank

tetris

ttt

Building (Windows)

Just open the Visual Studio solution file GameBoy.sln, and build and run it in Visual Studio

The libSDL environment is already configured.

Building (Linux)

only tested on ubuntu

First, install the libsdl2-dev package.

$ sudo apt install libsdl2-dev

Then, do make to build the program

$ make

Last, run the emulator

$ ./gameboy

Running

Action Key
DPAD-UP
DPAD-DOWN
DPAD-LEFT
DPAD-RIGHT
B Z
A X
START Enter
SELECT Return
Disable audio channel 1-4 F1-F4

TEST

Now this simulator can pass the test rom on cpu instructions.

cpu_instrs

BUGS & TODOS

  • Memory banking sometimes not working correctly.

  • Fix bugs in the audio system, now it sounds strange.

    • It seems that using unsigned integer to represent audio signal is a complete fault.
  • Interruption timing needs to be improved.