Table 2: OAM state flags |
Byte | Content |
---|---|
0
|
Lower 8 bit of X location
|
1
|
Y location
|
2
|
Tile address
|
3
|
Vertical/ Horizontal flip, priority,
palette, and name table select
|
Bit | Content |
---|---|
7
|
Vertical flip flag
If this is true, the sprite graphic will be flipped vertically. |
6
|
Horizontal flip flag
If this is true, the sprite graphic will be flipped horizontally. |
4-5
|
Sprite priority
The variable $02 (depth) affects to sprites with the same priority. The sprite priority of OAM directly defines the rendering order of the BG layers and the sprite layers. Normally, priority 2 is used but when drawing at the same layer as the player character, set 3. |
1-3
|
Palette select
Specify index of CGRAM palette for sprite. 16 colors from CGRAM $100 + (p << 5) will be assigned to the sprite (p is the value of these 3 bits). This value is assigned automatically when sprites are rendered. |
0
|
Name table select
Specifies which of two character tables existing in the VRAM to use. This value is assigned automatically when sprites are rendered. |
Mode | Number of colors of each layer | Order (front -> back) |
---|---|---|
0
|
4 colors each
|
3AB2ab1CD0cd
|
1
|
16 colors for BG1, 2. 4 colors for BG3. BG4
is not available.
|
3AB2ab1C0c
C3AB2ab10c |
2
|
16 colors for BG1, 2. BG3, 4 are not
available.
|
3A2B1a0b
|
3
|
256 colors for BG1. 16 colors for BG2. BG3,
4 are not available.
|
3A2B1a0b
|
4
|
256 colors for BG1. 4 colors for BG2. BG3, 4
are not available.
|
3A2B1a0b
|
5
|
16 colors for BG1. 4 colors for BG2. BG3, 4
are not available.
|
3A2B1a0b
|
6
|
16 colors for BG1. BG2, 3, 4 are not
available.
|
3A21a0
|
7
|
256 colors for BG1. BG2, 3, 4 are not
available.
Zoom and rotate functions are available. |
321a0
|
7 Extend BG
|
256 colors for BG1. 128 colors for BG2. BG3,
4 are not available.
Zoom and rotate functions are available. Character data and tilemap are common to the BG1 and BG2. |
32B1a0b
|