Skip to content

LordOfTrident/trip-8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License Contributors Stars Issues Pull requests


TRIP-8

🔱 Trident's CHIP-8 emulator 👾

Games · Tests · Report Bug · Request Feature


Table of contents

Introduction

TRIP-8 is a CHIP-8 emulator written in C99 using the SDL2 library.

Features

  • CPU cycle is 660Hz, but can be edited in emulator.c with the CYCLE_MS macro.
  • Refresh rate is 60Hz (includes updating of timers), but can be edited in emulator.c with the REFRESH_MS macro.
  • Window scale is 12 (768x384), but the window is resizable and the default scale can be edited in emulator.c with the WINDOW_SCALE macro.
  • The compatibility is strictly CHIP-8 as described in the flags and quirks tests of the CHIP-8 test suite. This compatibility choice breaks some games, like Blinky.
  • Uses a procedural sine wave sound for beep, which can be customized in system_audio.c.

Controls

Key Action
Escape Quit the emulator
Return Restart the emulator

Keypad

Left, up, right and down arrow keys are mapped to CHIP-8 4, 2, 6 and 8 keys respectively due to being commonly used for 4-way movement. The numpad keys are mapped to the corresponding CHIP-8 number keys. Controls can be modified in system_keyboard.c.

Pre-requisites

The following is required to compile the emulator:

  • A C99 compiler
  • Makefile
  • SDL2

Debian Linux

$ apt install gcc make libsdl2-dev

Arch Linux

$ pacman -S gcc make sdl2

Void Linux

$ xbps-install gcc make SDL2-devel

Alpine Linux

$ apk add gcc make sdl2

OS X

$ brew install gcc make sdl2

Quickstart

$ git clone https://github.com/LordOfTrident/trip-8
$ make release
$ ./trip8 roms/trip8.rom

You can find games and other roms in the roms folder and compatibility tests in the tests folder.

If you are on Linux (or a Unix OS), you can use make install to install the emulator into /usr/bin/trip8:

$ make install
$ trip8 roms/trip8.rom

References

Bugs

If you find any bugs, please, create an issue and report them.



C99 SDL2

Made with ❤️ love

(Back to top)

About

🔱 Trident's CHIP-8 emulator 👾

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages