Skip to content


Subversion checkout URL

You can clone with
Download ZIP
DCPU-16 in C#
branch: master
Failed to load latest commit information.
DcpuSharp Basic instruction emiting.
DcpuTest A README, LICENSE, and the start of an instruction emit class.
.gitignore Inital commit of partial working DCPU-16.
DcpuSharp.sln Inital commit of partial working DCPU-16.
LICENSE Explanation of the code sample.

DCPU Sharp

DcpuSharp is an implementation of the DCPU-16 processor in C#. It is first intended to provide a programatic way for simulating DCPU-16 programs. There is a EXE project called DcpuTest that runs the sample program.

When creating the Cpu object, it must be given the inital contents of memory. One instruction is executed for each call to Tick().

        ushort[] memory = new ushort[] { /*...*/ };
        var cpu = new Cpu(memory);

        while (true)


  • .NET Framework 4.0. It should also compile against 2.0.


DcpuSharp is licensed under the BSD license.

Currently limitations

  • Does not support the unofficaly instructions or memory mappings for IO.

Plans for future devlopment

  • A nicer front end for loading and executing programs.
  • An API for emiting instructions. The goal is for the API to feel similar to System.Reflection.Emit.
  • An assembler that uses the emit API.
  • Support for I/O.
  • Support for counting cycles.
Something went wrong with that request. Please try again.