Yesterday, I watched Tetris, the latest Apple TV+ special (written by Noah Pink and directed by Jon S. Baird). I enjoyed it very much. Like the Rubik’s Cube, everyone knows Tetris (Тетрис, テトリス). This biopic is about the latter, of course.

But if all know the game, not everyone knows the entire story behind the planetary success. This thriller is an honest attempt to remedy such a gap. It certainly does justice to the game and the licensing war between Elorg, Andromeda Software, Nintendo, Bullet-Proof Software, and Mirrorsoft. It also puts the spotlight upon its original developer Alexey Leonidovich Pajitnov, unfortunately forgetting Vadim Gerasimov and Dmitry Pavlovsky. Indeed, all three met in the Soviet Academy of Sciences during 1984-1986 and co-developed Тетрис on Electronica 60, one of the many PDP-11 compatible CCCP-made computers.

You can see the original code running on a DVK-2 captured by Sergei Frolov. I am reproducing below a few pictures by Sergei for reference, and you can find way more in his excellent Soviet Digital Electronic Museum (here)

Well, forgetting two third of the developers is not the only error – or embellishment/simplification of the movie –, and like the goons in Jurassic Park who filled gaps in the dinos’ DNA with frog DNA – close enough –, the writers took some historical liberties with what happened. This creativity reaches its paroxysm with the KGB chasse sequence scene in Moscow. I will stop here; I won’t spoil it for you. Just watch it.

As expected for an Apple production, the movie is very well done and served remarkably by the actors. Among them, Taron Egerton as Henk Rogers, Nikita Efremov as Alexey Pajitnov, Igor Grabuzov as Valentin Trifonov, Oleg Stefan as Nikolai Belikov, or Toby Jones as Robert Stein.

But we are here to talk about computers and codes in flics. I suggest you read Tetris Story (here), a recollection by Vadim Gerasimov. What caught my ear in the movie is the many references to the programming language used to develop Tetris. Thanks to Vadim’s post, we know they used Pascal to write Tetris, and that’s reflected correctly in the movie throughout the scenes where we see code. Although assembly is mentioned in the film several times, a magic port of Tetris from Pascal to C is happening! Indeed, when Henk Rogers visits the Nintendo R&D labs in Seattle, he seamlessly loads a TETRIS.C file (under what looks like Turbo C on an IBM PS/2 running Windows 2.x), cross-compiles it for the Sharp LR35902 and uploads it to the Game Boy prototype. All this with 0 errors, 0 warnings, and 0 crashes. Hats off! Was it hard? Not the slightest bit. Just redefine ROWS and COLS symbols.

Here are a few videos you may find interesting. Enjoy!