IPB

Welcome Guest ( Log In | Register )


 

Recent Changes | Random | Help | Special Pages | Upload
home | info | forums | svn | irc | podcast | about

We've managed to restore 99% of our file loss earlier in the year, but it's now THE FINAL COUNTDOWN. Visit the wiki file request topic to help make Sonic Retro better than ever.

Plane mappings

From Sonic Retro

(Redirected from Plane map)

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.