This is a Nintendo Entertainment System emulator written in C which uses raylib to create UI to run NES games. NES commonly refers to the Nintendo Entertainment System, a classic 8-bit home video game console developed by Nintendo released in 1983. The emulation works from NES electronic components built from scratch such as cpu, ppu, bus, mappers, so on.
To develop on this repository, you first need to create your own fork on GitHub.
Apart from this, you must have make
installed. You can find it on your respective package manager or even pre-installed on Linux scoop
on Windows and homebrew
on Mac.
Raylib is being used for creating UIs.
stclib/STC is being used as a standard library in some cases where I need some useful data structuresa and functions apart from what vanilla C offers.
# clone using https
git clone https://github.com/Shreyaskr1409/nes_emulator_c.git
cd nes_emulator_c
Or if you prefer SSH:
# clone using ssh
git clone git@github.com:Shreyaskr1409/nes_emulator_c.git
cd nes_emulator_c
test-?
replaced by a test number from the Makefile.
# DO NOT RUN AS IS
# replace '?' with a valid test number from the Makefile
make test-? -B
Remember that this will add a main.bin
in your root directory as an executable which you can run again as:
./main.bin
In future, ability to just run the make
command as is to make a build will be there when I finish the emulator.
This project started out as a personal project for recreation and hobby.
It still is but I do take it more seriously than before.
I have implemented the CPU completely and it works just right, atleast enough that I have not found an issue so far.
I will be adding more tests to it fully confirm that the emulation works accurately.
The cartridge is fully capable being loaded in the form of a .nes
file.
C++
works which is a nice “bonus”.If this interests you, I recommend you to go to the previous links or just watch OneLoneCoder’s YouTube tutorial on how these softwares work, it does an excellent job of explaining nearly
everything you need to know as someone who wants to just develop. But, only nearly
since there is a lot more which you can learn side-by-side if you want to learn. This is an excellent beginner project which will clear your concepts on Computer Architecture as well as C Programming.
While I will contonue working on it, I can not confirm support for each and every game which is available for NES,
but I will atleast add support for some classic games released for NES from series such as
The Legend of Zelda
, Castlevania
, Final Fantasy
, Super Mario Bros.
and Donkey Kong
.