Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

Close

Welcome

This project aims to be as complete as possible an implementation of the Dcpu-16 computer. The aim is to follow the official specification, so if a feature is not officially defined by Notch, it will not be added. There will be two main projects here, an assembler and an emulator (or perhaps simulator is more correct) both of which will be built with both a command line interface and as a graphical application.

Design theory

One of the things I want to focus on with this Dcpu-16 library is implementing the specification as accurate as possible, a provide something that others can build on. So the likes of a nice GUI application are of little concern compared to emulating Dcpu-16 correctly, for example you will notice (at least you should be able to) that it keeps track of cycle cost. Notch must be planning on have the in game Dcpu-16 implementation run at some limited clock speed, but currently has not specified what that is. At present a clock cycle is pulsed on press of the enter key, which helps to debug through the code. I intend to provide a built in automatic pulse generator, which I guess you could call a clock, that will run at the Hz that (presumably) will be defined at some stage by Notch; but you will also be able to set what speed you want to run the clock at (so you can run code super fast to test complex programs, or super slow to debug it) as well as allow you to provide your own pulse generation code, but enough of that for now.

Status

Right now, I am in very early development, working on both the assembler and the emulator. The Emulator is currently able to run the code, but needs to be properly tested and I need to provide a better interface for it. The assembler is currently in Perl and not supporting labels at all, it WILL be ported to C++.

My priorities right now are to get my work so far all added to this repository, port the assembler (as it currently is) to C++ and add label support to the assembler. I guess I could use some bullet points right about here, but oh well.

I believe that I do now have code correctly running, but I need to give it some proper tests, not sure the best way to validate it though.

Working on

This is rather loose term

  • Validating the work done so far (i.e., is the 'notch sample' running correctly)

Done

  • Execution of all operations

Planned

  • Convert Perl script to C++
  • Add label support for assembler
  • Implement a decent testing system
  • Update the make file (doing it in a really stupid way right now)

What's the point?

True, Notch is going to develop his own code to simulate the computer in his game, but just like red stone in minecraft, playing with it in game might not be as convenient as you would like. This project will hopefully provide the tools required to develop your Dcpu-16 code out side of the game. Who knows, if my implementation start to look good, I might start to add JNI wrappers to it, which (could) offer a more efficient implementation that can be used with in Java programs.

For the most part, this is simple because I can. It sounds like a fun project to keep me focused on C++ and with a bit of community feed back I should hopefully learn some clever tricks and better ways of doing things.

What is Dcpu-16 and 0x10c?

0x10c is a game developed (well, in development) by Notch, That Minecraft Guy. One of the great features is the inclusion of a fully programmable 16bit computer, Dcpu-16. In theory, you will be able to utilise this computer to control your space ship.

Recent activity

thecoshman

Commits by thecoshman were pushed to thecoshman/Dcpu-16

53b7649 - For got to actaully commit adding a bunch of god damn files ¬_¬
Dan Cosh

Commits by Dan Cosh were pushed to thecoshman/Dcpu-16

24a1fe6 - Pushed the execution of operations from the Emulator class to the OpCode and AdvancedOpCode classes This lets Emulator focus more on the control of the ...
Dan Cosh

Commits by Dan Cosh were pushed to thecoshman/Dcpu-16

d81d864 - Moved Opcode Enum to it's own class to allow for easier conversion to and from string representation. Updated make file to use the new class ...
Dan Cosh

Commits by Dan Cosh were pushed to thecoshman/Dcpu-16

6b67c3d - Added some of the initial work that was done, though a lot of this is going to be reworked
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.