Skip to content
giuseppeariciPublic

About

Chip-8 Emulator in C

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Screenshot

Introduction

This is a CHIP-8 Virtual Machine built in C.

Resources

These were the most useful CHIP-8 references used during development:

Requirements

You need to have SDL2 installed, including development headers.

On macOS:

brew install sdl2

If necessary, ensure your library path includes SDL2:

export LIBRARY_PATH="$LIBRARY_PATH:/opt/homebrew/lib"

On Ubuntu/Linux:

sudo apt update
sudo apt install libsdl2-dev pkg-config

Make sure you also have a C compiler (gcc or clang) and make installed.

Usage

To use this project, follow these steps:

  1. Clone the repository to your local machine:
git clone <repository_url>
cd <repository_name>
  1. Build the project:
make
  1. Run the program with the path to your game file:
./chip8 rom/game.ch8

Debug Logging

To enable debug logging and save the output to a file (debug.log), use the following command:

DEBUG=1 ./chip8 rom/game.ch8

When DEBUG is enabled:

  • All log levels (INFO, ERROR, WARNING, DEBUG) are written to debug.log
  • INFO, ERROR, and WARNING messages are also displayed on the console
  • DEBUG messages are only written to the log file

Without DEBUG:

  • INFO, ERROR, and WARNING messages are displayed on the console only
  • No log file is created

Games

You can find public-domain CHIP-8 games here.

License

This project is released under an open license for educational and personal use.

About

Chip-8 Emulator in C

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages