Live data from Hacker News

Notch's Specification for the In-Game DCPU-16

0x10c.com

11–20 of 177 posts

Re: Notch's Specification for the In-Game DCPU-16

#11

Context: For those who are puzzled (as I was) as to what this CPU is for , I found this: > Notch's next game, 0x10c, "will allow players to create their own spaceship in the far, far future of an alternate universe ... More exciting - especially for those versed in programming languages - is the ship's computer. It's a fully-functional 16-Bit CPU that controls the entire vessel..." http://www.dealspwn.com/notchs-spac…

It's good to see Notch working on the Little Coder problem, even if that's not his direct intention. :)

Re: Notch's Specification for the In-Game DCPU-16

#12
post #7
post #2

Just waiting for the first post about programming this CPU to pop up on Stack Overflow ... :) It's quite an interesting architecture. From an initial perusal, I found these features note-worthy: * Explicit access to PC as a register, makes "computed goto" trivial and very natural. * Because of the above, there is no JMP instruction. * Treating operations on registers as "values" makes the instruction set very orthogo…

I'm a self-taught programmer, and don't know much about CPUs. Would someone mind putting this into relatively plain english, I'm quite curious to know the practical implications of this. Can we expect to see Python running on it in the near future for example :) ?

"real" python seems unlikely, given that the standard executable is well over 64KB in size.

A variant like cython that compiles to this assembly? maybe...

Re: Notch's Specification for the In-Game DCPU-16

#14
post #9
post #7

Earlier quoted context omitted.

I'm a self-taught programmer, and don't know much about CPUs. Would someone mind putting this into relatively plain english, I'm quite curious to know the practical implications of this. Can we expect to see Python running on it in the near future for example :) ?

Although some of the implications require experience to understand, I'd say it already is in "relatively plain English", you simply haven't been exposed to the vocabulary and concepts necessary. Trying to explain in any detail would basically be reproducing Wikipedia, so here are some links: http://en.wikipedia.org/wiki/Program_counter http://en.wikipedia.org/wiki/Word_(computer_architecture) http://en.wikipedia.org/…

Reading all these wikipedia pages is going to kill at least an hour of productivity today :/

Re: Notch's Specification for the In-Game DCPU-16

#15

Context: For those who are puzzled (as I was) as to what this CPU is for , I found this: > Notch's next game, 0x10c, "will allow players to create their own spaceship in the far, far future of an alternate universe ... More exciting - especially for those versed in programming languages - is the ship's computer. It's a fully-functional 16-Bit CPU that controls the entire vessel..." http://www.dealspwn.com/notchs-spac…

Thanks for mentioning this. I was getting real confused about why someone would create a CPU/ASM for their game. Thought he'd then have to build the new game on top of that CPU and notch is crazy but that seemed a bit much..

Re: Notch's Specification for the In-Game DCPU-16

#16
Just for fun, I wrote a disassembler for his instruction set. https://gist.github.com/2300590

I previously wrote some assembler routines for x86, which is very complex, working with Notch's design is a breeze and actually enjoyable.

Does he somewhere mention if the code is loaded into the RAM? This would make self-modifiable code possible.

Re: Notch's Specification for the In-Game DCPU-16

#17
post #2

Just waiting for the first post about programming this CPU to pop up on Stack Overflow ... :) It's quite an interesting architecture. From an initial perusal, I found these features note-worthy: * Explicit access to PC as a register, makes "computed goto" trivial and very natural. * Because of the above, there is no JMP instruction. * Treating operations on registers as "values" makes the instruction set very orthogo…

> Explicit access to PC as a register, makes "computed goto" trivial and very natural.

Am I right in thinking ARM uses this model? I haven't worked on them since ARM2, but I have a hazy recollection...

Re: Notch's Specification for the In-Game DCPU-16

#18
post #2

Just waiting for the first post about programming this CPU to pop up on Stack Overflow ... :) It's quite an interesting architecture. From an initial perusal, I found these features note-worthy: * Explicit access to PC as a register, makes "computed goto" trivial and very natural. * Because of the above, there is no JMP instruction. * Treating operations on registers as "values" makes the instruction set very orthogo…

> No instructions for bit-manipulation.

What? Plenty of opcodes for that. SHL, SHR, AND, BOR, XOR are all bitwise operators.

Unless you mean bitset and bitclear macros, but no self respecting embedded programmer uses those. I've disagreed with almost everything else Notch has done, but from a simple pedagogical standpoint, he's doing the right thing by leaving those out.

Re: Notch's Specification for the In-Game DCPU-16

#19

Context: For those who are puzzled (as I was) as to what this CPU is for , I found this: > Notch's next game, 0x10c, "will allow players to create their own spaceship in the far, far future of an alternate universe ... More exciting - especially for those versed in programming languages - is the ship's computer. It's a fully-functional 16-Bit CPU that controls the entire vessel..." http://www.dealspwn.com/notchs-spac…

It's good to see Notch working on the Little Coder problem, even if that's not his direct intention. :)

Ugh. Googling Little Coder problem matches "small code problems" and "little codec problems" before something remotely related to what I wanted. There's a single relevant result in the first page.

The verbatim search returns a very good match in #1 and about 80% of the results seem appropriate. It seems the recent synonyms fixes are not nearly enough.

And, for the interested: http://blog.steveklabnik.com/posts/2009-12-28-the-little-cod...

Re: Notch's Specification for the In-Game DCPU-16

#20
post #12
post #7

Earlier quoted context omitted.

I'm a self-taught programmer, and don't know much about CPUs. Would someone mind putting this into relatively plain english, I'm quite curious to know the practical implications of this. Can we expect to see Python running on it in the near future for example :) ?

"real" python seems unlikely, given that the standard executable is well over 64KB in size. A variant like cython that compiles to this assembly? maybe...

You don't need the full python repl/compiler/interpreter/libraries, you "just" need the python virtual machine. Once there's a C compiler for the platform that should be relatively straightforward, because I sincerely doubt that takes all 128KiB.
Post reply on HN