Sonic 2 Hacking Guide
Binary - Screen Configurations

This is where you can set up the level select, options screen, title screen, etc. You can make several different changes in a large variety.

Sega Logo
00393C - Duration that the Sega logo stays on the screen (16-bit)

Level Select / Options
008E52 - 2 player level select order [Stealth]
009454
- Level pointers on level select [Stealth]
0095A2
- List of pointers (where to go when pressing left or right)
009680 - Sound number set (10 - 00, 11 - 11, 12 - 22, etc)
009685 - Highest value for sound test
0096D8 - Level select icon order

00 - Emerald Hill
07 - Chemical Plant
08 - Aquatic Ruin
06 - Casino Night
02 - Hill Top
05 - Mystic Cave
03 - Hidden Palace
04 - Oil Ocean
01 - Metropolis
09 - Sky Chase
0A - Wing Fortress
0B - Death Egg
0C - Special Stage
0D - X
0E - Sound

0096EE - Selections highlight/don't highlight

On-Screen Display
040A9A - Pointer for object group 1 (1 player)
040BEA - Pointer for object group 2 (2 player labels)
040C82 - Pointer for object group 3 (2 player digits)

FORMAT:
#1 #2 #3 #4 #5 #6 #7 #8

1 - Y Position
2 - How many sprites on current object will not flash
3 - Flash RED (+08 will mirror, +10 will flip, +18 will flip/mirror, +20 will switch palette)
4 - Graphics read position
5 - ???
6 - ???
7 - ???
8 - X Position

Group 1 - These addresses are for the layout of the objects if you have plenty of time and you have rings.

040AA4 - SCOR
040AAC - Exxx
040AB4 - xxx0
040ABC - TIME
040AC4 - x:xx
040ACC - RING
040AD4 - S
040ADC - xxxx
040AE4 - (Player picture)
040AEC - (Player name / Lives)

Group 1 - These addresses are for the layout of the objects if you have plenty of time, but you have no rings.

040AF6 - SCOR
040AFE - Exxx
040B06 - xxx0
040B0E - TIME
040B16 - x:xx
040B1E - RING
040B26 - S
040B2E - xxxx
040B36 - (Player picture)
040B3E - (Player name / Lives)

Group 1 - These addresses are for the layout of the objects if you have little time, but you have rings.

040B48 - SCOR
040B50 - Exxx
040B58 - xxx0
040B60 - TIME
040B68 - x:xx
040B70 - RING
040B78 - S
040B80 - xxxx
040B88 - (Player picture)
040B90 - (Player name / Lives)

Group 1 - These addresses are for the layout of the objects if you have little time and you have no rings.

040B9A - SCOR
040BA2 - Exxx
040BAA - xxx0
040BB2 - TIME
040BBA - x:xx
040BC2 - RING
040BCA - S
040BD2 - xxxx
040BDA - (Player picture)
040BE2 - (Player name / Lives)

Group 2 - These addresses are for the layout of the objects if you have plenty of time and you have rings.

040BF8 - TIME
040C00 - RING
040C08 - S

Group 2 - These addresses are for the layout of the objects if you have plenty of time, but you have no rings.

040C12 - TIME
040C1A - RING
040C22 - S

Group 2 - These addresses are for the layout of the objects if you have little time, but you have rings.

040C2C - TIME
040C34 - RING
040C3C - S

Group 2 - These addresses are for the layout of the objects if you have little time and you have no rings.

040C46 - TIME
040C4E - RING
040C56 - S

Group 2 - These addresses are for the layout of the player icon / lives objects.

040C60 - (Sonic picture)
040C68 - (Sonic / Lives)
040C72 - (Tails picture)
040C7A - (Tails / Lives)

Group 3 - These addresses define the digits used beside the labels.

040C9A - 0
040CA4 - 1
040CAE - 2
040CB8 - 3
040CC2 - 4
040CCC - 5
040CD6 - 6
040CE0 - 7
040CEA - 8
040CF4 - 9
040CFE - :

Title Screen
003BA4 - Duration that the title stays on the screen (16-bit)

012E26 - Sequence data pointer list

0032 - Start stars, music, Sonic animation
0240 - Tails animation
0324 - Start stars
03DA - Bring up Sonic arm
0426 - Bring up Tails arm
046E - Shooting star

012EC4 - (2 bytes) time waited before start music and logo
012EE3 - Title music selection (don't press start)
012EEA - (2 bytes) time waited before Sonic pops up
012EF8 - Points to Sonic palette
012F1C - Pointer to Sonic animation script
012F54 - Pointer to animation sequence definitions
013046 - Sonic animation script
01309A - Pointer to Tails animation script
0130B8 - Tails animation script
0135E3 - Title music selection (press start)

To modify the animation scripts, you will need to go by this format.

FORMAT:
#1 #2 #3 #4

1 + 2 - Xpos
3 - Unused
4 - Ypos

01306B - Change to 00 to disable Tails
0132E4 - Pointer to Animation sequence definitions
013686 - Animation sequence definitions (2 bytes per animation)

FORMAT:
#1 #2

1 - ???
2 - Animation

686 - Sonic turn
688 - Tails turn
68A - Star twinkle
68C - Falling star

01368E - Frames for Sonic turn
013694 - Frames for Tails turn
01369B - Frames for Star twinkle
0136A3 - Frames for Falling star

The first byte is the animation speed (number of frames waited between switch)

Here is a list of each frame.

00-04 - Tails turn
05-08 - Sonic turn
09 - Sonic hand
0A - Banner cover
0B - Banner cover (TM)
0C-0E - Star twinkle
0F - Falling star
10 - TM
11 - Messed up object
12 - Sonic pose
13 - Tails hand
FA - End animation

0136A8 - Frame mapping pointers (2 bytes per frame)
0136D0 - Mappings
013AF4 - Sonic mappings

The first two bytes represent how many tiles a frame has. Here is the mappings format.

FORMAT:
#1 #2 #3 #4 #5 #6 #7 #8

1 - Y pos
2 - Size (00-03 = 1x4, 04-07 = 2x4, 08-0B = 3x4, 0C-0F = 4x4)
3 + 4 - Sprite selections
5 - ??? (Usually same value as #3)
6 - ??? (Usually half the value of #4)
7 + 8 - X pos