Skip to content

imperialrogers/CHIP-8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CHIP-8 EMULATOR 🕹️

This is a Chip-8 compiler designed to emulate and run Chip-8 programs.

Chip8

Preview For Computer app

Space Invaders Space Invaders Game
Soccer Tetris

Overview

The Chip-8 is an interpreted programming language used in the 1970s and early 1980s on early microcomputers. This project aims to provide a compiler that can translate Chip-8 programs into executable code.

Features

  • Chip-8 Emulation: Compiles and runs Chip-8 programs.
  • Simple Interface: Minimal setup to compile and execute programs.

Getting Started

Prerequisites

  • C++ compiler

    • Linux: GCC 9
    • Windows: MinGW-w64 8.0 (GCC 9.2)
    • macOS: Install XCode command line tools
  • SDL2

    • Linux: install using sudo apt install libsdl2-dev.
    • Windows: download the SDL2-2.0.10 development libraries and place them under a new external folder in the root of this project. To run, download the SDL2 runtime binaries and put SDL2.dll into the folder with your compiled binary.
    • macOS: install using brew install sdl2.
  • Flutter

    • You'll need to set up the IDE and mobile device emulator, or any mobile testing device on your local system.

    • Flutter Environment: You'll need to have the following installed:

      1. Flutter SDK
      2. Android Studio
    • Ensure you are testing the app using Flutter version 3.0.1 and above.

      For checking flutter version:

      • Run flutter --version in terminal

    If your version is not upto date, follow these steps to upgrade: - flutter channel stable to switch to the channel having stable version of flutter updates - flutter upgrade to get the latest flutter version

Building

Clone the repository into your system and go to the root directory of the project.

git clone https://github.com/imperialrogers/CHIP-8.git
cd CHIP-8

Windows

Go to the source-code folder.

cd source-code/

Just Run the following command in root directory.

g++ -I src/include -L src/lib main.cpp Chip8.cpp Platform.cpp -lmingw32 -lSDl2main -lSDl2 -o chip8

Mobile

Go to the flutter source folder.

cd flutter/chip8/

Run the following command in root directory.

flutter build apk
flutter install

Usage

./chip8 <Scale> <Delay> <ROM>

  • Some ROMs are provided in the /ROMs directory.

Download Mobile APK

Contributing

Whether you have some feauture requests/ideas, code improvements, refactoring, performance improvements, help is always Welcome. The more is done, better it gets.

If you found any bugs, consider opening an issue.

References