Skip to content

cameron-cunningham-ix/CHIP-8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CHIP-8 Interpreter



A CHIP-8 interpreter / "emulator" written in C++

Usage:

CHIP8.exe

HISTORY:


v0.76 - Added Reset ROM button
- Added target frame rate slider
- Fixed bug of not being able to load save state

v0.75 - Removed timer decrement from Chip8 cycle function and placed them in main, always running at ~60Hz. This is the correct implementation; some games do use the timers to run their games at a consistent FPS regardless of number of cycles run.
- Added checks for OOB accesses in function table decoders.
- Removed CycleDelay from Chip8 and replaced it with cyclesPerFrame in Chip8Platform; changed main to correspond. Emulation now can run set number of cycles per frame, instead of running max one cycle per frame.
- Replaced default ImGui font with Roboto.

v0.74 - Removed command line args; you now run the .exe and set up everything in program
- Added Open ROM button to UI, uses NativeFileDialog-Extended library to open file dialog for picking ROM to run
- Added Settings button to UI with following options:
- Cycle Delay: 0 to 128
- Shift Vy
- Jump W/ Offset
- Display sizes: 1x to 16x
- On & off colors
- Added vec4ToRGBA function for color conversion
- Minor changes to layout and initialization

v0.73 - Removed vendored folder and SDL and ImGui submodules; CMake build now takes care of fetching the content
- Included NativeFileDialog-Extended, setting up for being able to open ROM files while running program

v0.72 - Removed roms folder for cleaner repo and licensing
- Removed VSync from renderUI, as it was slowing emulation down to screen refresh rate
- Added simple load and save state
- Minor UI layout changes

v0.71 - Added some basic window scaling layout

v0.7 - Added more information to debug UI (previous & current SP, stack)
- Added some text labels to UI

v0.6 - Included ImGui into project. Using the SDL3Renderer backend for ease
- Added initial parts of ImGui debugging window
- Added fields for previous cycle's values for things like the stack, memory, and registers to Chip8, also for debugging
- Added .gitmodules for ease of grabbing SDL and ImGui

v0.5 - Big jump from v0.01, but justified as the interpreter is now fully working! (I believe. I haven't had any tests or games break it so far)
- Created Chip8Platform class, taking inspiration from https://austinmorlan.com/posts/chip8_emulator/
- Added some Doxygen comments
- Added color configuration
- Changed configuration to run off of input arguments
- Added very basic pause and step through functionality
- Included 2 more ROMs, 1D cellular automata and breakout
- Renamed the Tetris file since for some reason the previous name crashed the program on startup. Certainly something with the displayTitle concat to fix

The next goal for v1.0 is to do step 2, create a debug window that displays the current opcode, registers and values, stack, and memory with ImGUI.

v0.01 - First commit! Doing this now because the interpreter is close to fully working in C, but I can't determine why keypresses are not triggering the right behavior. I need a better way of debugging and to do that, I'm going to:
  1. Convert to C++ and encapsulate everything CHIP8 related in its own class for easier use
  2. Create a debugging interface with ImGUI

Acknowledgements:

About

CHIP-8 Interpreter written in C++.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors