Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

DCPU-16 in C#

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 DcpuSharp
Octocat-spinner-32 DcpuTest
Octocat-spinner-32 .gitignore
Octocat-spinner-32 DcpuSharp.sln
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
README.md

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)
        {
            cpu.Tick();
            Console.WriteLine(cpu.Status());
            Thread.Sleep(250);
        }

Dependencies

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

License

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.