Sonic 2
Hacking Guide
Binary - Game Configurations
003CD2 - Enable level select
003C79 - Starting lives for player 1
0041CC - How to determine how many rings to
start with
0041D0 - How to determine how much time starts
on the timer
0142F8 - Order that the levels come in
01600C - Object code pointers
Each of the object code pointers are in 32-bits. They locate where the code for the object starts in the ROM. It starts with object 01 (Sonic) and goes in order from there. You will find a total of 255 pointers. These are useful if you want to create your own object code, or if you want to make one object into another. Check out the object list to see what each object is.
016398 - Amount of gravity player has (16-bit)
019FA2 - Max speed (16-bit)
019FA8 - Acceleration (16-bit)
019FAE - Slow down speed (16-bit)
01A0E8 - Invincibility time (16-bit)
01A122 - Max speed after super sneakers wear
off (16-bit)
01A122 - Acceleration after super sneakers wear
off (16-bit)
01A12E - Slow down speed after super sneakers
wear off (16-bit)
01A1B8 - Max speed under water (16-bit)
01A1BE - Acceleration under water (16-bit)
01A1C4 - Slow down speed under water (16-bit)
01A5BD - Use this animation when looking down
01A5D5 - How far to look down (player Y - input value) (16-bit)
01AA5C - Jump height (16-bit)
01AC47 - Do spindash if this frame is shown
01B1BE - Flash time after hit (16-bit)
01B8A4 - Stop Tails from going to the left when
end level sign is active (16-bit)
01F1FC - Rings needed for special stage (16-bit)
04082F - Specify the minute that causes "TIME"
to flash red
040DED - Max minutes of timer
040DF9 - Max middle seconds of timer
042594 - Art/mapping pointers for levels
Each full level has 3 pointers. However, the pointers are 24-bits in size. The extra 8-bits in each pointer has a unique function. These are known as 'flags'. The pointers will define mapping sets, as well as art for a specific level. In total, 12 bytes are used per level. Here is what each flag/pointer does.
Flag 1 - Unknown
Pointer 1 - Level art
Flag 2 - Level specific graphics (player icons included)
Pointer 2 - 16x16 mappings
Flag 3 - Palette number
Pointer 3 - 128x128 mappings.