Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time
November 3, 2022 19:57
February 6, 2023 15:05
October 22, 2022 13:14
November 3, 2022 20:03
May 22, 2022 10:32
November 3, 2022 20:09
October 23, 2022 23:00



Getting Started

TetrisGYM is a practise mod for NES Tetris.

While originally based on the NTSC version of the game, the patched ROM supports PAL and NTSC gameplay types.

TetrisGYM is distributed in the form of a BPS patch and can be applied to the USA version of the game with Rom PatcherJS or similar.

File SHA-1: 77747840541BFC62A28A5957692A98C550BD6B2B
File CRC32: 6D72C53A
ROM SHA-1: FD9079CB5E8479EB06D93C2AE5175BFCE871746A
ROM CRC32: 1394F57E

A link to the BPS can be found on the releases page.

There is also a CNROM.bps patch for mapper 3 support. (The original ROM uses MMC1/mapper 1)


Some trainers have additional configuration values; use left and right in the main menu to change them.

Like in the original ROM, holding a b select and then pressing start will end gameplay and return to the menu screens.



Same gameplay as A-Type, with some improvements: no score cap, no rocket, no curtain, no music, always next box, better pause, start on any level.



Spawn T-Spins in random positions. Additional entry delay on successful T-Spin to prepare for the next state.


Provides same piece sets for VS battles (or practise).

Press select to generate a random seed.

A small number of seeds are different between v4 and v5, but otherwise both versions are compatible.

An indicator will show which seeds are for v4 and which are for v5, and pressing select will always generate a v4 compatible seed.



An experiment in highlighting areas of the playfield.



Indicates how close you are to achieving a score by 230 lines. Loosely based on Tetris rate.

You can choose scores up to and including 1.5m in increments of 100k.

This can be adjusted for transition or PAL games;

value score at 130 lines
4 201261
5 252936
6 300278
7 353015
8 400356
9 452031
A 508690
B 552131
C 600535
D 655460
E 706051
F 752310



Several preset playfields for practising different types of tucks and spins.

  1. Z
  2. T / S
  3. T
  4. I
  5. Buco
  6. Various
  7. L / J Spintuck
  8. L / J Doubletuck



Same gameplay as B-Type in the original, except heights up to 8 are supported.



Fill in the floor to a certain height to force higher stacking. This mode is often referred to as 'handicap'.

Setting the height to zero will result in a game mode with burns disabled.



For practising tapping and quicktapping pieces over towers. 0-G will have a tower on the left of the screen and H-W will have a tower to the right.

Tap Quantity

Tap Quantity

A trainer to drill different numbers of taps. Highlights the next well coming up.

The options 0-F clear lines when you fill the well, and G-V act like the piece locks without a line clear.



Similar to B-Type, except the garbage is a checkerboard.

Uses custom scoring.



Puts you ten lines before transition. The value given will be added to your score, so set this to 5 and start on level 18 for a 'maxout trainer' style mode.

Setting the value to G causes the mode to act identical to the game genie code SXTOKL



Different styles of garbage to dig through.

  1. Always Tetris Ready - Pushes blocks to force tetris readiness
  2. Normal Garbage - Random amounts of garbage
  3. Smart Garbage - Follows your well
  4. Hard Garbage - Brutal random garbage
  5. Infinite Dig Generator - Scrambles the bottom of your stack


Create artificially inflated droughts. Increasing the value causes less I pieces.

0 = normal gameplay I = no line pieces

DAS Delay

Change the auto-shift delay rate.

Double Killscreen

The pieces fall by two blocks every frame. It's hard.

The value multiplied by ten is the number of lines to transition from normal killscreen.

The value controls the transition from normal killscreen (a value of x transitions at 10*x lines)



Blocks are invisible until the end of the game.

Hard Drop

Hard Drop

Press up to hard drop and select to soft drop.

Level Menu

Retains the functionality of the original level menu, except;

Press select when choosing a level to show 'READY' text


Press right when on 9 to choose any level to start on with up and down.

