Skip to content

A C++ Implementation of X-Bit Computer SAP-X Architecture Virtualization

License

Notifications You must be signed in to change notification settings

Stalker2106x/MiniXBVM

Repository files navigation

Logo

Build Status

About

MiniXBVM is a Graphical Virtual Machine emulating a SAP-X Microcomputer architecture written in C++.
Binary includes a feature-rich IDE for SAP-X assembler and a compiler.
Dynamic register/memory watches and step by step execution for better understanding of code flow.

VM Overview

The software has been tested on Windows using MinGW GCC 11.2, MacOS X using GCC 12, and Linux using GCC 9.1.0

Contributors

License

This software is released under MIT License, which is defined inside "LICENSE" file.

Dependencies

  • SFML
  • Dear ImGUI
  • imgui-SFML
  • dynamic_bitset (pinam45)
  • CMake

Getting Started

Building program

First, fetch git submodules:

git submodule init --update

then, you need to build the SFML (UI) dependency:

cd thirdparty/SFML
mkdir build && cd build
cmake .. -DBUILD_SHARED_LIBS=ON
make

then, you need to build the imgui-SFML dependency:

cd thirdparty/imgui-SFML
mkdir build && cd build
cmake .. -DBUILD_SHARED_LIBS=ON -DSFML_DIR=../SFML/build/ -DIMGUI_DIR=../imgui/
make

Move back to the root of the repository and start building the app.

cd ../../
mkdir build && cd build
cmake ..
make

Hardware configuration

For testing purposes, the VM uses dynamic word size. This means you can customize WORD/DWORD size, memory, and registers size at runtime.
VM supports word sizes up to 18446744073709551615 bits (size_t underlying type)

Instruction set

We use a custom implementation of SAP-X which instructions are defined here

keyword usage
LDA Load addressed memory contents into accumulator
ADD Add addressed memory contents to accumulator
SUB Subtract addressed memory contents from accumulator
OUT Load accumulator data into output register
HLT Stop processing

About

A C++ Implementation of X-Bit Computer SAP-X Architecture Virtualization

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published