A simple CHIP-8 emulator written in C using SDL2.
0x0 ~ 0xfff
)
0x0 ~ 0x1ff
: reserverd for system0x200 ~ 0xe9f
: freely used RAM0xea0 ~ 0xeff
: reserved for stack, internal use and other variables0xf00 ~ 0xfff
: for display0x000
, see details belowV0
~ VF
PC
)SP
)I
8XYE
: VF
should be the most significant bit of VX
not VY
prior to the shift8XY6
: Same as aboveFX55
: Don't increset I
FX65
: Same as above1 2 3 C 1 2 3 4
4 5 6 D -> Q W E R
7 8 9 E A S D F
A 0 B F Z X C V
Mac OS:
brew install sdl2
make buildmac && make test
Windows:
pacman -Syu
pacman -S make git mingw-w64-x86_64-toolchain mingw64/mingw-w64-x86_64-SDL2
make buildwin && make test
There are a few roms in the rom
directory of repo.
BC_Test.ch8
and test_opcode.ch8
are used for testing the fundamental functions of our emulator.
test.ch8
is used for testing arbitrary instructions written by ourself.
All others are games for fully testing our emulator 🎮.