The
DCPU-16 is a 16-bit cpu defined for an as-yet unreleased multiplayer game called
0x10c(*). The game is somewhat like
corewars updated and crossed with
Elite, and has a pedigree with Minecraft which is very popular and has attracted some
impressive technical feats. So it's likely to be a popular game and therefore a popular, if virtual, CPU.
The interest lies in the shape:
16 bit registers (8 of them, plus SP and O, a fullsize overflow register)
16 bit 'bytes'
16 bit 'address bus'
opcode is 1 'byte' plus 0, 1 or 2 operand 'bytes'
This bears just a little similarity with our
65Org16, except we only have 3 registers.
EEye's 65Org16.b as presently implemented has 16 accumulators and 2 index registers and SP. Of course we have a 32-bit address bus and therefore 2-'byte' pointers, and therefore we can, and do, have such a thing as zero page.
The spec of the DCPU-16 is simple, and is very clearly laid out
here. It's more regular than our machines: all registers except SP can perform all roles. It lacks a status word, instead having a set of skip on compare instructions. All instructions take two operands, where the operands can be registers, literals, memory or indirect accesses, or special. (These are quite powerful addressing modes)
It seems likely that someone will come up with a C compiler before too long. I'm not sure how applicable that will be as a starting point for targetting the 65Org16.b, given the differences in the machine. At the very least, the backend would be issuing macros or sequences of 65Org16 instructions, which would cost time and space. A peephole optimiser might make up a little of the slack. (But a C compiler which produces less them optimal code on a CPU running at 100MHz might be better than none at all)
There's a
subreddit which is presently too new to have much in it. There's a
tag on stackoverflow which is again too fresh to have any meat.
Edit: and there's a forum
here
Cheers
Ed
(*)The c is a superscript but it seems that we don't write it out as 0x10^c