Actions

SCHG

Sonic the Hedgehog 2 (Master System)

From Sonic Retro

SCHG: Sonic 2 (Master System)
Main Article
Art Editing
Editing Art
Palettes
Uncompressed Art
Compressed
Level Editing
Editing Levels
Level Headers
32x32 MetaTiles
Level Layout
Object Editing
Editing Objects
Object Layout
Object Types
Music Editing
Editing Music
Driver Technical Info
Module Format


Contributors


ROM Contents

Offset Description
A4C-DEA Level select text (plain ASCII format)
E1C-E4B Level select level pointers
28F0 Pointers for title card mappings (16-bit, little endian)
2904-2FA7 Mappings for title cards & act results screens
55E5 Pointers for level headers (16-bit, little endian)
5635-585A Level headers
10000 Uncompressed art - Sonic
13800 Compressed Art - bubble (ALZ)
13930 Compressed Art - jumping pig enemy (GMZ)
13BD0 Compressed Art - small yellow numbers (unused)
13CF8 Compressed Art - spinning turtle enemy (SHZ/SEZ/CEZ)
14000 Uncompressed art - Sonic gliding (SHZ)
15E00 Uncompressed art - Sonic riding a minecart (UGZ/GMZ)
18000 Uncompressed art - Sonic runnning round a loop (ALZ/GHZ)
1BC00 Compressed Art - spinning wheel (CEZ)
1BE60 Compressed Art - block (CEZ)
1C000 Compressed Art - numbers, lives icon
1C2CA Compressed Art - collected ring sparkles
1C306 Compressed Art - invincibility sparkles
1C332 Compressed Art - explosion
1C462 Compressed Art - monitor (generic)
1C608 Uncompressed art - monitors (specific)
1CCC8 Compressed Art - rings (dropped when Sonic gets hit)
1CE98 Compressed Art - moving platform (GHZ)
1CF92 Compressed Art - glider (SHZ)
1D20E Uncompressed art - prison capsule
1DACE Uncompressed art - animals
1E0CE Compressed Art - cloud & tree from scrolling text on title cards
1E124 Uncompressed art - end of act signpost
1EDA4 Compressed Art - minecart (UGZ/GMZ)
1EE48 Uncompressed art - minecart wheel (UGZ/GMZ)
1EEC8 Compressed Art - minecart wheel (UGZ/GMZ)
1F040 Compressed Art - broken minecart (UGZ/GMZ)
1F0EA Uncompressed art - Silver Sonic (SEZ)
1F96A Compressed Art - log (SHZ)
1F9B4 Compressed Art - moving platform (SHZ)
1FAB4 Empty
20000 Compressed Art - circle & floor from intro sequence
206A0 Compressed Art - beta title screen (unused)
213B0 32x32 mappings - intro sequence
216E0 32x32 mappings - title screen
21A32 Level layout - intro sequence (uncompressed)
21AB2 Level layout - title screen (uncompressed)
21B32 Uncompressed art - mini Sonic from intro sequence
22832 Compressed Art - scenery from intro sequence
229A2 Compressed Art - Sonic's hand from title screen
22C32 Compressed Art - Tails' face from title screen
22DA2 Mappings for title screen
2307C Unknown
23C72 Empty
24000 Code
2411F Palette - unknown (4 shades of grey)
2412F Palette - unknown
2413F Palette - unknown
2414F Palette - title cards
2415F Palette - Sonic (GHZ)
2416F Palette - Sonic (SHZ1/3)
2417F Palette - Sonic (SHZ2)
2418F Palette - Sonic (ALZ1/3)
2419F Palette - Sonic (ALZ2)
241AF Palette - Sonic (UGZ)
241BF Palette - Sonic (GMZ)
241CF Palette - Sonic (SEZ)
241DF Palette - Sonic (CEZ1/2)
241EF Palette - Sonic (CEZ3)
241FF Palette - UGZ
2420F Palette - SHZ1/3
2421F Palette - SHZ2
2422F Palette - ALZ1/3
2423F Palette - ALZ2
2424F Palette - GHZ
2425F Palette - GMZ
2426F Palette - SEZ
2427F Palette - CEZ1/2
2428F Palette - CEZ3
2429F Palette - intro sequence
242AF Palette - title screen
242BF Palette - intro sequence
242CF Palette - title screen
242DF Palette - unknown
242EF Palettes (7) - title cards (UGZ, SHZ, ALZ, GHZ, GMZ, SEZ, CEZ)
2435F Palette - unknown
2436F Palette - Sonic (ending)
2437F Palette - unknown
2438F Palettes (8) - ending (gradually changes from day to night)
2440F Palette - blank
2441F Loop XY motion data (ALZ/GHZ)
24D1E Compressed Art - level select text
2511E Compressed Art - text from title cards
260A4 Compressed Art - UGZ level tiles
270DC Compressed Art - yellow bird (SHZ)
2715C Compressed Art - spears (ALZ)
2724E Compressed Art - moving platform (GMZ)
2724E Compressed Art - moving platform (SEZ)
273E8 Compressed Art - newtron (UGZ/SHZ/GHZ)
27654 Compressed Art - bomb enemy (GMZ/SEZ)
27782 Compressed Art - moving platform (UGZ)
27870 Compressed Art - crab (UGZ/ALZ/GHZ/SEZ/CEZ)
27B90 Compressed Art - splash (ALZ)
27BE0 Compressed Art - water (ALZ)
27C10 Compressed Art - falling spike (UGZ)
27CB0 Compressed Art - falling spike (GMZ)
27D50 Compressed Art - bubble (ALZ)
27E51 Empty
28000 Compressed Art - SHZ1/3 level tiles
291DC Compressed Art - SHZ2 level tiles
2A2AC Compressed Art - GMZ level tiles
2B2E2 Compressed Art - text from ending sequence
2B812 Empty
2C000 32x32 mappings - SHZ1/3
2D8C0 32x32 mappings - SHZ2
2F080 Level layout - CEZ1 (compressed)
2FA48 Empty
30000 32x32 mappings - GHZ
316C0 32x32 mappings - ALZ
32F80 Level layout - SHZ3 (compressed)
33716 Level layout - GMZ3 (compressed)
34000 Level layout - GHZ1 (compressed)
34C6B Level layout - GHZ2 (compressed)
35884 Level layout - GHZ3 (compressed)
36429 Level layout - SHZ1 (compressed)
370D8 Level layout - SHZ2 (compressed)
38000 Level layout - ALZ1 (compressed)
38F68 Level layout - ALZ2 (compressed)
39DFF Level layout - ALZ3 (compressed)
3ADBB Level layout - UGZ1 (compressed)
3C000 32x32 mappings - ALZ2
3DD80 32x32 mappings - UGZ
3F380 Compressed Art - "Game Over" text
3F75A Compressed Art - numbers 0 to 9 in scrolling GHZ style
3FB7E Mappings for Game Over screen
3FC5E Empty
40000 Uncompressed art - Sonic (mirrored)
43680 Compressed Art - little wavy lines (?)
436C0 Compressed Art - fireball (UGZ)
43722 Compressed Art - mini flame (UGZ)
43740 Compressed Art - lobster enemy (ALZ)
439A0 Compressed Art - burrobot (GMZ)
43C82 Compressed Art - moto bug (UGZ/GHZ)
43E28 Compressed Art - fish enemy (CEZ)
43EDA Empty
44000 Uncompressed art - Sonic gliding (mirrored)
45E00 Uncompressed art - Sonic riding a minecart (mirrored)
48000 Uncompressed art - Sonic running round a loop (mirrored)
4BC00 Compressed Art - block (SEZ)
4BC80 Compressed Art - moving platform (CEZ)
4BD46 Compressed Art - levitating spiked rock (CEZ)
4C000 Level layout - GMZ1 (compressed)
4CC68 Level layout - GMZ2 (compressed)
4DA91 Level layout - SEZ1 (compressed)
4E9C9 Level layout - SEZ2 (compressed)
4F76E Compressed Art - Tails & Eggman from intro sequence
4FC2A Empty
50000 Compressed Art - SEZ1/3 level tiles
5102A Compressed Art - SEZ2 level tiles
52102 Uncompressed art - UGZ boss
52E42 Compressed Art - "END" from ending sequence
53002 Compressed Art - Tails running in ending sequence
53850 Compressed Art - Tails looking up in ending sequence
53960 Uncompressed art - chaos emeralds
54000 Compressed Art - ALZ1/3 level tiles
550F0 Compressed Art - ALZ2 level tiles
56116 Compressed Art - CEZ1/2 level tiles
56E7E Compressed Art - CEZ3 level tiles
58000 32x32 mappings - GMZ
59960 32x32 mappings - SEZ1/3
5AF20 32x32 mappings - ending sequence / original GHZ
5B900 Empty
5C000 32x32 mappings - SEZ2
5D760 32x32 mappings - CEZ3
5E000 Compressed Art - GHZ level tiles
5F11B Level layout - UGZ2 (compressed)
60000 32x32 mappings - CEZ1/2
61600 Compressed Art - title screen
6299A Compressed Art - Eggman final boss (CEZ3)
6339C Compressed Art - cloud (CEZ3)
633CC Empty
64000 Compressed Art - UGZ title card pic
649A0 Compressed Art - SHZ title card pic
65410 Compressed Art - ALZ title card pic
65DC0 Compressed Art - GHZ title card pic
66446 Compressed Art - GMZ title card pic
66C26 Compressed Art - SEZ title card pic
670A6 Compressed Art - CEZ title card pic
67806 Mappings for title card pics
67F06 Empty
68000 Uncompressed art - GMZ boss
68980 Uncompressed art - SHZ boss
69740 Uncompressed art - ALZ boss
6A0C0 Uncompressed art - GHZ boss
6B340 Compressed Art - rock (SHZ)
6B460 Compressed Art - fragment of a smashed block (all zones)
6B4EA Uncompressed art - Tails (CEZ3)
6C000 Level layout - UGZ3 (compressed)
6C6D3 Level layout - SEZ3 (compressed)
6D1F5 Level layout - CEZ2 (compressed)
6DE81 Level layout - CEZ3 (compressed)
6DFD7 Level layout - good ending sequence (compressed)
6E151 Level layout - bad ending sequence (compressed)
6E2C2 Compressed Art - original GHZ level tiles from ending sequence
6F719 Empty
70000 Unknown
75C00 Uncompressed art - rings (UGZ)
75F00 Uncompressed art - rings (SHZ1/3)
76200 Uncompressed art - rings (SHZ2)
76500 Uncompressed art - rings (ALZ)
76800 Uncompressed art - rings (GHZ)
76B00 Uncompressed art - rings (GMZ)
76E00 Uncompressed art - rings (SEZ)
77100 Uncompressed art - rings (CEZ)
77400 Unknown
77552 Credits (plain ASCII format)
77732 Empty
78000 Unknown
78135 Pointers for sprite layouts (16-bit, little endian)
78173 Sprite layout - UGZ1
782C1 Sprite layout - UGZ2
7840F Sprite layout - UGZ3
7848E Sprite layout - SHZ1
784E9 Sprite layout - SHZ2
78568 Sprite layout - SHZ3
78584 Sprite layout - ALZ1
78666 Sprite layout - ALZ2
787BD Sprite layout - ALZ3
787F4 Sprite layout - GHZ1
788C4 Sprite layout - GHZ2
78970 Sprite layout - GHZ3
78983 Sprite layout - GMZ1
78A4A Sprite layout - GMZ2
78AFF Sprite layout - GMZ3
78B24 Sprite layout - SEZ1
78BE2 Sprite layout - SEZ2
78C7C Sprite layout - SEZ3
78C8F Sprite layout - CEZ1
78D20 Sprite layout - CEZ2
78D8D Sprite layout - CEZ3
78D97 Unknown
7AF41-7AF49 Cycling palette - UGZ lava
7AF4A-7AF52 Cycling palette - SHZ2 rain
7AF53-7AF5B Cycling palette - ALZ water
7AF5C-7AF64 Cycling palette - GMZ wheels and conveyor belts
7AF9F-7AFCE Cycling palette - CEZ3 lightning


