0x10c - In-game computer CPU - Assembly?

How was Notch/ Markus able to put something like this in his recently ‘Cancelled’ game? - 0x10C (He used Unity)

Reference Images:

and

http://www.pythononwheels.org/static/img/dcpu-16_2.jpg

Well, that’s simple, write an emulator / interpreter or search for one that works on pure .NET / Mono…

How he was able to implement one? Well, because he can :smiley:

You provided almost no information in this “question”. Most people (including myself) probably don’t know the game you talk about. So what can you actually do in this “PC”?

edit
It seems he invented his own 16bit processor type. The instruction set can be found here:
http://dcpu.com/dcpu-16/

If you don’t know how a CPU works you should better stop right now :wink:

How to design your own system from scratch will most likely need a lot of CS studying. You have to understand what goes on at the basic assembly/instruction level to come up with something like that. The keywords you are looking for is CPU Instruction Set. Lookup the instruction sets of e.g. the 6502 or Z80 and read through them. If you now understand how a program like while(i < 5) i++; translates into those instructions you have all the understanding needed, otherwise you will need to read up on how a textfile gets translated into something a cpu can understand: The compiler.

Implementing these things is the easiest part and will most likely be a loop + switch for the most basic version. Going to JIT/AoT compiled from there is a whole other level and not needed except you are doing something really processing heavy.

Look at how emulators are doing there job to know more about this.

If you want to provide external users with a scripting capability just use a scripting language or let them import .NET dlls.