Tetris V4 (Edited from recent feedback)

cadenjb's picture
Build image: 
In-game name (NO VISITORS! Must be LEARNER rank or higher!): 
cadenjb
Builder name(s) and current ranks: 
cadenjb: [Builder]
Creation location: 
288 86 2602
Machine Features: 

INPUT:
All of the inputs go to the pink circuit. The clock button directly toggles the clock on and off with a toggle flip flop. Any player move (Left and right shift, clockcwise and counter clockwise rotation) go into the scheduling system. The scheduling system saves your inputs for when they need to be executed. If you do both contradictory inputs in the same clock cycle (left and right shift at the same time). then they both cancel out and the piece won't shift at all. The scheduling system decides when to execute moves because it goes in order. Fall -> Shift -> Rotate. However If you have Downfast enabled, then the scheduling system will only do fall repeatedly and will not allow you to do any player moves. One thing to note is if you try to do player moves while Downfast is on then it will save those moves for later when you turn downfast off and then execute them. One last thing is if you want to reset the game you can simply press the reset button and it will pause the clock, reset the piece, and then start clearing the screen when it will finally display the reset message letting you know the game is playable again.

MOVEMENT:
Once a move has been executed it can increment each pixels X Y coordinates accordingly. They also have to go through the positive/negative to make sure the pixel is moving the right direction. However Rotation is a lot more complicated. Rotation has to read from a ROM to know how to move each pixel individually dependent on what piece it is and what rotation it currently is in. Once the increments are made they go to the looping Cancel Carry Adders.

PIECE RENDERING:
Once the new coordinates for the pixels are saved they go to the decoders to decode their X and Y coordinates. And where they meet will write a pixel. I have four layers of this, one for each pixel. All four pixels get bussed into the same matrix.

LINE CLEARING:
When a piece receives the pulse to save onto the display because they collided while falling then they will turn into saved information as opposed to animated information. both of which go to the display but saved information; if it fills up an entire row then it will trigger a line clear by shifting all of the information above it down.

COLLISION DETECTION:
When animated data and saved data are on the same pixel together then the collision detection will send a pulse to the scheduling system to undo the move. The scheduling system saves the move specifically so it can do the opposite move incase it collides. And then a pulse is sent to the display to update the screen. Then it will spawn in a new random piece at the top which will also update the screen for which piece is next.

DISPLAY:
When the screen is updated because the piece successfully didn't collide, then it goes to my 4x4 ring pixel display

LOSE DETECTION:
If any data saves on the top layer then you lose. The lose signal is sent to the clock to pause the game and then the board gets cleared. Once the board is cleared then it will pick one of the four random lose messages to display on the screen.

SCORE:
When a line gets cleared the pulse gets sent to the scoring system which will keep count of how many pulses get sent to it. And it has a ROM to know how many points to give you based on how many pulses it receives. First it will check if your amount of points is greater than the highscore and if it is then it will save a new highscore. Then your points convert from binary to BCD using my vertical non sequential Double Dabble design. and then go into 6 segment displays to display your score and your highscore.

IF THE MACHINE FEATURES APPREARS TO BE A HUGE BLOCK OF NOT FORMATTED TEXT YOU CAN VIEW IT HERE:
https://pastebin.com/AER88y4S

How To Use: 

If the game is not currently reset, then press the reset button and wait for the reset message to appear on the screen. Then you can start the clock. You can then have the piece move by pressing a button to move it. If you press the button once, then it will move once. Wait for it to do that move until you press the button again. You can only do one rotation and one shift per clock cycle. If you try to do both rotations or both shifts it will either do one and then the other or it will cancel both of them out depending on when you do it. Either is essentially canceling it out. If the piece is above where you want it to land you can flick the Downfast lever where the piece will fall 3x as fast and not be able to shift or rotate. However if you tell it to shift or rotate while it's falling fast then it will do those moves as soon as you turn off down fast. If you are bored of playing go ahead and hit the reset button. That will stop the game and reset it. If you leave the game running eventually you'll lose which will also stop the game.

Request status: 
Approved