Skip to content

Multiplatform CHIP-8 and Super-CHIP emulator

License

Notifications You must be signed in to change notification settings

lfrie/chip8swemu

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chip8swemu

Multiplatform CHIP-8 and Super-CHIP emulator.

Compiled releases are available here: https://github.com/AlfonsoJLuna/chip8swemu/releases

Features

The emulator core is a CHIP-8 and Super-CHIP interpreter library written in standard C99 with no other dependencies. It can be easily included in any project adding the chip8.h and chip8.c files and can run on most machines from microcontrollers to desktop computers.

The frontend runs on both Windows and Linux. It is written in C and C++ and based on SDL2 and ImGui. Its features include:

  • Configurable CPU clock rate, 840Hz by default.
  • Configurable color palette, black and white by default.
  • Compatibility modes for games that require special settings.
  • ROM files can be passed as an argument or dropped to the window.
  • Native file selection dialog (only available on Windows).

Building

Required dependencies are ImGui, SDL2, OpenGL.

How to build on Windows

  1. Install git and clone this repository.
  2. Download and install the mingw-w64 toolchain. Prebuilt binaries are available here. Be sure you check Add to PATH during installation.
  3. Download SDL 2.0.12 libraries for MinGW and extract them to chip8swemu/frontend/libraries/SDL2-2.0.12/...
  4. Download ImGui 1.52 source code and extract it to chip8swemu/frontend/libraries/imgui-1.52/...
  5. Open a command prompt in chip8swemu/frontend/ and type: mingw32-make.

How to build on Linux (Ubuntu)

  1. Install git: sudo apt-get install git
  2. Clone this repository: git clone https://github.com/AlfonsoJLuna/chip8swemu
  3. Install SDL2 development libraries: sudo apt-get install libsdl2-dev
  4. Download ImGui 1.52 source code and extract it to chip8swemu/frontend/libraries/imgui-1.52/...
  5. Open a terminal in chip8swemu/frontend/ and type: make.

Compatibility

Some games require special settings to run properly, you need to change the options before loading the game to take effect.

Known games that require the Compatibility Mode enabled:

  • Animal Race [Brian Astle].ch8

Known games that require the Vertical Wrap disabled:

  • Blitz [David Winter].ch8
  • Mines! - The minehunter [David Winter, 1997].ch8

There are some other quirks not implemented because they also differ between original interpreters and no known game depends on them. These are well documented here.

References

Useful resources and documentation for developing a CHIP-8 emulator:

About

Multiplatform CHIP-8 and Super-CHIP emulator

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 57.8%
  • C 38.6%
  • Objective-C 1.5%
  • Objective-C++ 1.4%
  • Makefile 0.3%
  • Batchfile 0.2%
  • Other 0.2%