PowerProcess
Information regarding the computer⌗
This computer is old, so I cannot guarantee that all this information is current.
You can get the computer on the Steam workshop.
I gave the computer 16 registers of 16 bits (rReg 0-15) and 2 registers of 1 bit (cReg 0/1).
Register mapping⌗
0000 - 1101: general use
1110: stack pointer (starts at 1111111111111111)
1111: execution pointer
How the computer works⌗
IF data is read from memory using exec pointer as address; exec pointer is automatically incremented.
The computer has a 16-bit AU that can apply an operation from any register onto any other register.
AU operations are listed in the spreadsheet.
AU is provided with two values, the set reg and the read reg. The AU has access to both regs’ values, but can only set the value of the set reg. The AU will save carry output into cReg1. Entries with no mention of carry do not support carry, and simply reset cReg1 to 0 after being run.
The computer also has a 16-bit LU that can compare two registers or calculate the properties of a single register storing it in the first carry register.
Instruction structure⌗
Commands are structured in sets of 16 bits
[8 bits command] [4 bits sReg] [4 bits rReg]
Here is the spreadsheet with all the commands and their respective microcode.
Important⌗
It may at first seem as though there is no return command to pair with the call command, and this is the case, the exact functionality can simply be replicated by the following command: 0000011111110000 This is a simple stack pull command, but in this case, it will be pulling into 1111 (execution pointer) reg
At the heart of the PowerProcess computer is the command decoder. It takes in each command and identifies which of the 256 possible commands it is. It must then execute a precise sequence of microcode. Microcode is the internal processor tasks such as incrementing the execution pointer, setting a register, sending a memory request, setting bus sources, etc.
The microcode necessary to make the PowerProcess computer work is as follows:
- Increment execution pointer
- Increment stack pointer
- Decrement stack pointer
- Write cReg0
- Write cReg1
- Set S register (setreg)
- Toggle pipe AU output to S reg 16b red
- Toggle pipe R reg output to memory address 16b yellow
- Toggle pipe S reg output to memory data 16b green
- Toggle pipe execution pointer output to memory address 16b cyan
- Toggle pipe stack pointer output to memory address 16b blue
- Toggle pipe memory data output to S reg 16b brown
- Toggle pipe LU output to cReg0 1b pink
- Toggle pipe AU output to cReg1 1b black
- Toggle pipe cReg0 output to cReg1 1b white
- Toggle pipe cReg1 output to cReg0 1b also white
- Toggle pipe R reg output to S reg 16b purple
- Toggle pipe cReg1 to AU 1b dark blue
- Toggle pipe user input to S reg 16b dark green
- Push UI value (always pulls from R reg)
- Memory read
- Memory write
- Toggle user pause
- Toggle error light
- Run boot sequence
- Stop
- Set command register (from memory data out)
Run boot sequence will do the following:
- Iterate over each register (0000-1111) and trigger a write with nothing in the data set input
- Every write, also push an empty string to IO
- Decrement stack pointer
- IF error light is on, toggle it
- IF user pause is on, toggle it
- Start ROM read
Clock start microcode:
- Toggle pipe execution pointer output to memory address (cyan)
- Memory read and await
- Toggle pipe execution pointer output to memory address, set command register, increment execution pointer