GitHub - AlekSi/dcpu16py at pypy-again (original) (raw)

A Python implementation of Notch's DCPU-16.

Complete with assembler, disassembler, debugger and video terminal implementations.

See http://0x10c.com/doc/dcpu-16.txt for specification of the CPU.

Notch apparently started doing a 6502 emulator first. Given I did one in Python https://github.com/jtauber/applepy it only seems fitting I now do a DCPU-16 implementation in Python too :-)

Status

Runs a number of example programs successfully. Should be feature-complete at the CPU level.

A dissassembler and (two) assemblers are also included as well as the emulator. The emulator includes a debugger.

There is also an experimental pyparsing-based assembler ./asm_pyparsing.pycontributed by Peter Waller. You'll need to pip install pyparsing to run it.

./dcpu16.py takes a number of options:

I'm working on an operating system for the DCPU-16 athttps://github.com/jtauber/dcpu16os and also plan an implementation of Forth at some point.

Examples

Now see https://github.com/jtauber/DCPU-16-Examples