Cite as
alexsteb/tetris_disassembly
Original
https://github.com/alexsteb/tetris_disassembly
Pinned
alexsteb/tetris_disassembly @ b4bbceb3cc086121ab4fe9bf4dad6752fe956ec0
Accessed
2026-10-20
Licence
MIT
Credit
Disassembly and annotations by alexsteb.
Notes
Its README says it "Compiles 1:1 to the official Tetris (World) GB ROM"; the header it writes (mask ROM version $01, header check $0A, global check $16BF) is Rev 1's, and the cited routines sit at the same addresses in the ROM. Annotation is unfinished, so many routines are still named by address (func_2007, l_2509). Line numbers refer to main.asm and constants.asm.

Cited on

Claims (12)

The Rev 1 ROM carries the header the disassembly writes, and its bytes sum to the global checksum the disassembly gives, $16BF.main.asm L181–183Verified
Pressing Left or Right moves the piece at once and sets a counter to 23; each held frame counts it down, and at 0 the piece moves and the counter restarts at 9, so a held piece moves again 23 frames after the press and then every 9.main.asm L6342–6365Verified
A blocked shift leaves the counter at 1, so a piece held against a wall tries to move again on the next frame.main.asm L6373–6383Verified
With neither Left nor Right held, the counter goes back to 23, so a released direction keeps no charge.main.asm L6387–6392Code
The rotation and shift routine returns at once while no piece is falling, so the counter holds its value between pieces.main.asm L6273–6277Code
Holding Down doesn't stop a piece from shifting, and holding Left or Right with Down stops the soft drop.main.asm L5513–5517Verified
With Left held through a lock against the wall and on into the next piece, that piece first moved 8 frames after it appeared and then every 9.main.asm L6273–6277main.asm L6387–6400Verified
Gravity reloads a countdown from a table of 21 values, one per level index from 52 at index 0 down to 2 at index 20, and the piece falls a row when the countdown passes 0, so it falls every 53 frames at index 0 and every 3 at index 20.main.asm L4549–4559main.asm L5519–5540Verified
Holding Down while pressing Start on the title screen turns on hard mode, which adds 10 to the level index, up to 20.main.asm L4534–4547main.asm L823–828Verified
To pick a piece, the game reads the hardware divider DIV, reduces it modulo 7, and checks the result against the piece now spawning and the one after it; it reads again when the three type ids OR together to the spawning piece's, and takes the third read regardless.main.asm L5414–5417main.asm L5444–5479Code
If its three reads were independent and uniform, the routine would deal L 10.86% of the time and O 16.22%, with the others between, and 10.71% of pieces would repeat the one before.main.asm L5444–5479Verified
In 9,000 pieces dealt over 474 games on the original Game Boy, L came 10.84% of the time and O 16.74%, and 11.55% of pieces repeated the one before.main.asm L5444–5479Verified