lilyball / dcpu16

A cycle-accurate implementation of @notch's dcpu-16 in Go
MIT License
41 stars 4 forks source link

Unable to run DCPU-16 applications #5

Closed xyproto closed 12 years ago

xyproto commented 12 years ago

Hi,

I tried the samples that comes with this other DCPU-16 emulator: http://n.ethz.ch/~vartokb/dcpu.html

And Tetris from this page: http://www.dcpu16apps.com/Home/App/33

But I'm unable to get any DCPU-16 application to run.

lilyball commented 12 years ago

I just tried a couple of samples from your first link. First off, they're little-endian, so you need the -littleEndian flag. Secondly, they're trying to print non-printable characters. Specifically, ball.bin tries to print the BEL character. I don't know what 0x10c is going to actually print for that character, but when printing to the Terminal, that just makes it beep. I then tried colordata.bin, and while I'm not sure what it's trying to print, it also appears to be a non-printable character, judging from what I'm seeing in 0x10co.de (that's printing a character that I don't recognize). I looked at a few more, and they all seem to love printing these non-printable characters.

It's possible that for some of these non-printing characters I could switch to the G1 character set and print things from that, but I have no idea what characters I would do that for, and what characters I would print if I did that.

lilyball commented 12 years ago

Tetris almost works. I don't know why it doesn't print the initial message asking for the user to press a key, but once I do, it starts running. Unfortunately, my emulator doesn't handle arrow keys the same way dcpu.ru does, so you can't actually control it.

lilyball commented 12 years ago

I've filed #6 regarding the arrow key issue.

lilyball commented 12 years ago

Oh wait, I know why it's not printing the string. Because it is. Except it's black text on a black background.

lilyball commented 12 years ago

Note that black text on a black background is actually correct. Looks like dcpu.ru may be doing funny things with color.

xyproto commented 12 years ago

Thanks for the feedback, looking forward to the next release. :)

lilyball commented 12 years ago

I just updated the keyboard support to handle arrow keys the way Notch's emulator does. Unfortunately, this doesn't match 0x10co.de, and Tetris doesn't work right this way (which means it doesn't work on Notch's emulator).

xyproto commented 12 years ago

I see. Guess Tetris isn't the gold standard in any case. :)