dcpu16 icon indicating copy to clipboard operation
dcpu16 copied to clipboard

Colour screen

Open mason-larobina opened this issue 12 years ago • 8 comments

Hey Swetland,

Sorry about the first pull request, accidentally had some files trapped.

These patches add a screen dumping function and a new instruction DAT to write raw numbers and strings in the program memory. Seen in Notches latest screenshot http://i.imgur.com/Tq9ue.jpg

Also made a few other changes (feel free to cherry-pick) which make the Makefile more modular, use -std=c99, renamed example DCPU-16 asm files to .dc to work with the vim colour scheme for the DCPU-16 and added some missing headers.

mason-larobina avatar Apr 06 '12 09:04 mason-larobina

However there is still a few problems, notably the disassemble function outputs junk for the data segment of the hex file.

mason-larobina avatar Apr 06 '12 09:04 mason-larobina

Adding DAT/DATA (and making WORD accept multiple arguments) is on my list, but I'm planning on doing it a bit differently. In particular I'll handle quoted string processing internal to the lexer.

I'm holding off on bolting peripherals on just yet -- I want to provide a general mechanism for them rather than do everything one-off, and I have some other things I'd like to tidy up first.

swetland avatar Apr 06 '12 09:04 swetland

More importantly I had fun writing the patches, I've never played with any assembly language before and it was interesting working at that level.

mason-larobina avatar Apr 06 '12 09:04 mason-larobina

In particular I'll handle quoted string processing internal to the lexer

That's good

but I'm planning on doing it a bit differently.

Hmm. It'll be interesting to see the different way of raw data compiling =)

rayslava avatar Apr 06 '12 09:04 rayslava

Can I also suggest a small refactor of your source files to make it easier to optionally include them as a library into other projects. I think a lot of people will find that quite useful.

Again I'm happy to help and submit some patches if you're short on time. I'm also trying familiarise myself with OpenGL to get DCPU-16 up and running on a space ship ASAP.

mason-larobina avatar Apr 06 '12 10:04 mason-larobina

Mason, do you mean writing an cpu emulator with OpenGL interface? If you work in this tempo you will finish the game faster than Notch… ;)

rayslava avatar Apr 06 '12 10:04 rayslava

Yup -- part of the "make peripherals modular" change I plan to make is to also separate the core of the emulator from the wrapper program, to allow for easier embedding in other stuff.

swetland avatar Apr 06 '12 10:04 swetland

I can't do much yet but I'm trying to get rudamentary control of a "space-ship" (a.k.a. cube) running DCPU-16 in 3d space by adjusting various memory mapped locations (i.e. multi-axis thruster controls).

However not only is this my first day playing with ASM, I've never worked with OpenGL before. No biggie.

An official hardware I/O (or thoughts on what it would look like and a non-standard implementation) would be great at this point and eventually interrupt handling to receive RF signals *wink wink*

mason-larobina avatar Apr 06 '12 10:04 mason-larobina