iNES NES 2.0 (backwards compatible with iNES)
This option builds the project using the default C compiler on your system.
Graphics are rendered in an SDL window, and the standard computer keyboard is used as the controller.
This build includes all .h
and .c
files from the emulator/
and sdl/
directories.
mkdir build
cd build
cmake ..
make
The resulting executable will be named main
, main.exe
, or main.bin
, depending on your operating system.
This build targets the RISC-V architecture for the DTEKV DE10-Lite board.
It includes .h
and .c
files from the emulator/
, dtekv-build/
, and dtekv-drivers/
directories.
Graphics will be output to a VGA screen, and input will come from an NES controller.
Note: You must perform this build on a Linux machine.
mkdir build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=../riscv-toolchain.cmake ..
make
The executable will be named main.bin
. Additionally, a disassembled RISC-V assembly dump will be generated in main.elf.txt
.
This is how you can test the CPU using the tests/nestest.nes
rom:
cd build
cmake ..
make
make nestest_cpu_only_diff
This will run a bash script that:
- Runs the program with the
test/nestest.nes
rom as input. - Outputs the cpu execution log to a file named
build/output.txt
. - Compares the difference between
build/output.txt
file and thetests/nestest_cpu_only.txt
file (which has the correct logs). - Outputs to the console the first line it finds that differs between the two log files.