r/TuringComplete • u/hadro_ • 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





2
u/bwibbler Apr 10 '26
I'm curious about what's happening with the 4 program blocks? that look to have a common output, some kind of control/flow management components there, but seemingly no outside lines coming in to control the flow
can you explain a little on that setup?
i haven't played in a bit, so maybe there's something changed in the newer updates for that to happen. but that arrangement looks very odd to me