Wednesday, April 4, 2012

Programming the DCPU-16 Simulated Computer in Notch's New 0x10c Game

Notch (creator of the wonderful computer game Minecraft), has released the specs for the DCPU-16 simulated computer that will be programmable by players of his recently-announced space game 0x10c.

The DCPU-16 is interesting in a number of ways. ("Interesting" in the sense of "abstract symbol-systems that can represent other things are interesting." This may not apply to you.)

In capability it's stronger than the PDP-8 but not as advanced as the first commercial microprocessor, the Intel 4004. (Not completely unreasonable since the story of the game is that it uses 1988-era technology in some ways, although the 4004 was actually released in the early '70s.) The simulated CPU supports indexed addressing in all registers, rather than having separate accumulator and index registers as the old CPUs did, which is nice.

On the other hand, currently there's no support for interrupts, code/data share memory with the stack, and there's no support I can see yet for indirect addressing (as the Motorola 6809 and even the PDP-8 had). There's also only one conditional instruction, which just makes coding more tedious. A macro facility may help there, however.

Naturally, some industrious souls have already written simple emulators for this imaginary processor. :)

Other than some promised "engineering," the rest of the game (fly through space, shoot people) sounds pretty conventional. The ability to do things to ships through clever programming of a simple computer, though -- that elevates this new game to something potentially remarkable.