Jumping on the bandwagon - DDCPU-16

Bernard Helyer b.helyer at gmail.com
Sun Apr 22 02:55:35 PDT 2012


https://github.com/bhelyer/DDCPU-16

DDCPU-16 is a D implementation of Notch's (of Minecraft fame)
DCPU-16, a fictional 16 bit CPU for his upcoming game, 0x10c.
More info at http://0x10c.com, including specs.

You'll see a grand total of two source files, and one is only
really there for my testing. The only interesting module is
dcpu16.cpu, which contains a class CPU with two public methods of
note: load(ushort[]) to load code and run(int) to run it for a
minimum number of cycles.

The CPU code is completely freestanding, with no dependencies
(even on Phobos) and is @safe ready, and pure where possible.

Manu is planning on hooking up some virtual hardware to it (which
is described in basic form elsewhere). No real reason for this,
just needed something to fill a Sunday.

I've only tested it to the extent that I've stepped through 
Notch's
example in the spec (the one loaded in main.d) and verified that
works, but I'm sure there'll be more bugs lurking. If you find
the bugs that I'm sure are still lurking, create an issue on 
GitHub.


-Bernard.


More information about the Digitalmars-d-announce mailing list