Difference between revisions of "Block mappings"

From Sega Retro

(Added page. I'll finish it later.)
 
Line 4: Line 4:
 
==16x16 tiles==
 
==16x16 tiles==
 
===Games===
 
===Games===
*[[Sonic the Hedgehog]]
+
*[[Sonic 1|Sonic the Hedgehog]]
 
*[[Sonic the Hedgehog 2]]
 
*[[Sonic the Hedgehog 2]]
 
*[[Sonic 3 & Knuckles]]
 
*[[Sonic 3 & Knuckles]]
Line 11: Line 11:
  
 
===Format===
 
===Format===
Each 8x8 tile in the 16x16 block mappings has a two-[[byte]] value in the format '''XYYY''', where '''YYY''' is the number of the tile to be loaded from the [[VRAM]], and '''X''' is the display method for the tile. These are all the possible values for '''X''':
+
16x16 tiles consist of four 8x8 tiles. Each 8x8 tile in the 16x16 block mappings has a two-[[byte]] value in the format '''XYYY''', where '''YYY''' is the number of the tile to be loaded from the [[VRAM]], and '''X''' is the display method for the tile. These are all the possible values for '''X''':
 
  ===================================
 
  ===================================
 
  value pallet orientation
 
  value pallet orientation
Line 38: Line 38:
 
*[[Sonic Crackers]]
 
*[[Sonic Crackers]]
  
 +
===Format===
 +
128x128 tiles consist of sixty-four 16x16 tiles. 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:Hacking Information]]
 
[[Category:Hacking Information]]

Revision as of 20:26, 13 December 2004

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.

16x16 tiles

Games

Format

16x16 tiles consist of four 8x8 tiles. Each 8x8 tile in the 16x16 block mappings has a two-byte value in the format XYYY, where YYY is the number of the tile to be loaded from the VRAM, and X is the display method for the tile. These are all the possible values for X:

===================================
value	pallet	orientation
===================================
0	1	normal
1	1	y
2	2	normal
3	2	y
4	3	normal
5	3	y
6	4	normal
7	4	y
8	1	normal
9	1	x
A	2	normal
B	2	x
C	3	normal
D	3	x
E	4	normal
F	4	x

128x128 tiles

Games

Format

128x128 tiles consist of sixty-four 16x16 tiles. 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

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