This is an incomplete, experimental Nintendo GameBoy emulator written in C++. It runs Tetris!
If you're here for a Delta Winter of Code project, check out the Contributor's Guide in the Wiki.
-
Install CMake (> 3.5.1)
On Ubuntu, run
apt install cmake
Otherwise, you can download the binaries from cmake.org/download
-
Install SFML
On Ubuntu, run
apt install libsfml-dev
Otherwise, download / build the library from sfml-dev.org
-
Clone the project and run
mkdir build && cd build
-
cmake .. -DCMAKE_INSTALL_PREFIX=<path_to_someplace_to_install> -DCMAKE_BUILD_TYPE=Release
You can skip the
CMAKE_BUILD_TYPE
flag (or set it toDebug
) if you want to run unit tests. -
make install
-
cd <path_to_someplace_to_install>/bin
-
./tvp --rom /path/to/rom_file.gb
-
Enjoy your game! Use the WASD keys as the GameBoy DPad. Use K, L, Backspace, and Enter keys as A, B, SELECT, and START buttons.
You can build and run tvp in Visual Studio. Open the repo as a folder from Visual Studio 2017 or above, and it should automatically configure CMake.
-
Download the SFML SDK, If Visual Studio cannot find SFML, manually set the
SFML_ROOT
CMake variable to wherever you downloaded the SDK. You can pass this as a command line argument in the run settings with-DSFML_ROOT=<path>
. -
Click
Build All
from the CMake menu. -
Select
tvp.exe
as your launch item. You can edit the launch item properties to set command line arguments. -
Enjoy your game! Use the WASD keys as the GameBoy DPad. Use K, L, Backspace, and Enter keys as A, B, SELECT, and START buttons.
If you don't want to use Visual Studio, you can still download the SFML SDK and set -DSFML_ROOT="your/sdk/download/location"
and run CMake like mentioned above. Install CMake from here.