I'm afraid that you not are the first that did a DCPU-16 emulator in D : https://github.com/Zardoz89/DEDCPU-16 Just now, I can't update because I have now the final examinations. I had scheduled a comple rewrite to get a better cycle count and timming acurracy and adding a real I/O support. Plus, Notch just release now, a update specs (on reddit) that broken anything using the olds specs and add HardWare & SoftWare Interrupts.
If you have interest of going serius with DCPU-16, we can talk of joining our efforts. Bernard Helyer wrote: > 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. -- I'm afraid that I have a blog: http://zardoz.es
