Page 1 of 3

Factorio Computer

Posted: Tue Jun 23, 2015 2:08 am
by Lupoviridae
In anticipation of 0.12, I've started laying the groundwork for a computer.
The plan is to make 2 kb of flash memory in 256 4 Byte cells which will double as RAM. Right now I'm anticipating a clock speed of about 4-6 Hz. Took a few pictures of the wiring I've laid so far.

Here's the main bus:
Chip Layout.PNG
Chip Layout.PNG (2.18 MiB) Viewed 19949 times
Overview; have the wiring for 1 out of the 8 memory modules laid.
Map View.PNG
Map View.PNG (36.18 KiB) Viewed 19949 times
One of the more complicated junctions...
Junction.PNG
Junction.PNG (1.69 MiB) Viewed 19949 times

What do you guys think?

Re: Factorio Computer

Posted: Tue Jun 23, 2015 3:34 am
by vampiricdust
That's awesome! Is there a way to hardwire a program or perhaps use requester chests to store it? Be neat if we use blueprints to pass programs between "computers".

Re: Factorio Computer

Posted: Tue Jun 23, 2015 6:30 am
by ratchetfreak
you can compact the bus if you realize that each item is its own channel on the wire, that means each string of poles has 2*number of items channels for data transfer and each channel can hold (presumably) a 32 bit word

so you can encode each column to a specific item and use a multiplexer to select a row to pull.

then on the cpu side you select the exact word(s) you want by splitting out the channel again and use another multiplexer.

Re: Factorio Computer

Posted: Tue Jun 23, 2015 9:10 am
by Yttrium
each string of poles has 2*number of items channels for data transfer and each channel can hold (presumably) a 32 bit word
Sounds like a two core fiber glass cable to me, Awesome Idea

Re: Factorio Computer

Posted: Tue Jun 23, 2015 9:12 am
by Twinsen
Oh wow. I think I want your savegame. It will be the true test for the migration of the circuit wires and networks :) send me a PM if you want.

I see you have mods. That might be a problem when moving to 0.12 since most mods will be broken.

Re: Factorio Computer

Posted: Tue Jun 23, 2015 12:58 pm
by Lupoviridae
ratchetfreak wrote:you can compact the bus if you realize that each item is its own channel on the wire, that means each string of poles has 2*number of items channels for data transfer and each channel can hold (presumably) a 32 bit word

so you can encode each column to a specific item and use a multiplexer to select a row to pull.

then on the cpu side you select the exact word(s) you want by splitting out the channel again and use another multiplexer.
I thought about doing this, but a large part of the reason I'm building this is to teach myself how all this works. So with a few exceptions I'm trying to make it as binary as possible. Theoretically if one were very clever this could work with only one line of poles doubling as data and address buses, since there are quite a few different items in the game to use. Each memory cell would have to be programmed individually though...
Twinsen wrote:I see you have mods. That might be a problem when moving to 0.12 since most mods will be broken.
The only mod I have is active is landfill, I'm just praying that 0.11 saves will be forward compatible with 0.12. They should be, right?

Re: Factorio Computer

Posted: Tue Jun 23, 2015 1:04 pm
by Twinsen
Lupoviridae wrote:I'm just praying that 0.11 saves will be forward compatible with 0.12. They should be, right?
Yes, we are doing quite some work to make saves forward compatible. That's why I wanted your save, to test forward-compatibility so your save will work perfectly in day 1 of 0.12 :)

Re: Factorio Computer

Posted: Tue Jun 23, 2015 10:21 pm
by ssilk
In other words, Lupoviridae: If you want to make the community a good, then provide the saves, no matter how good or bad you think it is built. :) (Indeed: The more ugly, the better)

Re: Factorio Computer

Posted: Wed Jun 24, 2015 1:32 am
by Lupoviridae
Here's the latest save file
Keith2.zip
(8.11 MiB) Downloaded 305 times

Re: Factorio Computer

Posted: Sun Jul 12, 2015 12:03 am
by Lupoviridae
A few new pictures, all ready for 0.12.

First off, here's the map overview of the completed memory, far bigger than my entire base.
Map.PNG
Map.PNG (59.01 KiB) Viewed 18957 times
And here is the future site of the address decoder: 8 bits in (4 red, 4 green) to 2 x 16 lines out.
This will also control the clock enable and read/write signal distribution.
AED.PNG
AED.PNG (434.67 KiB) Viewed 18957 times
Last but not least here is the main bus that will tie in to the CPU.
From left to right...
1x Large pole: carries read (red), write (green), and clock enable (blue)
4x large poles: 8 bit address bus
16x med poles: 32 bit data bus
CPUBus.PNG
CPUBus.PNG (615.99 KiB) Viewed 18957 times
On a side note the electric field has grown so large I have actually hit a bug where the game crashes if i try to remove any existing electric pole. Thankfully it has already been fixed for 0.12, but man is it annoying to build around lol