Level select pointers

The pointers define which level the game goes to for each item on the level select. Each pointer consists of two bytes: one for the zone number, and one for the act number. The level numbers are as follows:

Value Zone
00?? Underground
01?? Sky High
02?? Aqua Lake
03?? Green Hills
04?? Gimmick Mt.
05?? Scrambled Egg
06?? Crystal Egg
0700 Bad Ending Sequence
0701 Good Ending Sequence
0900 Intro Sequence
0901 Title Screen

The act numbers are just 00, 01 and 02. There are a total of 18 entries in the pointer array.

Title card mappings

The title cards are built up with rows of 8x8 tiles. Mappings define which tiles are pulled from the VRAM and displayed on the screen. Each 8x8 tile is given a 2-byte, little endian value based on where it appears in the VRAM:

Titlecards.png

So, the letter A would mapped like so:

0111 0211
0C11 0D11

Spaces not containing any letters are 7011. Here are the ROM addresses for each title card:

Offset Level
2904 GREEN HILLS
298C ZONE
29C4 AQUA LAKE
2A34 UNDERGROUND
2AA4 SKY HIGH
2B14 GIMMICK MT.
2B84 MOUNTAIN
2BF4 SCRAMBLED EGG
2C64 CRYSTAL EGG
2CE4 SONIC HAS
2D54 PASSED
2D98 RING
2DAC TIME
2DC0 SCORE
2DD6 100X
2DE5 00
2DF6 00
2E04 ACT 1
2E90 ACT 2
2F1C ACT 3


