Skip to content

pegvin/chip-8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CHIP-8

A Chip-8 Emulator Written In C


About

this is my first step into low-level stuff, i look forward on building more emulators & once i have some money i want to build a small computer with a 6502 or a z80.

chip-8 is kinda like a "specification" which decribes how a chip-8 machine should work, i am not aware of any "true" chip-8 cpu but it's quite easy to build a emulator of.


Accuracy

i tried to make the emulator as accurate as possible and for that i used chip-8 test suite, which provides many roms to test various things like opcodes, flags etc.

       


Keymap

i'm using this keymap:

     CHIP-8              My Keyboard
 _______________       _______________
| 1 | 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 |
\---------------/     \---------------/

Building

make sure you have GNU Make, GCC/Clang & SDL2 Installed, then clone the repo

make all -j4

you will have a executable named chip-8, run the executable and pass a path to a rom...


Thanks