YXPPCCCT format

From SMWiki

Jump to: navigation, search

The YXPPCCCT format (not to be confused with the YXPCCCTT format) is used to store sprite tilemap properites. The information is stored in binary and makes up a single byte.

76543210
YXPPCCCT

X  : X flip
Y  : Y flip
PP : Priority 
CCC: Palette 
T  : Bit 8 of tile number

To change tilemap properties stored in YXPPCCCT format, one must convert the hex value into binary. This is usually done with the aid of the computer's calculator. For instance, the value 45 in hex becomes 01000101. Broken down, this becomes:

0 | 1 | 00 | 010 | 1 
Y | X | PP | CCC | T

The "1" for X means that the tile is flipped horizontally.

The "0" for Y means that the tile is not flipped vertically.

The "00" for PP means that the tile does not take priority. (If two tiles are occupying the same space, this one will appear beneath one that has priority). Note that is ONLY priority relative to BG's, NOT other sprites which takes priority based on order in OAM.

The "010" for CCC means that the tile uses yellow palette A. The values for palettes are as follows:

  • 000 - Palette 8 (Mario)
  • 001 - Palette 9 (Grey)
  • 010 - Palette A (Yellow)
  • 011 - Palette B (Blue)
  • 100 - Palette C (Red)
  • 101 - Palette D (Green)
  • 110 - Palette E
  • 111 - Palette F

The "1" for T means that the tile is on the second graphics page (While 0 would put it on the first graphics page)

Once changes are made to the binary bits, they must be converted back into a single hex byte for SMW to be able to read it.

Personal tools