A chip8 emulator built in c++ using sdl3.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- A C++ compiler supporting C++17 or later (e.g., GCC, Clang, MSVC)
- CMake (version 3.15 or later recommended)
- Git
- vcpkg (for managing dependencies)
-
Clone vcpkg (if you don't have it already):
git clone https://github.com/microsoft/vcpkg.git cd vcpkg ./bootstrap-vcpkg.bat # On Windows # ./bootstrap-vcpkg.sh # On Linux/macOS
-
Integrate vcpkg with your build system (optional but recommended):
./vcpkg integrate install
-
Install SDL3:
./vcpkg install sdl3:x64-windows # Or your target triplet (e.g., :x64-linux, :arm64-osx)
-
Clone the repository:
git clone <repository-url> # Replace <repository-url> with the actual URL cd Chip8 # Or your project directory name
-
Configure the project using CMake: Create a build directory:
mkdir build cd build
Run CMake, pointing it to the vcpkg toolchain file:
# Replace <path-to-vcpkg> with the actual path to your vcpkg installation cmake .. -DCMAKE_TOOLCHAIN_FILE=<path-to-vcpkg>/scripts/buildsystems/vcpkg.cmake
Example on Windows:
cmake .. -DCMAKE_TOOLCHAIN_FILE=C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake
-
Build the project:
cmake --build .
(Alternatively, on Windows with Visual Studio, you can open the generated solution file in the
build
directory and build from there.)
After a successful build, the executable (e.g., Chip8.exe
on Windows or Chip8
on Linux/macOS) will be located in the build
directory (or a subdirectory like build/Debug
or build/Release
depending on your configuration).
./Chip8 # Or ./Debug/Chip8.exe etc.