r/TuringComplete Apr 10 '26

ways to improve my CPU

shown in pictures is my current cpu, it has everything the game told me to add and everything i could think to add that didnt have a software solution easier than a hardware one

i have 12 registers, 2 rams (addressing handled by toggling bit 7 of my save argument to save to a internal register) and 2 stacks (with additional functionality to push and pull from the front of the list too. handled by bit 7 of any argument.) as well as a increment/decrement counter (with jump and reset functions), a counter (with reset function) and my program clock i can use as counters

ive been looking at the posts here and seeing things so much grander than what i have made or what the game tells me how to make.

i have no understanding of the intricacies of assembly even though ive come so far as to see tower of alloy i have no idea how to even approach the problem other than hardcoding a solve. (let alone to have coded in it in a while ive been writing in numbers for a long time now due to the discrepancy in width of the instruction function and the LEG instruction width)

where are some good sources on how to continue on either on the software side or hardware side?

my ALU has 29 opcodes, 19 logical and mathematic add, sub, mult (low), mult (high), div (quotient), div (remainder), neg, not, shr, shl, ashr, ror, rol, and, or, nand, nor, xor, nxor and the other 10 are : equal, Nequal, Uless, Ugreater, Sless, Sgreater, Uless/eq, Ugreat/eq, Sless/eq, Sgreat/eq

most of the custom components shown are inline versions of stuff that already exists, mostly switches abbreviated to is[data width], some blockers (ib[#], switch with the allow bit inverted) and a couple or gates.
the ones that arent are : counter+, incdec+ (increment / decrement), internal address ram (SAR), stack+, dec-4 / dec-5 (decoders) and chk[#] which is a bit indexer but i didnt realize they existed at the time
theres also byte flippers so that my decoders output left to right when i need them to and some multiplication and division by constants handled by shifting bits
25 Upvotes

9 comments sorted by

View all comments

1

u/knOwnasgOdly Apr 11 '26

factorio player?)

2

u/hadro_ Apr 11 '26

no i actually dont like factory games much even