Re: Factorio Computer

Posted: Mon Jul 13, 2015 5:31 pm
by eidolonFIRE_XI
Dude, this is fantastic. Very inspiring. I think I know what I'll be doing when .12 is released. ;)

Re: Factorio Computer

Posted: Tue Jul 14, 2015 4:42 pm
by Tashen
I cannot even begin to comprehend what all of this is doing and how you would use it. It looks very impressive and I can't imagine how much time went into this.

I think if I used red/green wires more in my bases maybe some of this might make sense, but I never use any green/red wires and I rarely use smart inserters.

Re: Factorio Computer

Posted: Tue Jul 14, 2015 7:11 pm
by Jonathan88
I don't even...
It is just so...
How does it even...
I just...
Wha...

*waits for brain to solidify*

That is one epic build man! And you did it in 'survival' as well! And I thought I was intelligent...

I wonder - how similar is it to real computers (maybe to old ones) and will it be able to run any program that it has the memory to?
Whatever it does:
Image

Re: Factorio Computer

Posted: Wed Jul 15, 2015 2:20 pm
by Lupoviridae
Jonathan88 wrote:I don't even...
I wonder - how similar is it to real computers (maybe to old ones) and will it be able to run any program that it has the memory to?
It is built almost exactly like a real computer and works in the same way. So theoretically yes, it could run any program smaller than 2 kB. Although with no operating system any program would have to be built without using code. (in other words programmed directly into binary) I'm hoping that once the new inputs come out (late 0.12 or 0.13) I will be able to program simple games; namely pong or space invaders.

On a side note, my first task on the release of 0.12 will be placing the approximately 13,000 combinators required to actually make this memory functional. :lol:

Re: Factorio Computer

Posted: Wed Jul 15, 2015 4:45 pm
by Jonathan88
Lupoviridae wrote:On a side note, my first task on the release of 0.12 will be placing the approximately 13,000 combinators required to actually make this memory functional. :lol:
Ha ha :D :lol: :shock: 13000! Wow - good luck with that! I'll see you in a few years when you're done!

Re: Factorio Computer

Posted: Thu Jul 16, 2015 4:59 am
by Gouada
Wow!
That is so inspiring Lupoviridae!!!
I consider myself "computer smart" but this doesn't make much sense to me... Where did you learn how to make this?

Re: Factorio Computer

Posted: Thu Jul 16, 2015 7:42 am
by vampiricdust
Jonathan88 wrote:
Lupoviridae wrote:On a side note, my first task on the release of 0.12 will be placing the approximately 13,000 combinators required to actually make this memory functional. :lol:
Ha ha :D :lol: :shock: 13000! Wow - good luck with that! I'll see you in a few years when you're done!
Blueprints for the win!

I wonder if they posted the ingredients for the combinators anywhere? Doubt it'll be much, but probably some green circuits will be heavily used.

Re: Factorio Computer

Posted: Thu Jul 16, 2015 2:59 pm
by Lupoviridae
Gouada wrote:Wow!
That is so inspiring Lupoviridae!!!
I consider myself "computer smart" but this doesn't make much sense to me... Where did you learn how to make this?
Thanks! It's all self-taught. I started off learning the logic gate layout for NAND and NOR flash memory, and adapted it to combinators.
Each memory "bit" is composed of 6 combinators.

2 Address controllers; that disallow reading and writing when the cell is not being addressed
2 tri-state buffers; that control reading/writing, disconnecting the bit from the data bus when the address controllers are not active
1 memory cell; that stores the binary 1 or 0
1 write buffer; since the memory cell uses R>G;R (if red is > green, output red), a write signal (green) drains the memory cell. The buffer is an arithmetic R*2, allowing the cell to actually be written with a 1.

Also including a light with each bit, to tell its status at a glance. :)

Re: Factorio Computer

Posted: Thu Jul 16, 2015 5:29 pm
by Phillip_Lynx
do you think you can make a Game of Life with this?

Re: Factorio Computer

Posted: Thu Jul 16, 2015 6:13 pm
by ratchetfreak
You don't even need combinators for GoL

tricky part is the timing