Loop XY motion data

When Sonic hits a loop in either Aqua Lake or Green Hills Zone, you're momentarily unable to control him. The loop motion data determines how Sonic moves vertically and horizontally when he reaches a loop. By default, he moves in a large circle. Modifying the loop data could allow Sonic to move around virtually any shape.

Little endian things

This means 1234 becomes 3412, and 5500 becomes 0055. It's a feature of Master System ROMs which makes hacking them slightly more confusing. Pointers have to be read backwards.

Sonic Community Hacking Guide
General
Sonic Music Hacking Guide | SonED2 Manual
Game-Specific
Sonic the Hedgehog (16-bit) | Sonic the Hedgehog (8-bit) | Sonic Eraser | Sonic CD (prototype 510) | Sonic CD | Sonic CD (PC) | Sonic CD (2011) | Sonic 2 (Nick Arcade prototype) | Sonic 2 (Simon Wai prototype) | Sonic 2 (16-bit) | Sonic 2 (8-bit) | Sonic 2 & Knuckles | Dr. Robotnik's Mean Bean Machine | Sonic Triple Trouble | Sonic 3 | Sonic & Knuckles | Sonic 3 & Knuckles | Sonic & Knuckles Collection | Sonic Crackers | Sonic 3D: Flickies' Island | Chaotix | Sonic R PC | Sonic Jam 6 | Sonic Advance | Sonic Advance 2 | Sonic Advance 3 | Sonic Battle | Sonic Adventure | Sonic Adventure DX: Director's Cut | Sonic Adventure DX: PC | Sonic Adventure (2010) | Sonic Adventure 2 | Sonic Adventure 2: Battle | Sonic Adventure 2 (PC) | Sonic Heroes | Shadow the Hedgehog | Sonic Riders | Sonic the Hedgehog (2006) | Sonic & Sega All-Stars Racing | Sonic Unleashed (Xbox 360/PS3) | Sonic Generations
Legacy Guides
The Nemesis Hacking Guides The Esrael Hacking Guides
ROM: Sonic 1 | Sonic 2 | Sonic 2 Beta | Sonic 3

Savestate: Sonic 1 | Sonic 2 Beta/Final | Sonic 3

Sonic 1 (English / Portuguese) | Sonic 2 Beta (English / Portuguese) | Sonic 2 and Knuckles (English / Portuguese)
Move to Sega Retro
Number Systems (or scrap) | Assembly Hacking Guide | Subroutine Equivalency List | 68000 Instruction Set | 68000 ASM-to-Hex Code Reference | VDP Documentation | Official Sega 32X Documentation | Official Mega-CD Documentation | Official Sega Mega Drive Documentation