Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mattkolega/chip8
đšī¸ CHIP-8 Interpreter
https://github.com/mattkolega/chip8
c chip8 emulator game retro sdl2
Last synced: about 3 hours ago
JSON representation
đšī¸ CHIP-8 Interpreter
- Host: GitHub
- URL: https://github.com/mattkolega/chip8
- Owner: mattkolega
- License: mit
- Created: 2023-11-06T03:47:04.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-01-27T06:33:54.000Z (10 months ago)
- Last Synced: 2024-01-27T07:22:37.496Z (10 months ago)
- Topics: c, chip8, emulator, game, retro, sdl2
- Language: C
- Homepage:
- Size: 33.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CHIP-8
A fully-functional CHIP-8 interpreter written in C and SDL2. Mimics the behaviour of the COSMAC VIP with all instructions implemented as well as sound.
## Build
Tested on both Windows using MSVC and Linux using GCC. \
Ensure xmake is installed as described in this [guide](https://xmake.io/#/guide/installation).
### Dependencies
- MSVC (on Windows)
- GCC (on Unix)
- xmake
```shell
mkdir chip8
git clone https://github.com/mattkolega/chip8.git
cd chip8
xmake
xmake run chip8
```
## Usage
Navigate through the build directory and run `./chip8`.
The interpreter requires `.ch8` files as ROM files which are chosen with a file dialog.
### Controls
Original CHIP-8 computers supported hexadecimal keypads for input. The interpreter maps those keys to the left side of a qwerty keyboard.
The keys needed to be pressed during execution depend on the ROM file.
```
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
```
The `left` and `right` arrow keys can be pressed during ROM execution to cycle through colour schemes for the display window.
## Future Ideas
- Implement additional CHIP-8 specifications such as SUPER-CHIP or XO-CHIP
- Add configuration options for the interpreter using a `.ini` file
- Add debugger/disassembler to monitor stack, registers, program counter, etc
- Add unit tests for opcodes
## Acknowledgements
- [Tobias V. Langhoff](https://tobiasvl.github.io/blog/write-a-chip-8-emulator/) for his overview and guide on implementing a CHIP-8 interpreter.
- [Timendus](https://github.com/Timendus/chip8-test-suite) for their test ROM collection which greatly helped with getting all the opcodes working properly.
- [CHIP-8 Variant Opcode Table](https://chip8.gulrak.net/) for aiding with identifying quirks related to the COSMAC VIP implementation
## Licence
[MIT](LICENSE)