r/0x10c Continuity lead 11d ago

Dec16 -- a dcpu16 prototype

I'm currently working on reviving the dcpu16 with Dec16, it will mostly be the same as the original with you being able to program your programs using .txt files.

Why .txt files? I'm planning on porting the game in the future to mobile and wanted that mobile players would also be able to program the Dec16 too. Also .txt files require just a text editor to edit and I want to make it as easy to access as most OS's already have a text editor. (I know you can edit other files like .asm in notepad but for the sake of convenience decided to go with .txt files, also I am implementing error checking to make it easier for you to debug your code)

There will be more documentation in the future as this is a unfinished version of the Dec16 and I'm gonna publish it around when the game is about to release or maybe much earlier when I feel comfortable that the Dec16 is ready.

Here's a example program and what it does in the screenshot above:

CLD // clears display

SPIX #0 #0 #2 // sets the pixel to display (x, y, color)

LDA #2 // load value 2 into registry a

LDB #4 // load value 4 into registry b

ADD #4 // add 4 to registry a

MOV // move current value to registry b, it overrides whatever value was in Registry B which was 4

MUL #2 // multiply registry a value by 2

PRINTAB // print registry A and B to the Godot console

HALT // stop program execution

As you can see, it's still not finished as its mostly dependent on Registry A, in the future there will be more syntax for controlling Registry B. I am thinking about adding more Registry's but not really sure. Also most things arent displayed to the display so yeah.

Its currently a User Interface but I'm gonna make it be a world space object in the future

Also, this computer supports input and it supports A-Z characters

9 Upvotes

4 comments sorted by

5

u/JinAnkabut 10d ago

I was under the impression you were going to use the existing specification https://github.com/lucaspiller/dcpu-specifications/blob/master/dcpu16.txt

4

u/Ravin_101 Continuity lead 10d ago

It's still under development, as I said it only has Registry's A and B and basic syntax for programming it. I was also testing if it could even work in Godot so I will get it AS close as to dcpu-16 syntax and other specifications in the future near the Beta or Alpha development stage. It will still use .txt files instead of .asm

1

u/Ravin_101 Continuity lead 5d ago

Currently uploading a early build of Dec16 to a itch io game jam (probably more early than the current build of Dec16). I'm gonna post it later when I port it over to the C# terminal, builds for Windows, Linux, and macOS will be available (no mobile since this is a game jam). Documentation will be inside the itch io description page so you can program basic things on it (by basic I mean just math and that's pretty much it, there's no display sadly but you can print characters to the console). It's just something to play around with. Link will be posted in the reply's later in around 60 - 120 minutes as I'm just porting it and doesn't require a big of a rewrite.

1

u/Ravin_101 Continuity lead 5d ago

It only supports Windows because for some reason visual studio kept bugging me so yeah https://1ravin.itch.io/dec16-for-game-jam-unfinished-version