[Home]MoonShadow/DCPU16

ec2-3-147-65-65.us-east-2.compute.amazonaws.com | ToothyWiki | MoonShadow | RecentChanges | Login | Webcomic

A JavaScript [DCPU16] emulator implementation is [here].

It implements the [v1.7 spec], and the following devices:

One of each is attached to the DCPU (in arbitrary order, check device IDs on startup).

An asynchronous command shell is provided for debugging and controlling the emulation. Online help is provided via the help command. The asm command will switch to assembly editing mode, allowing you to paste DCPU16 assembly source from elsewhere on the web.




In addition to the instruction syntax used in the examples by Notch, the assembler supports the following:
  1:
    ifg a, b
      b 1f ; bail out
    ; do stuff
    b 1b ; loop round
  1:
  macro test (_a, _b, _c)
    dat (_a+_b), _c
  endm
  test( 1, 2, 7 )
expands to
  dat 3, 7

There is a GitHub? repository for the project [here].




You can paste code on this wiki and produce URLs that automatically load it in the emulator. The URL syntax is a little convoluted. See DDD/Pong for an example. If you want to do this - WelcomeToWiki! Please make yourself a home page and paste your code into subpages of that, to avoid clashes in the global namespace.




A cooperative multitasking OS is being written, hopefully in character for the game. Source can be obtained from the [github repository]. You can see it [here] (click ok, type "run" in the emulator command box). The line editing works but the shell doesn't do anything with the input just yet. CTRL+n will open a new shell terminal, CTRL+left/right arrow will switch terminals. Status bar contains, left to right: bottom word of current clock (ticks at ~4Hz, will be used for cursor blinking, watchdog and event timers); amount of free memory in words (may not actually reflect maximum allocatable area due to fragmentation); foreground process handle for current terminal; identifier for process owning current terminal.

ec2-3-147-65-65.us-east-2.compute.amazonaws.com | ToothyWiki | MoonShadow | RecentChanges | Login | Webcomic
This page is read-only | View other revisions | Recently used referrers
Last edited May 31, 2012 7:16 pm (viewing revision 17, which is the newest) (diff)
Search: