https://github.com/kutu-dev/och8s
A CHIP-8 emulator made with C23 and SDL2.
https://github.com/kutu-dev/och8s
c-lang c-language c23 chip-8 chip-8-emulator emulator
Last synced: 3 months ago
JSON representation
A CHIP-8 emulator made with C23 and SDL2.
- Host: GitHub
- URL: https://github.com/kutu-dev/och8s
- Owner: kutu-dev
- Created: 2024-07-04T21:08:55.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-07-11T10:52:21.000Z (almost 2 years ago)
- Last Synced: 2025-01-13T04:50:26.586Z (over 1 year ago)
- Topics: c-lang, c-language, c23, chip-8, chip-8-emulator, emulator
- Language: C
- Homepage:
- Size: 2.19 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
och8S



A CHIP-8 emulator made with C23 and SDL2.
## Prerequisites
- `gcc` compiler version 14 or later (`clang` can be used but the Meson setup can't be done with `just`).
- The [Meson build system](https://mesonbuild.com/).
- The [Just command runner](https://just.systems/man/en/).
- [`SDL2`](https://wiki.libsdl.org/SDL2/FrontPage) with development files installed.
If you are using the [Nix package manager](https://nixos.org/) you may be interested in the provided [`flake.nix`](./flake.nix) file.
## Usage
First setup the project:
```sh
just setup
```
Then just compile and run it pointing to your ROM file:
```sh
just run
```
The following executions can just be made by pointing to the previously compiled file:
```sh
build/src/och8S
```
### Controls
The CHIP-8's keypad is mapped like this:
```
123C -> 1234
456D -> QWER
789E -> ASDF
A0BF -> ZXCV
```
The emulator has basic savestate capabilities:
- Save to the savefile: `N`.
- Load from the savefile: `M`.
> [!WARNING]
> For Windows users:
> och8S uses the POSIX only `getopt()` function from the header `unistd.h` so the usage of [MinGW](https://www.mingw-w64.org/) or [Cygwin](https://cygwin.com/) is obligatory to be able to compile the Windows NT platform.
## Acknowledgements
- Created with :heart: by [Jorge "Kutu" Dobón Blanco](https://dobon.dev).