My goal is to introduce myself to low level programming and emulators by writing a gameboy emulator in Rust ๐ฆ.
emulator/
- This contains the main Gameboy emulator. You'll find all of the necessary files and the core logic inside this folder.asm/
- This is an assembler for the Gameboy, written in Python ๐, made before starting the emulator. It's very basic and I made it only to list and understand each opcodes.
If you want to try this out or play around with the code, you can do the following:
Clone the repository:
git clone https://github.com/lowczarc/gameboy-emulator.git
Build and run the emulator (from within the emulator/
directory):
cargo run --release <gameboy_rom>
NOTE: You need to have a gamepad to play, I didn't implement keyboard inputs yet
By default the emulator will spin lock instead of using thread::sleep.
If you're on battery or the 100% CPU usage bothers you, you can use the --thread-sleep
option, though it might cause some lags and inaccurate timing.
cargo run --release <gameboy_rom> --thread-sleep
There are some (not very interesting) examples of roms in the asm/
directory and a ton of them you can find using the power of the information superhighway.
Run the assembler (from within the asm/
directory):
python main.py <gbasm_input> <rom_output>
This project is licensed under the NPDSML - Nintendo Please Don't Sue Me License