Intro
For over a year, I've been working on a project to implement an emulator (https://github.com/skwirl42/robcorobco-processor/) of a hypothetical RobCo RX-9000 computer from the Fallout universe. I've wanted to create a fantasy computer for some time, and the thought occurred to me that this would be great complement to a hardware project from element14 I've been working on.
At some point I lost steam with the project, and it's sat dormant for 8 months as of this writing. It's a labour of love that I didn't have energy for anymore. That might change in the future, if I can drum up some interest in it.
I've spent a lot of time putting this together, and I'm pretty proud of it. I hope you can find ways to enjoy it, too!
Features
Emulator
The emulator implements a 16-bit, 256 byte stack-driven instruction set, with an additional 64KB of RAM. Its peripherals include: a text console, bitmapped graphics mode, a virtual holotape interface, and an FM synthesis sound system. There are other peripherals to be developed.
Much of the IO interaction is done through system calls, using the SYSCALL instruction. This abstracts a lot of the system for the programmer. I wanted to be able to implement these calls on the host side, in C/C++ .
The emulator could easily be used to run games, at this point. If there were any. I'm hoping this post might drum up some interest. I've made the tools to be sufficiently sophisticated so that I could implement assembly programs pretty easily.
There's a very basic debugger in the emulator, allowing the user to step through instructions. Also included is a setup screen for loading holotapes from the host filesystem.
Assembler
The toolset includes a single-pass assembler that can be used to run assembly source directly in the emulator, or as a standalone command line tool.
There is no macro support in the assembler, as I haven't gotten around to implementing it. I'd be happy not to have to, if someone decides to help out.
The assembler's parser is based on the boost's spirit library, and should be pretty extensible. The backend is in straight C, and I'm sure it has some serious bugs.
Other tools
The most useful of the command line tools is the tapemanager. It creates, clears, and adds files to holotape images for use with the emulator.
There are a couple of tools for interacting with the sound system in a standalone manner. One is a kind of piano, and the other plays back sound commands from a file. I'm not a musician, so the sound system hasn't had a lot of testing outside of the piano tool.
Reasoning
Ultimately, this system was designed to create a system from an unspecified architecture for a fictional computer. Choices were usually made for in-universe reasons, or when those became cumbersome, I chose more sensible, real-world functionality.
Why stack-based?
Given that I couldn't find any reference to actual systems architecture for Fallout terminals I decided to simply go with something different, since the Fallout universe is an alternate universe, with the split happening before the minicomputer was popularized. Plus, the in-universe machines that pre-dated the one I've created were all dumb terminals. A small, stack-based system would most likely be enough for those machines.
Another reason is that it makes implementing languages like Forth easy, more or less. I've extended the original architecture to make it easy to implement Forth with few instructions needed per word.
Why so many SYSCALLs?
My idea for the system was that it was essentially a hacked dumb terminal, thrown together quickly to meet consumer demand and potential competition. So in-universe, RobCo had all these dumb terminals, and with a bit of jiggering they could make a better computer with mostly just a change of processor. The SYSCALLs are meant to be the programming models of the older, 8-bit terminals, simply extended for use with the new hardware.
Future plans
I'd love to see a community build up around this strange little system. I'd like to be able to work on it knowing someone else is going to be enjoying what I'm making. I'd love to see games made by other people.
There's lots of room for improvement. The assembler has some serious flaws that I'm aware of, and the debugging interface for the emulator could do with being a little more comprehensive.
This is a project I've put a lot of time and love into. It's my largest personal project to date, and it's given me a good feeling of accomplishment. I hope you've enjoyed reading about it, and maybe you'll want to join the effort!
Comments