Actions

Difference between revisions of "Block mappings"

From Sonic Retro

(Format: Added a better bit description)
(Redirected page to sega:Block mappings)
 
(7 intermediate revisions by 5 users not shown)
Line 1: Line 1:
'''Block mappings''' are used to arrange large amounts of 8x8 tiles into larger tiles (16x16, followed by 128x128 or 256x256). These larger tiles are then arranged into the level layout.
+
#REDIRECT [[sega:Block mappings]]
 
 
==16x16 tiles==
 
===Games===
 
*[[Sonic 1|Sonic the Hedgehog]]
 
*[[Sonic the Hedgehog 2]]
 
*[[Sonic 3 & Knuckles]]
 
*[[Sonic CD]]
 
*[[Sonic Crackers]]
 
 
 
===Format===
 
16x16 tiles consist of four [[Cell|8x8 tiles]], arranged in the shape:
 
{| class="prettytable"
 
| width="40px" align="center" | 0
 
| width="40px" align="center" | 1
 
|-
 
| width="40px" align="center" | 2
 
| width="40px" align="center" | 3
 
|}
 
 
 
Each 8x8 tile is represented by one word, which like all SEGA Genesis VDP pattern indices, is a bitmask of the form PCCY XAAA AAAA AAAA. P is the priority flag, CC is the palette line to use, X and Y indicate that the sprite should be flipped horizontally and vertically respectively, and AAA AAAA AAAA is the actual tile index, i.e. the VRAM offset of the pattern divided by $20.
 
 
 
==128x128 tiles==
 
===Games===
 
*[[Sonic the Hedgehog 2]]
 
*[[Sonic 3 & Knuckles]]
 
*[[Sonic Crackers]]
 
 
 
===Format===
 
128x128 tiles consist of sixty-four 16x16 tiles.
 
 
 
SSSS YXII IIII IIII
 
S=Solidity, Y=flipY, X=flipX, I=Index
 
 
 
Each 16x16 tile has a two-byte value with the format '''XYYY''', where '''YYY''' is the index number of the 16x16 tile to be displayed, and''' X''' is the [[solidity]] of the tile. These are possible values for''' X''':
 
=======================
 
value high low
 
=======================
 
0 not not
 
1 not top
 
2 not l/r
 
3 not all
 
4 top not
 
5 top top
 
6 top l/r
 
7 top all
 
8 l/r not
 
9 l/r top
 
A l/r l/r
 
B l/r all
 
C all not
 
D all top
 
E all l/r
 
F all all
 
Additionally, add the following values to '''YYY''' to change the display mode of the 16x16 tile:
 
400 flip x
 
800 flip y
 
C00 flip x+y
 
 
 
==256x256 tiles==
 
===Games===
 
*[[Sonic 1|Sonic the Hedgehog]]
 
*[[Sonic CD]]
 
 
 
===Format===
 
Similar to 128x128 tiles. Values for '''X''' are:
 
================
 
value solid
 
================
 
0 not
 
2 top
 
4 l/r
 
6 all
 
8 not
 
A top
 
C l/r
 
E all
 
Add the following values to '''XYYY''' to change the display mode:
 
0800 flip x
 
1000 flip y
 
1800 flip x+y
 
 
 
[[Category:Data Formats]]
 

Latest revision as of 02:04, 1 April 2010