Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/digitsensitive/chip8-wasm
:video_game: A CHIP-8 interpreter (and virtual machine) written in C++ with SDL2 and WebAssembly
https://github.com/digitsensitive/chip8-wasm
chip-8 chip8 cplusplus emulator sdl2 virtual-machine webassembly
Last synced: 4 days ago
JSON representation
:video_game: A CHIP-8 interpreter (and virtual machine) written in C++ with SDL2 and WebAssembly
- Host: GitHub
- URL: https://github.com/digitsensitive/chip8-wasm
- Owner: digitsensitive
- Created: 2021-11-25T22:46:14.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-03-05T18:55:56.000Z (almost 3 years ago)
- Last Synced: 2024-11-04T17:51:13.584Z (about 2 months ago)
- Topics: chip-8, chip8, cplusplus, emulator, sdl2, virtual-machine, webassembly
- Language: JavaScript
- Homepage:
- Size: 3.25 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# A CHIP-8 interpreter (and virtual machine) written in C++17 with SDL2 and WebAssembly
This project was created to deal with the creation of an interpreter in more detail
and to use [WebAssembly](https://webassembly.org) for the first time.I have documented and described the development of the project in detail on the
following [article on Medium](https://medium.com/@digit.sensitivee/how-i-created-my-first-interpreter-2e7c8749031d).Have fun reading through and coding!
# Prerequisites
- Install [Visual Studio Code](https://code.visualstudio.com)
- Install the [C++ extension for VS Code](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools)
- Install the [Clang-Format extension for VS Code](https://marketplace.visualstudio.com/items?itemName=xaver.clang-format)
- Install [Clang](https://clang.llvm.org) and ensure it is installed `clang --version`
- Get the [Emscripten SDK](https://emscripten.org/docs/getting_started/downloads.html)
- In the root directory set the CMAKE Toolchain file by running: `CMAKE_TOOLCHAIN_FILE=/**/Emscripten.cmake` Ensure you update your path with the location of your emsdk installation location# Installation
- Download the submodules with `git submodule update --init`
- Create the build folder with `mkdir build`
- Navigate to the build folder with `cd build`
- Run `emcmake cmake ..` and `make`
- Start the localhost in the root folder with `yarn http`# Code formatter
Use of [ClangFormat](https://clang.llvm.org/docs/ClangFormat.html). The style options are defined in the `.clang-format` file. For more details have a look at the official [Style Options](https://clang.llvm.org/docs/ClangFormatStyleOptions.html).
# Emscripten Compiler
The Emscripten Compiler Frontend (em++ für C++) is used to call the
Emscripten compiler from the command line.
For more details about the arguments look at the official
[Emscripten Compiler Frontend Reference](https://emscripten.org/docs/tools_reference/emcc.html#emcc-o2)## To do list
- [x] Setup basic repository (C++, WebAssembly)
- [x] Setup basic VSCode configuration (C++, Clang)
- [x] Medium: Write history section
- [x] CHIP-8: Add memory
- [x] CHIP-8: Add registers
- [x] CHIP-8: Add stack
- [x] Medium: Write references section
- [x] CHIP-8: Add delay and sound registers
- [x] CHIP-8: Add program counter (PC)
- [x] CHIP-8: Add input (keypad)
- [x] CHIP-8: Add display
- [x] CHIP-8: Add fontset
- [x] CHIP-8: Add instructions
- [x] Public Folder: Add roms
- [x] Medium: Write instructions section
- [x] Add Prettier to package.json with prettier configuration file
- [] Write disassembler (https://aimechanics.tech/2020/09/03/chip8-emulation-rom-disassembler)
- [] Read the following ressource: http://vanbeveren.byethost13.com/stuff/CHIP8.pdf?i=1