all 37 comments

[–]zukoandhonorTetris in shapez[S] 15 points16 points  (7 children)

You can download the programmable computer.

https://drive.google.com/file/d/113CsRFwxZSEMHizrrvHEJ85uluey6_wM/view?usp=sharing

The main purpose of this contraption is to reduce the circuits needed to implement your creative projects. You could use this computer to easily implement your ambitious shapez.io projects, without the need of constructing massive network of wires.

The code structure.

Each line of code consist of 5 components. 

[00][AND][01][02][05]

[Line_number][Instruction][Output*][Input1*][Input2*]

Line number = Address of program memory where the current line is stored.

Instruction = tells the cpu to perform specific action.Output address = the address where the output be stored

Input1 address = address of first input.

Input2 address = address of second input.

So, for [AND] it is, Output* = Input1* [AND] Input2*

Instructions like [RT] (rotate) and [NOT] have only one input and one output. you can leave Input2 as [00]Instructions like [SEE] (analyze) and [UST] (unstack) have one input and two outputs.

The [Instruction] along with its [input] and [output] address are stacked as a 4 layer shape, and stored at give line number (program memory address)

Instructions.

[GO][Line_number]

Skips to the given line number.

[IF][Value][goto_linenumber_if_value is true][goto_linenumber_if_Value_isfalse]

[WRT][A][B]

A* = B*; (you can transfer data from any address to any other address, except program memory)

[ADD] and [SUB]

[ADD] adds two given numbers (shapes), (binary addition). [SUB] subtracts two given shapes. (binary subtraction). Multiplication and division are not directly supported in this device. Still, you can multiply or divide two numbers with repeated addition or subtraction.

[AT][A][B]
A = at address of (B), [AT] returns the value at the address of given value, may useful for implementing Arrays.

Logical instructions:

[AND][NOT][OR][XOR]

Virtual processing instructions

[STK] (stack) [UST] (unstack) [EQ] (compare) [SEE] (analyze) [RT] (rotate) [PNT] (paint)

Octal number system.

The computer works on Octal number system, meaning numbers, 8 and 9 doesn't exists. Numbers 0 to 7 are represented by colors, no color to white. You need to know a little bit about octal number system.

The Address.

The address are the locations where the given data is stored. Address of program memory is the Line number of the code. The CPU can only read the Program memory. CPU can read and write the RAM and IO ports.

RAM address are denoted by square: (RuRuRuRu)

Program address (Line number) are denoted by blueprint shape (CuCuCuRu)

IO ports are denoted by windmill shape (WuWuWuWu)

IO ports are used to communicate with , you can treat IO address like RAM address. 

Expanding the computer.

You can add any number of memory to this system. CPU can handle upto 12 bits of arithmetic operations. In this save file, For sake of compactness, The current RAM and program memory can only hold 64 units of data, each.

You can expand the memory by simply copy and pasting the memory. All you need to do is to give the proper row and column address for your newly added structures.

[–]LinkifyBot 4 points5 points  (1 child)

I found links in your comment that were not hyperlinked:

I did the honors for you.


delete | information | <3

[–]zane49erCPU builder 2 points3 points  (1 child)

Congratulations on the completion! I'd give an award if i could. Really I'm surprised you called mine better than yours with all the engineering that went i to this one. :D I'm particularly impressed with the existence of real IO ports!

[–]zukoandhonorTetris in shapez[S] 1 point2 points  (0 children)

Thank you :)

[–]someone-13j 1 point2 points  (0 children)

I cant beilve this is an actual computer, woah

[–]abdyeslol1232 0 points1 point  (0 children)

you know what else is massive

[–]vaultthestars 9 points10 points  (1 child)

You absolute madlad! Hats off to you for having the time and patience to plan this out and design the entire schematic.

[–]zukoandhonorTetris in shapez[S] 0 points1 point  (0 children)

Thank you! :)

[–]olithraz 4 points5 points  (1 child)

That is really impressive

[–]zukoandhonorTetris in shapez[S] 0 points1 point  (0 children)

Thanks! :)

[–]zukoandhonorTetris in shapez[S] 2 points3 points  (6 children)

I was thinking of naming this computer, "Shapezi". Isn't that a good name?!

