A Chip-8 Interpreter For windows written in C using SDL2 for renderering and imgui for a simple menu and debug windows.
Key | Desc |
---|---|
Esc | Toggle Main Menu |
Ctrl+R | Reset current program |
Space | Pause/Unpause |
Plus ( + ) | Increment Clock |
Minus ( - ) | Decrment Clock |
Enter | Step Program (when halted) |
1 2 3 4 --> 1 2 3 C
Q W E R --> 4 5 6 D
A S D F --> 7 8 9 E
Z X C V --> A 0 B F
- Drag n drop c8 files onto the window to load them
- Launch a program using: `Chip8.exe <c8_file>
- Chip8 Core - https://github.com/tommojphillips/Chip8-Core
- IMGUI v1.91.6 - https://github.com/ocornut/imgui/releases/tag/v1.91.6
- SDL2 v2.30.10 - https://github.com/libsdl-org/SDL/releases/tag/release-2.30.10
- SDL2_Image v2.8.4 - https://github.com/libsdl-org/SDL_image/releases/tag/release-2.8.4
The project is built in Visual Studio 2022
- Clone the repo
git clone https://github.com/tommojphillips/Chip8-SDL2.git
- CD to
lib/
dir
cd Chip8-SDL2/lib
- Clone
Chip8-Core
intolib/
dir
git clone https://github.com/tommojphillips/Chip8-Core.git
- Clone
imgui
intolib/
dir
git clone --depth 1 --branch v1.91.6 https://github.com/ocornut/imgui.git
- Clone
imgui-club
intolib/
dir
git clone https://github.com/ocornut/imgui_club.git
-
Download SDL2 VC package
SDL2-devel-X.X.X-VC.zip
(direct download link)- Extract and copy the
include
andlib
folders intoChip8-SDL2/lib/SDL2
you will have to create theSDL2
directory
- Extract and copy the
-
Download SDL2 Image VC package
SDL2_Image-devel-X.X.X-VC.zip
(direct download link)- Extract the
include
andlib
folders intoChip8-SDL2/lib/SDL2_Image
you will have to create theSDL2_Image
directory
- Extract the
-
Open
vc\Chip8-SDL2.sln
in visual studio and build and run
The project directory structure should look like this:
Chip8-SDL2\
| -- lib\
| | -- Chip8-Core\
| | | -- chip8.h
| | | -- chip8.c
| | | -- chip8_defines.h
| | | -- chip8_mnem.c
| |
| | -- imgui\
| | | -- backends\
| |
| | -- imgui-club\
| | | -- imgui_memory_editor\
| |
| | -- SDL2\
| | | -- include\
| | | -- lib\
| |
| | -- SDL2_Image\
| | -- include\
| | -- lib\
|
| -- src\
|
| -- vc\
| | -- Chip8-SDL2.sln
| | -- Chip8-SDL2.vcxproj
- Chip 8 on the COSMAC VIP by Laurence Scotford
- Chip8 Test Suite by Timendus
- Chip8 Links
Space Invaders (Pixel Spacing = 0)
Space Invaders (Pixel Spacing = 2)
Space Invaders (Pixel Spacing = 4)
Window / Display Settings
Chip8 Quirks / Setitngs
Display editor ( click pixel to toggle )
Display RAM editor
Instruction Debug & RAM editor