Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: about 10 hours ago
JSON representation

A CHIP-8 emulator made with C23 and SDL2.

Awesome Lists containing this project

README

        



och8S

![och8S version logo](https://img.shields.io/badge/Version-1.0.0-FA1909?style=flat)
![C23 version logo](https://img.shields.io/badge/C23-3949AB?style=flat&logo=c)
![GNU GCC version logo](https://img.shields.io/badge/gcc-v14%2B-FFD0AD?style=flat&logo=gnu)

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).