Hello,
I do not understand the Megadrive's map format.
could some one direct me to a source of information that I can use or perhaps offer a quick explanation/example please?
Failing that does anyone know which Megadrive Emulator has available sourcecode?
Thanks.
Megadrive Maps
Moderator: BigEvilCorporation
-
- Very interested
- Posts: 484
- Joined: Sat Mar 05, 2011 11:11 pm
- Location: Berlin, Germany
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
It's just "standard" character mode graphics - each value in the map is not a pixel, it's an index into a table of tiles/characters. The tile itself defines a block of 8x8 pixels. So the map is a rectangle of these values - typically 64x32 or 64x64, of which 40x28 define a screen of 320x224 pixels (40x8)x(28x8). The map is larger than the display so you can scroll the display.
Each value is two bytes; the bits contain the index into the tiles, the color palette to use for the selected tile, two bits to specify flipping the tile horizontally and/or vertically, and a priority bit. If you are familiar with PC character modes, think of it like the character and attributes.
Each value is two bytes; the bits contain the index into the tiles, the color palette to use for the selected tile, two bits to specify flipping the tile horizontally and/or vertically, and a priority bit. If you are familiar with PC character modes, think of it like the character and attributes.
-
- Very interested
- Posts: 484
- Joined: Sat Mar 05, 2011 11:11 pm
- Location: Berlin, Germany
DOS character mode is a very good example. By redefining some characters (=tiles) it was possible to obtain interesting results even in text mode:
BTW a quick explanation of the tile system for Pacman can be found here:
http://aarongiles.com/mamemem/part3.html
With small variations, that's the same idea used in hundreds of arcade systems and consoles.
BTW a quick explanation of the tile system for Pacman can be found here:
http://aarongiles.com/mamemem/part3.html
With small variations, that's the same idea used in hundreds of arcade systems and consoles.