A BytePusher VM, written in C++
- About -- About the project
- Usage -- How to use the project
- Building -- How to build the project
- Changelog -- Log of project changes
BytePusher is a minimalistic single-instruction computer, based off the CHIP-8. Some features of the system include:
- A big-endian ByteByteJump processor, running at ~3.93 MIPS
- A 24-bit memory bus, allowing up-to 16 MB of memory
- A 256x256 pixel display, supporting 216 websafe colors
- A 16-key keyboard
- 8-bit audio output
For additional information, see: https://esolangs.org/wiki/BytePusher
The project is implemented in C++ and exposes a simple C-style API, described in include/bpvm.h
and lib/libbpvm.a
:
Name | Description | Signature |
---|---|---|
bpvm_run | Run BPVM with a specified configuration | int bpvm_run(const bpvm_t *config) |
bpvm_err | Retrieve the last BPVM error as a string | const char *bpvm_err(void) |
bpvm_ver | Retrieve the BPVM version as a string | const char *bpvm_ver(void) |
For an example usage of this API, see the launcher tool, under tool/
NOTE: Tested under MacOS with the GCC/Clang C++ compilers. Modification to the makefiles might be required to build with a different OS/compiler.
Run the following commands from the projects root directory:
$ export CXX=<COMPILER>
$ make <BUILD_TYPE>
Where COMPILER corrisponds to either clang++
or g++
Where BUILD_TYPE corrisponds to either release
or debug
To build with tracing enabled, run the following command from the project's root directory:
$ make TRACE=<LEVEL>
Where LEVEL corrisponds to the tracing verbosity (0=Off, 1=Error, 2=Warnings, 3=Information, 4=Verbose)
The following example shows how to build the release project, under the Clang C++ compiler:
$ export CXX=clang++
$ make release
The following example shows how to build the debug project with informational tracing, under the GCC C++ compiler:
$ export CXX=gcc
$ make TRACE=3
Updated: 8/24/2019
- Implemented audio subsystem
- Implemented input subsystem
- Implemented processor subsystem
Updated: 8/23/2019
- Implemented video subsystem
Updated: 8/22/2019
- Initial commit
Changelog truncated (see file history for full log)