Tetris (Game Boy)

Tetris, for Game Boy, is among the most played of its namesake. Nintendo, through the help of Henk Rogers, purchased the license from Elorg to package it with every new Game Boy system. (An exception was Japan, where the system did not come bundled with any games.) Because of this, many players of the Game Boy generation remain familar to this title, as it probably sold more than any other Tetris title so far. Having Tetris packaged with Game Boy may likewise have had something to do with Game Boy's success.

This was the first widely distributed Tetris game to feature 2-player battles with garbage using the link cable.

Details
Game Boy runs at 59.73 frames per second.


 * Soft drop: 1/3G
 * ARE: 2 frames (tetromino is invisible for first frame after it spawns)
 * ARE+line clear: 93 frames
 * DAS: ?

Speed levels: This table is located at 1B06h in the ROM; each entry is one less than the actual number of frames. For example, level 1, or 49 = 31h frames, is stored as 30h.

In Marathon (called A-TYPE), when the player line clear (startLevel * 10 + 10), the level advances by 1. After this, the level advances by 1 for every 10 lines

The "heart levels" (activated by holding Down+Start at the title screen) are as fast as the level plus 10, but unlike on the NES version, they don't improve the score.

The maximum Score is 999999.

Randomizer
It was intended that the randomizer reduces the chances of getting one and the same piece shape 3 times in a row. However, the randomizer works differently in practice. Pieces are numerated from 0 to 6, repectively from 000 to 110 in binary notation. The code uses a bitwise OR operation. This is an operation that takes 2 binary numbers to compute a new binary number. The result has a 1 at a certain digit if at least one of the 2 arguments has a 1 at the same digit. For example 1100 OR 1010 = 1110. The following happens:

Choose a random piece shape. Hand it out as next but one piece, if the bitwise OR of the locking piece, the preview piece, and the chosen piece differs from the locking piece. Otherwise ( locking OR preview OR chosen = locking ), choose another piece (can be the same as before). Accept it as the next but one piece if the condition is fulfilled this time. Otherwise, choose another piece and use it as the next but one piece (no matter if the condition is fulfilled or not).



Piece shapes containing many zeros in the bitwise notation are rejected more often. Let's say our preview piece is a L (000). Then, another L will be rejected in the condition no matter of the locking piece (XXX OR 000 OR 000 = XXX ). So the chance of getting 2 L pieces in a row is reduced significantly. As a result, piece shapes containing many zeros appear less frequent. The relative frequencies should be as follows:


 * L: 10.7 %
 * J, I, Z: 13.7 %
 * O, S, T: 16.1 %

Henk Rogers takes responsibility for this randomizer.