Maize

I've always believed that the best way to understand a system is to try to build one. Maize is what happens when you take that belief a little too far: a 64-bit instruction set I designed myself, a virtual machine that runs it, and a growing pile of tools and software built on top of it.

How it started

Back in 2016 I was working on a contract that involved ARM processors, which got me curious enough to write an x86 emulator. That led to Tortilla, a virtual CPU in C# that simulated the hardware cycle by cycle, very much inspired by Ben Eater's breadboard computer videos. It was fun, and it was also terribly inefficient. So I rewrote the whole thing in C++ and turned it into a bytecode execution environment rather than a simulation of a CPU. The idea is that you should be able to compile any language to Maize bytecode and run it on any system that can run the Maize VM.

Yes, it runs DOOM

The first version of the instruction set grew a complete toolchain: an assembler, a linker, a disassembler, and a C compiler built on cproc and qbe. It also grew quesOS, my own multi-process kernel with paging, fork and exec, pipes, signals and a preemptive scheduler, which is enough to run a real shell and the usual Unix utilities.

And on 13 July 2026, it ran DOOM. The doomgeneric port compiles from C to Maize bytecode and runs in the graphical VM at about 65 frames per second fully interpreted, or about 75 with the JIT turned on. (You bring your own WAD.)

Version 2

Having gotten that far, I did what any reasonable person would do and started over. The first instruction set was a 16-register CISC design with a lot of x86 in its family tree, and I kept running into its limits. Version 2 is a clean break, ratified in August 2026: 32 general-purpose registers, no condition-flag register, and a variable-length encoding designed to be decoded in software and translated to a host processor. My half-joking description is that it's the machine x86 should have been.

Version 2 starts from a written specification rather than from the code, so that somebody else could build their own implementation from it. The VM and assembler already run the full base instruction set. The linker, the C compiler, and quesOS still have to come across from version 1, which means DOOM does too. After that, the long-term goal is to boot Linux on Maize, which would prove that the machine is complete.

The first version is frozen on its own branch, DOOM and all, if you want to try it.

Details

  • Written in C++20 and built with CMake, for Windows and Linux.
  • Deterministic by design; the JIT produces bit-identical results.
  • Licensed under Apache 2.0.

I'm not trying to compete with WebAssembly. I'd be happy if a few hundred of the right people found Maize, if somebody wrote a second implementation of the VM, and if somebody taught a class with it.

The code, the specification and the roadmap are all on GitHub: github.com/paulmooreparks/Maize.