Difference between revisions of "Plane mappings"
From Sega Retro
Scarred Sun (talk | contribs) m (3 revisions) |
m (Text replace - "Category:Data Formats" to "Category:Data formats") |
||
Line 5: | Line 5: | ||
Plane maps are generally compressed using the [[Enigma compression|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 (titled TilemapToVRAM in the SVN ''[[Sonic the Hedgehog (16-bit)|Sonic the Hedgehog]]'' [[Disassemblies|disassembly]]), which takes as parameters the number of rows and columns in the map, and adjusts the transfer accordingly. | Plane maps are generally compressed using the [[Enigma compression|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 (titled TilemapToVRAM in the SVN ''[[Sonic the Hedgehog (16-bit)|Sonic the Hedgehog]]'' [[Disassemblies|disassembly]]), which takes as parameters the number of rows and columns in the map, and adjusts the transfer accordingly. | ||
− | [[Category:Data | + | [[Category:Data formats]] |
Revision as of 19:21, 4 June 2014
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 (titled TilemapToVRAM in the SVN Sonic the Hedgehog disassembly), which takes as parameters the number of rows and columns in the map, and adjusts the transfer accordingly.