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

| Benedek's DCPU-16 Emulator |

0. Overview
1. Installation
2. Usage

0. Overview

This is my emulator for the DCPU-16, a computer designed by Notch for his
upcoming game 0x10c.

Supported official features:
 - 1.7-spec-conforming hardware: LEM1802 (monitor), keyboard, clock
 - very accurate 100kHz clock

Extra features:
 - efficient emulation, written in C++: "Turbo Mode" allows for ~10MHz clocks
 - simulated radiation (random RAM corruption)
 - PC-style speaker hardware (see doc/speaker.txt)
 - virtual serial port (see serial.hpp) for communication with processes
   on the host computer
 - register and memory dumps
 - step-by-step mode with disassembly for debugging
 - many sample programs

An assembler is also included in dcasm/, but it sucks.

Assembler features:
 - almost complete official instruction set (no "PICK n",
   [register+offset] has wrong order)
 - DAT lines for including 16-bit-char strings, dec and hex numbers
 - constants with .EQU
 - multiple source file support

See demonstrations of the emulator on my YouTube channel:

1. Installation

The only dependency of this program is the SDL library, so be sure to have
it installed.

This was only tested on Linux with g++, although it has been reported to
work with Windows as well.

to compile the emulator, and do the same thing for the assembler:
    cd dcasm

If you want to install it to another directory, uncomment the first three
PREFIX, BINDIR, DATADIR lines from the Makefile and comment the second three.
Then, set the PREFIX to what you like.  When you're done, compile it and
install it like this (don't forget sudo if the target is a system directory):
    make install
You can uninstall it again with:
    make uninstall

Note that if you change the above mentioned paths, you will probably have to
recompile the program completely, like:
    make clean all
    make clean install

2. Usage

If you have successfully compiled the emulator, you will find its executable
file in the main directory.  You can ask for command-line options or try it
out with a DCPU-16 binary program which you have assembled:
    ./dcpu-16 -h
    ./dcasm/dcasm -h
    ./dcasm/dcasm samples/fonttest.asm
    ./dcpu-16 samples/fonttest.bin

Have fun!
  - Benedek <>

Recent activity

Benedek Vartok

Commits by Benedek Vartok were pushed to benedek/DCPU-16

7c5680c - - fixed bug where entering the interrupt handler could keep the skipping flag from the last instruction and miss the first instruction in the handler
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
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.