Skip to content

Introduction

ruifig edited this page Jan 2, 2020 · 1 revision

APCPU-32 is a general purpose 32 bits virtual computer architecture that borrows ideas from several old architectures, like the Acorn RISC Machine. It also borrows some ideas from more recent architectures where appropriate.

Purpose

Although the general idea for this architecture goes back to mid-nineties when I was working on a hobby game project, serious work only started around Spring 2012, when all the craze around Notch's 0x10c* game started. The architecture mostly follows a RISC like approach, in some areas, and where appropriate it borrows from CISC architectures.

The main design decision behind the architecture was to make it relatively easy for beginners to use it, but still provide the features for advanced users if they require it, such has memory protection, and User/Supervisor modes. In theory it should provide the necessary features to create a decent Operating System.

The second design decision was to make it possible to run as many virtual machines as possible on a single Host machine. That also influenced what features are available. For example, memory protection already adds considerable overhead to the VM, so Virtual Memory support is not planned.

Although in most cases the architecture looks like a real-world machine, and most characteristics have real-world equivalents, in some cases it's completely fictional in order to make it easier for programmer, or to make it less resource intensive on the Host machine.

Disclaimer: 0x10c is a registered trademark of Mojang AB

Features at a glance

  • 32 bits load/store architecture
  • Orthogonal instruction set
  • 16 general purpose registers
  • 16 floating point registers
  • User and Supervisor cpu modes http://en.wikipedia.org/wiki/CPU_modes
  • Simple MMU providing memory protection
    • Allows each process to have its own memory pages
    • No support for Virtual memory provided, due to Server overhead. It might be supported in the future.
  • Fast context switching
  • Allows preemptive multitasking
  • Supports up to 128 devices.
Clone this wiki locally