Puyo Puyo Tsu/Memory Mappings

From Puyo Nexus Wiki
Jump to: navigation, search

Puyo Puyo Tsu stores all information related to the current game into memory (RAM), while the system is running. This is lost every time the system is powered off, but is actually where the magic happens: that's where your puyos get stored as you place them on your board, and that's where the upcoming pairs are stored as well, after being generated through an obscure algorithm.

The memory mappings of game structures in RAM are the same between arcade and console versions of the game.

Game state overview

An overview of a running game looks like this:

Puyo Puyo Tsu in-memory game state

Main memory locations

Here are the main locations regarding puyo storage and their generation in the game (offsets are applicable to both genesis and C-2 versions):

Address range / offset Size Description
0xFF8000 - 0xFF80A7 168 bytes board (player 1)
0xFF8800 - 0xFF88A7 168 bytes board (player 2)
0xFF85A0 6 bytes P1 upcoming pairs (the two displayed on screen + one after that)
0xFF8DA0 6 bytes P2 upcoming pairs
0xFFAD00 256 bytes randomized pool of upcoming pairs (128 pairs), usually 3-color set (difficulty levels 1-2)
0xFFAE00 256 bytes randomized pool of upcoming pairs (128 pairs), usually 4-color set (difficulty level 3)
0xFFAF00 256 bytes randomized pool of upcoming pairs (128 pairs), usually 5-color set (difficulty levels 4-5)
0xFFD080 variable multiple chunks of 64 bytes representing part of the current game's state, including the currently falling pair
0xFFA134 4 bytes 4-byte value that is the last generated random number
0xFFA4E2 8 bytes color-set to be used in the game