Sonic the Hedgehog CD (prototype 510)/MMD Breakdown
From Sonic Retro
(Redirected from SCHG:Sonic CD 510 Beta/MMD Breakdown)
|SCHG: Sonic CD 510 Beta|
The MMD header is always at $200000. However, code may be loaded and run from RAM, so any code in an MMD past $100 should be considered running from the offset pointed to at ($2).l
The MMD header consists of the following:
|$2||Long||RAM location for RAM run code (Optional)|
|$6||Word||Size of code to be loaded to RAM (Optional)|
|$8||Long||Code entry point|
|$C||Long||Horizontal Interrupt Location (Optional)|
|$10||Long||Vertical Interrupt Location (Optional)|
The object layout of a level MMD starts at 7320. The object positioning of an object is formatted as follows:
XXXX YYYY OOSS FFFF
I think this is the same type of positioning as S1. XXXX is 2 bytes long, and is the X location of the object. YYYY is 2 bytes long as well, and is the Y location of the object. OO is a byte long, and is the primary object type. SS is also a byte long, and is the object's subtype. An object's subtype is a value that is used to determine what type of one object it is. For example, take the Orbinaut from LZ in S1. If you changed its subtype to a certain value, it would never fire its spikes like the Orbinaut in SLZ.
The level layout of a level MMD begins at 3AB76. It's basically an array of tile values. An array is just a huge collection of data, to put it simply. The values go left to right for one row, and then after that row is cleared go to the next row. Let's say I wanted to make the following level layout.
00 00 00 00
00 00 00 12
09 09 11 10
Pretend that the 09 is normal ground, 10 is deeper ground, 11 is the first part of a slope going up, and 12 is the second part of a slope going up. This would appear in a grid of tiles as:
This would appear in hex as 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 12 09 09 09 09 09 09 11 10. I hope that you understood this section.
The palettes are in the same format as the Mega Drive; 0BGR. For example, 068A would be blue to 6 lightness, green to 8 lightness, and red to A lightness. Note that the colors can only be in increments of two.
So color 066C would be blue to 6 lightness, green to 6 lightness, and red to C lightness. This would make THIS COLOR. Hopefully you understand this.
These are the palette locations in the level MMDs:
|$5D0||Sonic 1 Palette (line 1)|
|$5F0||Sonic 1 Palette (line 2)|
|$610||Sonic 1 Palette (line 3)|
|$630||Sonic 1 Palette (line 4)|
|$650||Sonic 1 level select Palette (line 1)|
|$670||Sonic 1 level select Palette (line 2)|
|$690||Sonic 1 level select Palette (line 3)|
|$6B0||Sonic 1 level select Palette (line 4)|
|$6F0||Zone Palette (line 1)|
|$710||Zone Palette (line 2)|
|$730||Zone Palette (line 3)|
|$750||Mirror of Zone Palette (line 1)|
|$770||Mirror of Zone Palette (line 2)|
|$790||Cycling Palette of Level|
|$EDE4||Amy's Palette (used to substitute zone palette line 1)|