Difference between revisions of "Plane mappings"
From Sega Retro
old>Shobiz (Creating page) |
old>Shobiz m (+wikilink) |
||
Line 1: | Line 1: | ||
− | A '''plane map''', in [[Mega Drive]] games, describes how to arrange 8x8 tiles to form a plane. Its format is simple - one word per 8x8 tile to display, that word having the format PCCV HAAA AAAA AAAA, where P is the high priority flag, CC is the palette line to use, V and H are the vertical and horizontal flip flags, respectively, and AAA AAAA AAAA is the tile index of the 8x8 tile (i.e. VRAM location / $20). | + | A '''plane map''', in [[Mega Drive]] games, describes how to arrange 8x8 tiles to form a [[plane]]. Its format is simple - one word per 8x8 tile to display, that word having the format PCCV HAAA AAAA AAAA, where P is the high priority flag, CC is the palette line to use, V and H are the vertical and horizontal flip flags, respectively, and AAA AAAA AAAA is the tile index of the 8x8 tile (i.e. VRAM location / $20). |
Although the display area for Mega Drive [[Sonic]] games is usually 320x224, internally the [[VDP]] actually manages a playfield of size 512x256. Thus a plane map also contains information for tiles which are off the screen, and horizontal and vertical scrolling allow the game to choose which part of the playfield to display on-screen. | Although the display area for Mega Drive [[Sonic]] games is usually 320x224, internally the [[VDP]] actually manages a playfield of size 512x256. Thus a plane map also contains information for tiles which are off the screen, and horizontal and vertical scrolling allow the game to choose which part of the playfield to display on-screen. |
Revision as of 12:53, 1 September 2008
A plane map, in Mega Drive games, describes how to arrange 8x8 tiles to form a plane. Its format is simple - one word per 8x8 tile to display, that word having the format PCCV HAAA AAAA AAAA, where P is the high priority flag, CC is the palette line to use, V and H are the vertical and horizontal flip flags, respectively, and AAA AAAA AAAA is the tile index of the 8x8 tile (i.e. VRAM location / $20).
Although the display area for Mega Drive Sonic games is usually 320x224, internally the VDP actually manages a playfield of size 512x256. Thus a plane map also contains information for tiles which are off the screen, and horizontal and vertical scrolling allow the game to choose which part of the playfield to display on-screen.
Plane maps are generally compressed using the Enigma format, which was specifically designed for this purpose and thus has a very high compression ratio for such data. They are also usually transferred to VRAM using a special routine (incorrectly titled ShowVDPGraphics in Hivebrain's 2005 Sonic 1 disassembly), which takes as parameters the number of rows and columns in the map, and adjusts the transfer accordingly.