DeadcowDesign / chip-8

Chip-8 Interpreter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Chip-8 Javascript Interpreter

About

This is a personal project and a coding challenge to build an emulator in Javascript. Chip-8 is often chosen as it is a very simple system with a limited instruction set and is recommended as a first project for developers interested in emulation. Note that Chip-8 systems are "interpreted" rather than "emulated" as Chip-8 only exists as a VM, not a physical system.

CHIP-8 is an interpreted programming language, 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 said computers. Wikipedia

Technical Detail

Overview and information

This interpreter is built using vanilla Javascript to ES6 standards.

Files

LICENSE - this software is distributed under GNU V3 license. If you use it, fork it, host it or whatever, attribution is not required, but it would be neato if you let me know. I'd like to know where it gets used.

README.md - the readme file contains all documentation for the Chip-8 interpreter.

notes.md - an unstructured notes file containing information and references I've written for my own use when compiling the interpreter. Contains general information on Bitwise operations, CPU notes, general interpreter information, so on and so forth. May or may not be useful. I'll pad this out to be more comprehensive later.

index.html - web page for the interpreter. Contains skeleton HTML structure necessary for the interpreter to run.

css/styles.css - contains styling for the index.html file in order to display interpreter output.

js/main.js - Main class for the interpreter. Includes methods for reading .ch8 files and booting the disassembler and interpreter.

js/interpreter.js - Interpreter class for the interpreter. This is the main class for the interpreter and contains the Chip-8 CPU, RAM, etc.

js/display.js - Display class for the interpreter. This displays graphical output from the interpreter as well as handling display XOR and sprite collision operations.

js/disassembler.js - Disassembler class for the interpreter. This is used for debugging and breaks a .ch8 file down into bytes and lists corresponding Opcodes of each 2 byte instruction in the index.html file.

Resources

In putting this together I made extensive use of the following resources:

Roadmap

  • Build a website for the interpreter. Include full Chip-8 documentation and a proper UI.
  • Look at feasability of expanding this out to handle Super Chip-8 functionality including colour screen, expanded memory and so on.
  • Look at building a version of this in Python to run on the Raspberry Pi.
  • Build a mini Chip-8 handheld with the RPi.

About

Chip-8 Interpreter

License:GNU General Public License v3.0


Languages

Language:JavaScript 90.5%Language:HTML 5.0%Language:CSS 4.5%