Engineer Application - ddthj

Minecraft Name - ddthj

Thing - /warp ddup2
DDPU2 is an 8 bit clockless CISC with Von Neumann architecture. It has 120 bytes of installed memory which can hold 64 instructions.

Instruction Set

Engineering work:
The goal of ddpu2 was to be the first Minecraft CPU to simulate a universal Turing machine. To prove this, it was decided that the CPU would run a Rule 110 program, which is Turing complete. The CPU was planned with Rule 110 in mind, but also flexibility so that other complex programs may be run.

Some of the design was influenced by the 6502, such as the incrementing registers, which help with looping code or accessing offsets from a pointer.

One of the stranger additions was the hardware stack. It was known that memory access would be slow, and there was a need for faster register-like memory that the CPU could use instead. The stack solves this problem by pretending to be a register. The CPU reads and writes to the stack just like a register, which is much faster than a memory access.

For similar reasons it was decided that a clockless design would be best. Instruction runtime varies widely depending on whether it makes a memory access, and also depending on the complexity of the instruction. The “flow” of a cycle starts when a “fetch next instruction” loop is triggered, which loads the PC into the memory pointer and writes the memory output to the instruction register. After that, each opcode/memory mode has its own timed loop to execute as quickly as possible, and when complete it triggers the “fetch next instruction” loop.

The Rule 110 program was written in pseudo-assembly by GiantScus

The syntax is OPCODE, MEM_MODE, ADDR/REG, ADDR/REG. Debug comments were made to help debug the state of the machine after executing each instruction.

Each opcode was debugged independently and small programs (counting/fib/loops/etc) were programmed first before attempting Rule 110.

At the end of the project, Rule 110 was running successfully. The CPU takes 38 minutes to calculate a single-byte sequence of Rule 110.

Images/Videos -
/warp ddpu2

1 Like

I approve this message

1 Like