Skip to content

JSH32/Chippy8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CHIP-8 emulator implementation written in Java for APCS. This emulator has a debugger built in and runs at 600hz by default.

What is CHIP-8?

CHIP-8 is a virtual machine, developed by Joseph Weisbecker. It was initially used on the COSMAC VIP and Telmac 1800 8-bit microcomputers in the mid-1970s. CHIP-8 programs are run on a CHIP-8 virtual machine. It was made to allow video games to be more easily programmed for these computers.

Controls

Each game has its own set of unique controls. It should be easy to figure them out though. The original CHIP-8 keys have been mapped to new keys on your keyboard. Below are the original and mapped controls

Original

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

Mapped

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

Sources

Notes

  • Flickering is intentional, due to draw/clear calls being separate and sometimes many opcodes apart there is flickering. Due to this same reason double buffering is not possible, thus the screen flickers.
  • CHIP-8 implementations are all over the place. Each emulator has its own slightly different way of doing things. I have followed the spec on Cowgod's reference, but not all games will run on the emulator properly. The Roms subdirectory contains some simple programs I have tested that work with the emulator.

Libraries

Some libraries were used in the making of this project, some are essential and others are just there for cleanliness. I will list all libraries and their functions below.

Library Function
jinput Capturing user keyboard input
Lombok Replacing getters/setters with annotations, lowers LoC significantly
Flatlaf Look and Feel for Java GUI, makes things not ugly
Msgpack Fast file serialization

How to compile?

Due to using dependencies we require the maven build system, please make sure you have it installed first

  1. Open terminal in the project directory
  2. Run mvn assembly:single

This should have created a target folder with a jar artifact.

About

Chip8 emulator and debugger made in Java

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages