Overview

+----------------------------+
| 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:
http://www.youtube.com/user/benedek93


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.

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

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
or
    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 <vartokb@student.ethz.ch>