First functioning programmable computer!

This board is to show, discuss and archive useful combinator- and logic-creations.
Smart triggering, counters and sensors, useful circuitry, switching as an art :), computers.
Please provide if possible always a blueprint of your creation.
Post Reply
jade52blue
Burner Inserter
Burner Inserter
Posts: 6
Joined: Tue Oct 13, 2020 2:42 am
Contact:

First functioning programmable computer!

Post by jade52blue »

I made a computer that can run simple machine language instructions from an attached App ROM!
Screenshot of a frame of the SnowTest demo program for my G1 CPU.
Screenshot of a frame of the SnowTest demo program for my G1 CPU.
Snowfield Test.PNG (1.78 MiB) Viewed 1100 times
This is from my first test program, which generates some random noise and uses a d-pad of gates to navigate around it. (Takes about ~1 IRL minute to load, and only runs at about 10 seconds/frame)

I'm calling this "Generation 1." Basically every piece of this thing was a compromise and I really need to re-do all of them now that I have a better idea what i'm doing, but i wanted to get a full working system first before optimizing.

Stats:
1.2 Hz CPU with 9 supported instructions
40 units boot ROM memory (can extendably chain, though the wiring is a bit fussy)
10 units RAM (can extendably chain, though the wiring is a bit fussy)
GPU with 2 instructions and 100 units memory, 16x16 monochrome pixel memory in 4 screen pages (supports double buffering and single-instruction page copy)

All memory has 4 read channels, though the CPU only uses 1 (was debugging with the others). The CPU generates a system hash based on connected hardware and will only run App ROMs with that hash encoded in them, sending error code 99 otherwise.

I'm not sure if G1 is really malleable and parse-able enough for anyone to actually do anything interesting with - and the blueprint book is 4x larger than the max post character count. I'm going to upload it somewhere and link to it in a few minutes.

If you do want to mess with it, the components are modular and take a bit of work to get running currently:

You'll need to place one of each of the first set of components, and link the big power poles together. (link wall-surrounded poles to wall-surrounded poles, pipe to pipe, conveyor to conveyor). Then place one or more of the app roms and link them to the memory rail (wall surrounded), switch on the repair pack for just 1 app rom (the constant combinator inset in the wall ring) and hit the reset button.

NOTE1: 1u memory is technically 32bits, but since I can't address between bits and since bitshifting to the 2<<31 bit is nontrivially difficult I'm just referring to memory by units rather than bits/bytes

NOTE2: In all display areas I've swapped the color order from (Red, Green, Blue, Yellow, Magenta, Cyan, White) to (Blue, Green, Cyan, Red, Magenta, Yellow, White) to be consistent with the 3-bit BGR color
Last edited by jade52blue on Wed Oct 21, 2020 7:33 am, edited 2 times in total.

jade52blue
Burner Inserter
Burner Inserter
Posts: 6
Joined: Tue Oct 13, 2020 2:42 am
Contact:

Re: First functioning programmable computer!

Post by jade52blue »

Blueprint book is too large to fit in a post. The GPU by itself as a blueprint is also too large (its the biggest element)

Gonna try putting a link to google drive: https://drive.google.com/file/d/1rTwU2o ... ebBL5/view

Dunno if that works. Also, if all the totally magic numbers are too frustrating I made myself a user manual here: https://drive.google.com/file/d/1-dfDse ... rf8nE/view

jade52blue
Burner Inserter
Burner Inserter
Posts: 6
Joined: Tue Oct 13, 2020 2:42 am
Contact:

Re: First functioning programmable computer!

Post by jade52blue »

Thought I would add a little more detail on the CPU and GPU makeup.
CPU-Detail.png
CPU-Detail.png (320.81 KiB) Viewed 1080 times
The CPU has a control unit, some shared general use evaluators, an error handler (thats deeply coupled to the GPU so errors can be human-readably displayed), a collection of registers (that are theoretically extendable), and a chain of instruction bays (of which 6 are used, though memory R/W, Bus R/W and NOOP/Error are double up so there are 9 instructions in there)

The main hack of this CPU is that bottom left ALU_CMP_JMP instruction (instruction 90), which breaks down to:

Code: Select all

 ((Argument_A [Binary-ALU-Op-Code] Argument_B) [Comparator-Op-Code] Argument_C == 1) ? Code Pointer [=|+=] Argument_D : CodePointer++ 
GPU-Detail.png
GPU-Detail.png (605.84 KiB) Viewed 1080 times
The GPU is basically a bunch of highly specialized ram, and the whole bottom half is basically designed to implement the page-copy function as a 1-CPU-cycle call. There are 4 screen pages, any one of which can be rigged to the 16x16px display via DMA. The page copy command takes 2 source pages, each offset and wrapped via a specified X and Y coordinate with a pair of massive barrel shifters, then merges them with one of six methods (nothing - just clear, use source 1, use source 2, bitwise OR of both, bitwise AND of both, bitwise XOR of both)

Post Reply

Return to “Combinator Creations”