All Projects → mratsim → chirp8

mratsim / chirp8

Licence: Apache-2.0 license
A Chip-8 emulator written in Nim

Programming Languages

nim
578 projects

Chirp-8

License: Apache Stability: experimental

A Chip-8 emulator in Nim

Status: most of the instructions are properly emulated. This WIP branch contains hardcoded key presses for two key input instructions: Ex9E (skip next instruction if a key x is pressed) and ExA1 (skip next instruction if key x is not pressed). The instruction F00A is yet to be implemented.

The keybindings are defined in the file. The location of the config file is currently hardcoded and depends on the binary being called from src.

Some example keys for the current keybindings are as follows:

Pong:
    Arrow up: paddle up
    Arrow down: paddle down
Space Invaders:
    Arrow down: ship left
    Arrow right: ship right
Tetris:
    W: move block left
    A: drop block faster
    Arrow down: rotate block
    Arrow right: move block right

As one can see, the keys are somewhat all over the place and in principle need to be set for each game individually.

Some GIFs:

Pong Tetris Space Invaders

Known issues

The emulation seems to be somewhat broken as of now. Collision detection does not really work in some cases, e.g. the ball simply resets before it hits the opposite paddle in pong and the blocks in tetris fall through the floor. There is also quite some flickering happening.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].