What this is for, and what here is real

This handbook accompanies a set of labs in which you work with an operating system from 1986, running on a processor described in Verilog. In a browser, with nothing to install.

Before going further it is worth agreeing on what exactly is real here and what is imitation. In retrocomputing projects this is usually left vague, and it should not be.

What is real

The processor. Under the page runs RISC5.v — Niklaus Wirth's synthesisable Verilog, stepped cycle by cycle by the Verilator simulator. This is not a model of a processor and not an emulator: it is the very code that gets programmed into an FPGA. When you see the cursor blinking on screen, real logic drew it, simulated to the cycle.

The system. Project Oberon is the operating system Wirth and Jürg Gutknecht wrote in 1986 and rewrote for their own processor in 2013. All of it, together with the compiler, the window environment and the text editor, comes to about ten thousand lines.

The compiler. The Oberon compiler is written in Oberon and sits on the same disk as everything else. In lab 7 you will run it and it will build itself.

What is not real

The peripherals. Disk, keyboard and mouse are modelled in C++ and JavaScript. A real board talks to an SD card over SPI and to a keyboard over PS/2; here those protocols are reproduced in software. The processor does not know the difference — it sees the same registers at the same addresses.

The speed. Simulation gives roughly four megahertz equivalent, about four times slower than a real board. Booting takes a couple of seconds.

Why this can be believed

Claiming "we have a real processor" is easy. Checking it is hard. So everything you will see is verified by machine, and the checks live in the same repository:

The last point is worth dwelling on. It means this is not a museum piece but a closed system: a description of a processor produces the processor, the processor runs the system, the system contains the compiler, the compiler produces the system itself. The circle closes, and one command checks it.

How to read on

The chapters are as independent as they can be, but the order is not accidental:

If you would rather touch it straight away, start with lab 1: it needs nothing but a browser.