Game Boy emulator written in C! (for fun)
These steps also work for WSL (Windows Subsystem for Linux)
- Install nix using the Determinate Nix Installer by running this command:
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | \
sh -s -- install- Run this command to build the project:
nix developThat's it!
Run this command to use the emulator:
./gameboy.out <path_to_rom_here>- Install MINGW64
- Download
SDL2-devel-2.32.0-mingw.zipfrom the SDL repository and extract it - Copy the
x86_64-w64-mingw32folder anywhere you want and rename it toSDL2-devel. I put mine in my C: directory. - Edit the
windows.batfile to point to the folder mentioned above - Copy the
SDL2.dllfile from thebinsubdirectory of the folder mentioned above and put it into the project root - Run the
windows.batfile
The exe should now be built!
Run this command to use the emulator:
.\gameboy.exe <path_to_rom_here>I followed this youtube series for all the CPU and PPU code
This article, as well as the resources in the "Further Reading" section
This repository for the nanosleep code used for queueing audio