Sticksoft
ADCPU16-Emu Me on Github Me on Twitter

ADCPU16

ADCPU16Emu
==========
Android implementation of Notch's DCPU-16 (v1.1) (http://0x10c.com)
Version 0.22
By Andrew "Stick" Boothroyd (@sticksoft)
Latest stable version: Google Play
Source available at: https://github.com/sticksoft/ADCPU-16Emu
Don't forget to post issues / feature requests on GitHub :)


LICENSE
=======
You may do whatever the fsck you want with this software, at your own risk. (http://en.wikipedia.org/wiki/WTFPL)
If you use it in a project, letting me know and putting a link to https://github.com/sticksoft/ADCPU-16Emu in would be appreciated.
If I ever meet you in person, a beer would be even more appreciated!


README
======

Overview
--------
This version successfully assembles and runs the example found at http://0x10c.com/doc/dcpu-16.txt Supported features include emulator, assembler, console output and virtual ship (2D).
Supported features include emulator, assembler, console output and virtual ship (2D).

Installation
------------
Easiest method: Download from Google Play - https://play.google.com/store/apps/details?id=uk.co.sticksoft.adce
To install directly to an Android phone, download the raw .APK file in your phone's browser.  Open the file, and you should be prompted to install it.
Note: You may need to allow applications from unknown sources on your phone.  Simply go to Settings -> Applications and check the "Unknown sources" box.

Usage
-----
The first tab shown on app startup is the Control tab, containing the RAM viewer (box at the top) and controls for starting / resetting the emulator.
This won't do much until you assemble a program!

The second tab is the Assembly view.  Here, you can load / save an assembly file from disk (press the Menu key for options) and assemble a program.
Pressing "Assemble" will reset the emulator, assemble your program, output the assembled binary and an assembly -> binary view for debugging, and load the binary data into the emulator's memory.
Return to the first tab to start it and view changes to the memory.

The third tab displays the text console.  This is a work-in-progress and, as such, colours may not be displayed the same as other emulators.

The fourth tab displays a virtual ship!  Control it by writing to 0xAD00 (throttle) and 0xAD02 (yaw starboard / port); sample code is included that does this (move.dasm).
Values for these registers are interpreted as signed 2's complement integers; e.g. 0x7FFF = all ahead full, 0x8000 = full reverse, 0x0000 = all stop.

For current rotation speed, read from 0xAD05 - positive (< 0x8000) values are clockwise (starboard) and negative values are anticlockwise.

Harcoded memory addresses
-------------------------
These are subject to change at any time.
0xAD00 - Throttle control
0xAD01 - (reserved for pitch)
0xAD02 - Yaw
0xAD03 - (reserved for roll)
0xAD04 - (reserved for pitch gyro) 
0xAD05 - Yaw gyro
0xAD06 - (reserved for roll gyro)

0xAD10 - Radar control. Set to 0xFFFF to get count, set to index number (starting at 1) for that contact's info.
0xAD11 - Radar contact count
0xAD12 - Current contact X
0xAD13 - (reserved for contact Y)
0xAD14 - Current contact Z
0xAD15 - (reserved for contact type)
0xAD16 - (reserved for contact size)
0xAD17 - (reserved for contact IFF code)

Known Issues
------------
Should auto-assemble and reset on startup (doesn't yet)
The asteroids are offset slightly on the radar


CHANGELOG
=========
v0.22
-----
Added option to toggle keyboard (let me know if this fixes it for you, drew!)
Added web-based chat and email links to help menu

v0.21
-----
Added keyboard.dasm (just for you, Don!)
It outputs to console and moves ship with w,a,s,d.

v0.20
-----
Added keyboard input (ask and you shall receive, William! :))

v0.19
-----
Added rudimentary help files and useful links.

v0.18
-----
Redone the CPU threading (should run about 5x faster now!)

v0.17
-----
Added the file overwrite check.
 
v0.16
-----
Added a sample radar assembly file

v0.15
-----
Added asteroids
Altered yaw to use angular velocity and a gyro (Thanks, icarroll!)

v0.14
-----
Added virtual ship tab!

v0.13
-----
Fixed a crash issue with ICS (Thanks, Jareb!)

v0.12
-----
Added an icon
Released on Google Play (Android Market)

v0.11
-----
Changed to tabbed layout
Added console display

v0.10
-----
Added DAT support to assembler

v0.09
-----
Included binary APK
Included a sample pong-like program
Fixed label bug in assembler

v0.08
-----
Added Load and Save commands for SD storage

v0.07
-----
Added loading and saving of the ASM buffer

v0.06
-----
Added text entry

v0.05
-----
Added an assembler

v0.03, v0.04
------------
Minor bugfixes

v0.02
-----
Fixed a bug with the PC, first working version