GameGirl
is a Nintendo Gameboy emulator written in C++.
It was written as a project in the course "Object Oriented Programming (C++) " in 2019.
Building the emulator requires SDL2
and cmake
on Windows
.
(Note: CmakeList.txt needs 2 environment variables:
SDL_PATH: path to sdl
CMKE_MODULE_PATH: path to findSDL2.cmake
)
For test, it has been tested on Windows 10 and Arch Linux.
To complie the project on Windows (need MinGW
environment):
MINGW64 $ cmake .
To complie the project on Linux:
$ g++ ./Catridges/* ./*.cpp ./*.h -o gamegirl.out -O3 --std=c++17 -march=corei7-avx -lSDL2 -lSDL2main
(Note:It uses the avx--Advanced Vector Extensions)
The emulators is using the roms from Blargg's test ROMs
and bgbTest.gb
to test the hardware accurency.
Here are some screenshot of the test.
Using terminal to boot, format: gamegirl path_to_gb_rom \[-c v] [-z v] \[-f v] \[-x v] \[-y v] \[-b] \[-S ]
code | function |
---|---|
path_to_gb_rom | rom file path |
-z | zoomTime |
-c | colorMode |
-f | fps |
-x | window display position x |
-y | window display position y |
-b | use boot (display the logo) |
-S | disable sprites |
The key bindings are: Direction: ↑, ↓, ←, → Selection: X for B, Z for A, Enter for START , Backspace for SELECT.