Page 2 of 3

Re: Factorio Computer

Posted: Fri Jul 17, 2015 2:03 pm
by Lupoviridae
Phillip_Lynx wrote:do you think you can make a Game of Life with this?
GoL should be very possible. Actually it should be possible with a MUCH smaller array. Theoretically with 10 or so combinators per pixel.

Edit: It actually takes 12 gates/pixel minimum, 7 gates/corner, and 9 gates/edge. And should be able to clock up to 20 Hz. I kind of want to make this now.

Re: Factorio Computer

Posted: Fri Jul 17, 2015 7:08 pm
by Sander Buruma
How about a game of tick tac toe?

Re: Factorio Computer

Posted: Sun Jul 19, 2015 1:26 am
by Lupoviridae
With 0.12 out, finally putting in the combinators!
So far have the first memory "chip" done. It stores 128 B with 32 unique addresses.
Here's what the map looks like.
Map.PNG
Map.PNG (134.05 KiB) Viewed 6433 times
And a close up on some of the bits:
Bits.PNG
Bits.PNG (519.21 KiB) Viewed 6433 times
And here's the final 8 bit to 2x16 line address decoder.
Decode.PNG
Decode.PNG (544.5 KiB) Viewed 6433 times
Finally, the save file if anyone wants to check it out. Currently have a program running to test the memory writing. Doing a sequential write 1 followed by sequential write 0 on all 32 current addresses.
Keith2.zip
(12.81 MiB) Downloaded 240 times

Re: Factorio Computer

Posted: Sun Jul 19, 2015 3:10 pm
by Lupoviridae
One more picture of the chip. Zoomed all the way out for some scale.
Chip1.PNG
Chip1.PNG (2.12 MiB) Viewed 6395 times

Re: Factorio Computer

Posted: Sun Jul 19, 2015 3:32 pm
by ratchetfreak
You can combine several "channels" into a single row selector using the special signals "everything", "anything" and "each"

For reading you put a selector ID on the 0 signal and each output decider combinator is set to 0 signal = rowID and output to "everything input count ". To filter out the 0 signal from the group you need to multiply it by -1 and also output to the output line.

Image

The left constant emits the row selector on the green wire, the right contains the row data (as place holders).

The arithmetic combinator inputs on green and outputs on red to neutralize the 0 selector signal.

The decider combinator inputs the selector on green and the data on red and outputs on red to the poles.

You can do a similar trick for selecting the row for writing though you'll need a arithmetic combinator per row.

Re: Factorio Computer

Posted: Mon Jul 20, 2015 2:23 am
by Lupoviridae
As I said earlier, this whole computer can in theory be reduced down to a single row of poles . I went with a binary implementation because I wanted it to be closer to a real computer. As for a read/write controller, I already have something very similar included in each memory bit, where the data flow in each cell is instead controlled by a master address enable signal.

Re: Factorio Computer

Posted: Mon Jul 20, 2015 3:35 pm
by Jonathan88
Please could you (Lupoviridae) do some kind of guide/tutorial on how to begin with combinators and stuff.
It would be very useful since I am not very good at combining logic gates and making more complex contraptions. I understand how to make some logic gates and some basic programming (easy programming, not actual 'basic').

I'm sure lots of other people would really appreciate it and it would be great for it to come from the master of Factorio circuit systems! I understand if you are busy with your factorio computer so please make that your priority!

Re: Factorio Computer

Posted: Mon Jul 20, 2015 3:52 pm
by ratchetfreak
Jonathan88 wrote:Please could you (Lupoviridae) do some kind of guide/tutorial on how to begin with combinators and stuff.
It would be very useful since I am not very good at combining logic gates and making more complex contraptions. I understand how to make some logic gates and some basic programming (easy programming, not actual 'basic').

I'm sure lots of other people would really appreciate it and it would be great for it to come from the master of Factorio circuit systems! I understand if you are busy with your factorio computer so please make that your priority!
perhaps do it on the wiki, it needs some lovin'

Re: Factorio Computer

Posted: Mon Jul 20, 2015 3:57 pm
by Lupoviridae
Jonathan88 wrote:Please could you (Lupoviridae) do some kind of guide/tutorial on how to begin with combinators and stuff.
It would be very useful since I am not very good at combining logic gates and making more complex contraptions. I understand how to make some logic gates and some basic programming (easy programming, not actual 'basic').
It would be my pleasure. Honestly though there's so many possibilities I'm not sure where to start. Do you have something specific you would like to see, or any suggestions on what would be a good starting point? I guess fluid handling has the most practical implementations at the moment.

