Giter VIP home page Giter VIP logo

dcpu16py's Introduction

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.

  • ./asm.py example.asm example.obj will assemble Notch's example to object code
  • ./disasm.py example.obj will disassemble the given object code
  • ./dcpu16.py example.obj will execute it (but won't show anything without extra options)

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

./dcpu16.py takes a number of options:

  • --debug runs the emulate in debug mode, enabling you to step through each instruction
  • --trace dumps the registers and stack after every step (implied by --debug)
  • --speed outputs the speed the emulator is running at in kHz
  • --term TERM specifies a terminal to use for text output (null, debug, curses, pygame or qt)

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

Examples

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

dcpu16py's People

Contributors

jtauber avatar swarmer avatar pwaller avatar andre-d avatar matze avatar sebastianw avatar dawiedotcom avatar eagleflo avatar jstepien avatar kevinastock avatar leetrout avatar enkore avatar

Stargazers

David Voswinkel avatar

Watchers

David Voswinkel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.