Skip to content

BorisPlaton/chip_8_em

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CHIP-8 / SUPER-CHIP / XO-CHIP Emulator

Prerequisites

To run the emulator, you have to install the following dependencies:

  • SDL2
  • Rust
  • Cargo
  • Just (optionally) - with just you can run preconfigured games in justfile.

Overview

This project mostly aims at learning Rust. Definitely, some places may be rewritten, refactored, etc. But we have what we have :)

To check the emulator's possible arguments, flags, etc., run this command:

$ cargo run -- --help

Or shortcut if you've installed just:

$ just emulator-help

You can check how to run a game using this emulator with examples from justfile. If you have the just, you are free to add a new recipe in the existing justfile with your game configuration and run with:

$ just your-game-name

Currently, the justfile contains 3 games that you can play without the headache of configuring them properly. If you haven't installed just, you can run them if you copy the recipe's body, something like:

$ cargo run --release -- \
   --platform xochip \
   --load-increment-i-with-x-quirk \
   --wrap-instead-of-clipping-quirk \
   --scale 11 \
   --set-disabled-color 0x020C12 \
   --set-second-plane-color 0xF70C8A \
   --set-first-plane-color 0xDCF0FC \
   --set-both-plane-color 0xDCF0FC \
   roms/superneatboy.ch8

If you do install, then print the following:

$ just play-superneatboy

The keyboard layout is following:

The CHIP-8 keyboard layout...

1 2 3 C
4 5 6 D
7 8 9 E
A 0 B F

...applies to the following emulator keyboard layout:

1 2 3 4
Q W E R
A S D F
Z X C V

References

CHIP-8

SUPER-CHIP

XO-CHIP

Miscellaneous

About

CHIP-8, SUPER-CHIP, XO-CHIP emulator written in Rust.

Topics

Resources

Stars

Watchers

Forks