Re: Factorio Computer

Posted: Mon Jul 20, 2015 5:53 pm
by Jonathan88
Lupoviridae wrote:It would be my pleasure. Honestly though there's so many possibilities I'm not sure where to start. Do you have something specific you would like to see, or any suggestions on what would be a good starting point? I guess fluid handling has the most practical implementations at the moment.
Yeah! Whatever! I'm not really sure what their uses are but it would be cool to see some practical ones and some that just look cool! (https://youtu.be/LYVvtDx6AG8)

Re: Factorio Computer

Posted: Thu Jul 23, 2015 5:50 am
by MadZuri
evidently nothing new to see here

Re: Factorio Computer

Posted: Thu Jul 23, 2015 7:17 am
by Sander Buruma
Combinator devices like this are in several posts already, not least of which twinsen's scrolling factorio sign save file which was made public before yours.

Re: Factorio Computer

Posted: Thu Jul 23, 2015 12:58 pm
by Lupoviridae
MadZuri wrote:evidently nothing new to see here
It's a rather large project, with the amount of playtime i get it will probably be a week or so before the memory is finished. Its also pretty limited until player input is implemented, so once the memory is done I'll likely take a break and make the Game of Life

Re: Factorio Computer

Posted: Tue Aug 04, 2015 1:13 am
by Lupoviridae
Finally finished building a computer (or the RAM at least). I ended up dropping the binary build and going for a 32-bit build instead, since the binary build was mostly just to help me learn how computers work. My thanks to XKnight (whose basic memory cell design I incorporated) and u/orost on reddit (whose design motivated me to get off my ass and finish this). Each cell can store any set of signals in memory. input is at the top left. The red wire carries data, while the green wire carries the address and read/write signal. "A" is the address signal (1-256 for the 256 memory cells). R=1 is the read signal, while R=2 is the write signal.
Computer pic.PNG
Computer pic.PNG (661.41 KiB) Viewed 6951 times

Re: Factorio Computer

Posted: Tue Aug 04, 2015 1:33 am
by Lupoviridae
Here's what a single cell looks like.
Cell Layout.PNG
Cell Layout.PNG (229.39 KiB) Viewed 6951 times
I plan on using signals 0 - 9, each with a value of 0 - 255 for data. Meaning each cell will essentially store 10 Bytes, making this a 2.5 kB setup.

Re: Factorio Computer

Posted: Tue Aug 04, 2015 8:02 am
by Jonathan88
Well done! It lools awesome but does it do anything? It would be cool to have 1 program (maybe more) that does something impressive with lamps etc. and then a world download to finish it off! On the other hand... I kinda want to see game of life...

Re: Factorio Computer

Posted: Tue Aug 04, 2015 9:24 am
by MasterBuilder
Jonathan88 wrote:Well done! It lools awesome but does it do anything? It would be cool to have 1 program (maybe more) that does something impressive with lamps etc. and then a world download to finish it off! On the other hand... I kinda want to see game of life...
I'm now imagining programs being distributed as the 'blueprint' version of punch-cards.

Re: Factorio Computer

Posted: Tue Aug 04, 2015 2:07 pm
by Lupoviridae
Unfortunately there aren't too many uses until some player interface devices are added. One idea I had was to have it take a snapshot of the entire logistics system at regular intervals, then on command one could say, "show me my iron usage", and it would output a graph of the amount of available iron over the past x amount of time. Not certain if I want to do this yet though, still trying to think of other ideas.

Re: Factorio Computer

Posted: Tue Aug 04, 2015 4:36 pm
by XKnight
Lupoviridae wrote:Here's what a single cell looks like.

Image

I plan on using signals 0 - 9, each with a value of 0 - 255 for data. Meaning each cell will essentially store 10 Bytes, making this a 2.5 kB setup.
Maybe I missed something, but why 5 combinators and 1 constant combinator are placed there?
I think it is possible to do the same thing only with 4 combinators. Like this:

Image

Red - carries address.
Green - carries in/out data.
Address 123 = means write
Address -123 = means read

Re: Factorio Computer

Posted: Tue Aug 04, 2015 8:41 pm
by Lupoviridae
I think you're right. I hadn't considered using a negative value as a read signal, this is really smart. You still need to use electric poles to provide power, so the overall footprint is still pretty close (5x2 instead of 6x2), but your way definitely uses less combinators and less time per read/write (1 tick instead of 2). Nice design! I definitely wouldn't have thought of that.