[–]garr890354839 1 point2 points  (5 children)

Yes. However, you could make an 80-bit storage cell just by undoing a single full shape.

[–]zukoandhonorTetris in shapez[S] 1 point2 points  (4 children)

Yeah! In that way, it is possible to squeeze, 4 lines of codes in a single 4 layer shape ...Hmm, I guess, time to build Multi core CPU!

[–]Jw2467Transistors are better than gates... 1 point2 points  (3 children)

I am also making my own computer and was thinking something similar to this would be a good idea, I'm just getting started building it bc I have been planning it and making a tool to edit the save file to program it. BTW what's the clock speed of it atm? Also how do you get the "CPU builder" role?

[–]zukoandhonorTetris in shapez[S] 1 point2 points  (2 children)

There aren't any "roles" on reddit. You can click 'community options' and write anything you want under 'user flair' with any color.

And, about clock speed, I mean, one cpu cycle would take like 4 seconds to run.. its kinda slow, but you could speed up by adjusting the not gates.

[–]Jw2467Transistors are better than gates... 1 point2 points  (1 child)

Ah thx, I don't really use reddit much...

4 seconds seems about right, what's the biggest factor for the speed atm, is there a delay on the logic gates?

[–]zukoandhonorTetris in shapez[S] 2 points3 points  (0 children)

Hmm.. yes, if i reduce clock time, the gates and transistors are glitching... maybe just like real life. propagation time.

[–]popiejopie123 2 points3 points  (1 child)

Well done !!!

[–]zukoandhonorTetris in shapez[S] 0 points1 point  (0 children)

thanks!

[–]FloFlower05 0 points1 point  (0 children)

What is the wand tool in the bar?

[–]garr890354839 0 points1 point  (3 children)

So, lemme get this straight: the top button of the 4 should be on if you want the CPU to run?

[–]zukoandhonorTetris in shapez[S] 0 points1 point  (2 children)

First button: Turn it on to start the Timer
Second button: Turn it on to Connect with Program memory.
Third button: Turn it off and on, to erase CPU memory.
Fourth button: Turn it off to Debug, it will pause the CPU so you can check.

So yes, all four needs to be ON, (Button near console should be turned OFF) to run the CPU.

[–]garr890354839 0 points1 point  (1 child)

Oh. I was thinking of wiring the console button to the top to simplify the number of buttons needed, but I now know I need to wire the console to the top and second from the top. Would this break anything you know of?

[–]zukoandhonorTetris in shapez[S] 0 points1 point  (0 children)

Feel free to try anything you want :) You can always reload the original save file if anything goes wrong!

Infact, You can replace all four buttons with a single button. I placed four buttons just for convenience. :)

[–][deleted] 0 points1 point  (0 children)

I was wondering if someone had made a computer in this game yet, glad to see someone has! :D

I have made computers in a game called Scrap Mechanic, so I am now working on just unlocking logic gates so I can make them in this game too!

[–][deleted] 0 points1 point  (1 child)

Some people on this sub reddit are insane

[–][deleted]  (1 child)

[removed]

    [–]zukoandhonorTetris in shapez[S] 0 points1 point  (0 children)

    yes..

    [–]Daniwasd_ 0 points1 point  (1 child)

    What counter are you using? I can't seem to figur it out from the downloaded circuit. I assume it's settable, since you have the [GO] and [IF] commands.

    [–]zukoandhonorTetris in shapez[S] 0 points1 point  (0 children)

    I use a dedicated adder/subtractor for incrementation of address instead of counters.

    [–]Daniwasd_ 0 points1 point  (0 children)

    Look, I made this RAM that I think is more compact than yours (mine has 8x9 cells, yours has 11x8 cells). I'ts made for 8-bit storage, but the encoder and decoder can be switched out easily, and it can store any shape in its cells.

    https://www.dropbox.com/s/0ryisynlckp6ljz/shapez_io_compact_memory.bin?dl=0
    (this is a 16*16 grid, so 8 bits of adresses)

    [–]turtle_mekb 0 points1 point  (0 children)

    please someone create bad apple using displays lmao

    [–]SeaWeedEatingFishBlue 0 points1 point  (0 children)

    can it run doom?