Skip to content

dyharlan/Coffee-8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coffee-8

A Cross-platform Chip-8 emulator that aims to be Octo compliant in terms of accuracy. Now supports the COSMAC VIP, Super-Chip 1.1, and the XO-Chip.

Chip-8 / SCHIP Games XO-Chip Demos
Car Race by Klaus von Sengbusch Raycasting Demo
Spacefight 2091 by Carsten Soerensen Bad Apple

Features

  • Accurate Swing-based renderer.
  • 100% pure Java code. No external libraries required. Tested to work on Linux and Windows.
  • Complete Emulation of the Chip-8, SuperChip 1.1, and the XO-Chip instruction set.
  • User-modifiable color palette, cycle count, and video size.
  • Backend code (CPU, Sound Generator) can be adopted to work with any java-compatible windowing toolkit.

Accuracy

Coffee-8 passes Timedus', and metteo's Test Suites for the Chip-8 and the Super-Chip.

Installation

Builds are now available at the releases page. All you need to do is download the jar file corresponding to the version of your java installation, which can be queried by typing in java -version on the Command Prompt/Windows Terminal on Windows, and your favorite Terminal Emulator on Mac/Linux.

Compiling Coffee-8 is pretty simple. You need at least Netbeans 13, and Java JDK 8 to work. But the Project is set to JDK 17 by default. It could probably work with anything lower, but it's up to you to figure stuff out that breaks.

Then run git clone https://github.com/dyharlan/Coffee-8.git, open the project on NetBeans, go to Run > Clean and Build Project, and open Coffee-8.jar inside of the Coffee-8/dist directory.

You can also just use the command-line by going into the Coffee-8/src directory and typing: javac Frontend/*.java.

This will generate class files that you can use by typing java Frontend/Main.

Todo

  • Implement saving user settings
  • Implement toggleable quirks
  • Implement XO-Chip XO-Chip support is now fully functional with sound.
  • Implement debugging capabilities
  • Properly implement FX75/85 Done.

Notes about XO-Chip audio

This was quite possibly the biggest pain in the ass of my entire life so far. Java's SourceDataLine class was one of the worst things I've had the displeasure to deal with. Again, I could not thank kouzeru enough for helping me debug these past 4 days (6/16 to 6/20/23) and get the sound up and running to a good standard. (Clicking issues on long duration sounds might never be solved due to SourceDataLine's limitations.)

Acknowledgements

License

Coffee-8 is licensed under the MIT License. See License.md for more details

Contributing

Do take note that any form of contributions to this project will fall under the MIT License. With that said, any form of contributions are welcome. As I'm not confident with myself in certain aspects of this app's code.