
rvcore is a RISC-V emulator that serves as a minimal environment capable of running DOOM. It implements the RV32IM ISA except for the FENCE and EBREAK instructions, which are currently stubbed.
Run flat binaries written in assembly
Run flat binaries written in C
Load ELF binaries (binaries with a single PT_LOAD segment work)
Implement the newlib stubs needed to run DOOM
Get DOOM to boot
Make DOOM playable
Implement the M extension
To build, CMake and GCC/Clang is required (for Windows, MSYS2 with mingw-w64-ucrt-x86_64-toolchain or Cygwin is needed)
Dependencies (SDL3): libsdl3-dev / sdl3-devel / sdl3
Run
mkdir build
cmake -B build -DCMAKE_BUILD_TYPE=Release
cd build
cmake --build .
riscv64-unknown-elf-gcc or the riscv64-gnu-toolchain configured with ./configure --with-multilib-generator="rv32im-ilp32--" must be installeddoomgeneric and run makeNavigate to the examples directory to see how to run simple C programs on rvcore. Only a few essential newlib stubs are implemented.
To implement a new stub, first modify stubs.h and then add the appropriate handler in cpu.cpp.
54 commits
C++
94.2%
CMake
4.1%
C
1.7%

rvcore is a RISC-V emulator that serves as a minimal environment capable of running DOOM. It implements the RV32IM ISA except for the FENCE and EBREAK instructions, which are currently stubbed.
Run flat binaries written in assembly
Run flat binaries written in C
Load ELF binaries (binaries with a single PT_LOAD segment work)
Implement the newlib stubs needed to run DOOM
Get DOOM to boot
Make DOOM playable
Implement the M extension
To build, CMake and GCC/Clang is required (for Windows, MSYS2 with mingw-w64-ucrt-x86_64-toolchain or Cygwin is needed)
Dependencies (SDL3): libsdl3-dev / sdl3-devel / sdl3
Run
mkdir build
cmake -B build -DCMAKE_BUILD_TYPE=Release
cd build
cmake --build .
riscv64-unknown-elf-gcc or the riscv64-gnu-toolchain configured with ./configure --with-multilib-generator="rv32im-ilp32--" must be installeddoomgeneric and run makeNavigate to the examples directory to see how to run simple C programs on rvcore. Only a few essential newlib stubs are implemented.
To implement a new stub, first modify stubs.h and then add the appropriate handler in cpu.cpp.
54 commits
C++
94.2%
CMake
4.1%
C
1.7%