Any Level

Press down when on 5-9 to select hearts to display with left and right.

Hearts Ingame Hearts

Used for keeping track of wins in local games.


Shows scores up to 8 digits, and includes lines and start level.

Name entry has better controls and some added characters.

If SRAM is available, scores will be saved and show again the next time the game boots.

To clear the highscores, select hearts and press down. Then confirm the prompts by pressing start.

Tap/Roll Speed Tester

Speed Test

Practise tapping rate outside of gameplay.


The scoring modes only affect the display ingame, and your real score will be displayed in the high score list.

The scoring code is a complete reimplementation, and is not vulnerable to the game crash that the original causes.

In every mode except Classic, at 1000 lines an extra digit is added to the lines counter.



Behaves like the original uncapped scores, with digits A-F used for a rollover at 1.6 million.

After 100 million the score will jump by 800k, so you may want to use another mode if you plan on getting higher than that. (Your actual score will still display correctly in the high scores list.)



Show 0-9, then A-Z, then wrap.

7 Digit

7 Digit

An extra scoring digit, rolls over at 10 million.



Shows your score in millions, rolls over at 100 million.



Cap your score at 999999.

Hz Display

Hz Display

Shows the average tapping rate for each tap in a burst.

Also shows frames between spawn and first tap, and current tap direction.

Input Display


Disable Flash

Disable the flashing from when you get a tetris.

Disable Pause

Disable the ability to pause the game.

Goofy Foot

Flips A/B, Start/Select, and inverts DPad directions like a Goofy Foot controller.

Block Tool


Allow more fine control over aspects of gameplay.

This is a config option only, and will enable the block tool globally.

When enabled, press start to use the editors.

Level Editor

  • DPad
    Move around
  • Select + Left/Right
    Switch between piece and playfield editors

In piece mode

  • A / B
    Change the current piece
  • A + B
    Change the next piece

In playfield mode

  • A
    Draw block at cursor
  • B
    Delete block at cursor


When paused

  • Select + Up
    Increment save slot
  • Select + Down
    Decrement save slot
  • Select + A
    Save state
  • Select + B
    Load state

During gameplay

  • Select + B
    Load state

Savestates allow you to save and reload playfields as many times as you want. These configurations are stored on your cart, and will persist after poweroff.

Savestates require SRAM to work. Tested and working on Everdrive / Emulator / MiSTerFPGA.

Combined with the level editor, savestates are effective for practising specific scenarios.



A game-ending linecap can be enabled at any level or linecount.

The linecap effects are;

  • KSx2 - Pieces fall at two blocks every frame
  • Floor - A new unclearable row appears with each level change
  • Inviz - Pieces turn invisible
  • Halt - Pieces stop spawning

Used in the CTM Masters event.

DAS Only

Remove the ability to use tapping or rolling to move the pieces.

All DAS behaviours work as normal, including quicktaps and slowtapping.

Created for CTWC DAS 2022

Qual Mode



Reintroduces the 'wait screens', intended for use in qualifiers where the the player would otherwise gain a time advantage skipping the rocket, legal and title screens.

Also reintroduces other classic features like the end game curtain, standard pause, and no next box.

These features make TetrisGYM work better with post processing tools like NestrisChamps and MaxoutClub.

You can hold select when booting to start in Qual Mode.

You cannot use the Block Tool and Qual mode at the same time.

PAL Mode

Dictate if the NTSC or PAL gameplay mechanics should be used. Should automatically detect region, but can be manually overwritten otherwise.


To build, you need a copy of node and cc65 installed on your system.

Provide a clean.nes file of the unpatched ROM and run sh in a shell or build.bat on Windows.

CHR files are autogenerated from PNG on build, and nametables are generated via JS.

This project descends from the TAUS disassembly of NES Tetris and has been heavily modified. Large parts have been replaced, lots of optimisations, removal of unused code, non-game-mechanics related bugfixes, tooling, and different approaches to the disassembly work itself has taken place.