|
webhosting |
| SONIC COMPILATION ROM HACKING |
Written by Leon "Hivebrain" White.
ROM Contents:
0 Header, Sonic 2 ROM 100000 Dr. Robotnik's Mean Bean Machine ROM 200000 Sonic 1 ROM 280000 Sonic Compilation ROM 2805C8 ASCII text - "Dr Robotnik's" 2805DE ASCII text - "Sonic the Hedgehog" 2805F4 ASCII text - "Sonic the Hedgehog 2" 28060A Code 280616 ASCII text - "Select cursor/game" 280682 Code 280794 ASCII text - region error message 280830 Code 2814CA Pallete - red, green and blue (only those 3 colours) 2814D0 Palletes (4) - entirely black 281550 Palletes (4) - entirely white 2815D0 Code 282760 Pallete - region error message 282780 Code 282D5C Pallete - Sega logo 282D7C Pallete - Sega logo 282D9C Code 282DBA Nemesis Compressed Art - Sega logo 283124 Code 2837E0 Nemesis Compressed Art - small yellow text 283CBE Nemesis Compressed Art - yellow text with shaded background (unused) 284252 Uncompressed Art - letters from Dr Robotnik's MBM high score entry 286652 Pallete - yellow text and blue background 286672 Pallete - Dr Robotnik's image #1 286692 Pallete - Sonic 1 image #1 2866B2 Pallete - Sonic 2 image #1 2866D2 Pallete - unknown 2866F2 Pallete - Dr Robotnik's image #2 286712 Pallete - Sonic 1 image # 2 286732 Pallete - Sonic 2 image # 2 286752 Pallete - Dr Robotnik's image # 3 286772 Pallete - Sonic 1 image # 3 286792 Pallete - Sonic 2 image # 3 2867B2 Mappings - blue background 2869E2 Mappings - "Press Start Button" 286A2A Mappings - "Game Select" 286A56 Mappings - Dr Robotnik's image 286B46 Mappings - Sonic 1 image 286C36 Mappings - Sonic 2 image 286D26 Nemesis Compressed Art - images and large text from game select screen 287E84 Empty (filled with FFs) to end of ROM Palletes:
Megadrive colour palletes are usually 16 colours long, each colour is represented by two bytes in the format 0B GR, where B = blue; G = green; and R = red. The B, G and R can be any of the following values:
0 = 0
2 = 32
4 = 64
6 = 96
8 = 128
A = 160
C = 192
E = 224
(and in rare cases, F = 224)There are a few palletes in the ROM whose purpose are unclear. Such as the group of palletes starting at address 2814CA which don't seem to do anything, and another at address 2866D2 pictured here:
Mappings:
Each image on the game select screen is made up of 8x8 pixel tiles. The way these tiles are arranged is called mappings. Here are all the available tiles from the VRAM:
Each 8x8 tile is given a two-byte value (see column of numbers on the left), so that the word "Press" would be:
0101 0102 0103 0104 0104 010B 010C 010D 010E 010E
The blue background is made up entirely of tile 0100. The tile is also flipped horizontally, vertically or both. To do this with any given tile, add 0800 (flip horizontally), 1000 (flip vertically) or 1800 (flip both ways) to the tile's value. In the case of the blue background, this gives an equal mix of 0100, 0900, 1100 and 1900.
Game Select Pointers:
Pointer address Address it points to Game it points to 2801BC 100200 Dr Robotnik's 2801C2 1007B4 2801C8 10054E 2801D4 200200 Sonic 1 2801DA 2010DA 2801E0 200AC4 2801EC 206 Sonic 2 2801F2 F1C 2801F8 3CE
These triplets of pointers determine which game you start playing when you select a game on the game select menu. The pointer triplets are all interchangeable, so you could make it so when you select Sonic 1 on the game select menu, you start playing Sonic 2 instead. To clarify, these are the changes you'd need to make:
At address 2801D4, change 0020 0200 to 0000 0206
At address 2801DA, change 0020 10DA to 0000 0F1C
At address 2801E0, change 0020 0AC4 to 0000 03CEAlso, you can use a similar method to completely skip the game select menu, and go directly to any of the three games as soon as you start playing the ROM. To do this, you need to copy the header from another ROM (i.e. the one you want to play in Sonic Compilation) and paste it over the normal Sonic Compilation header. The new header should contain three pointers, which you need to alter to match the pointers listed in the above table. You only need to copy and paste the first 0x100 bytes of the header.
Unused Shaded Text:
Located at address 283CBE is a piece of compressed art which appears not to be used anywhere in the game. The art is identical to the yellow alphabet used on the region error screen and game select menu, except it has a shaded background:
Normal text Unused shaded text By changing a pointer, I made the unused text appear instead of the normal text.