Sonic 2 Hacking Guide
Binary - Cheats

In this section, you can change any of the cheat codes to whatever you want them to be.

003DEE - Tails / Miles switch
0097B2 - Level select / slow motion (example)
0097B7 - 14 continues (example)
0097BC - Debug mode (example)
0097C5 - Super Sonic (example)

These codes (except for the first one listed) use the regular sound 00-7F format, not the 80-FF format that the regular sound pointers use. Also, you can make these codes as long as you want. Simply use '00' to tell the game that the code ends there. If you make the very first sound to play in the code sequence a '00', it will then require you to play that sound along with the rest of the code.

The first code (Tails / Miles switch) is based on the Motorolla key format:

1 2 3 4 5 6 7 8 (this is a byte represented in bits)
S A C B U D L R (these are the bits translated to show what each key is)

If you want to relocate some of these cheat codes to another area of the ROM, just change these address pointers.

003DB6 - Tails / Miles switch cheat pointer
009164 - Level select / slow motion cheat pointer
00916A - 14 continues cheat pointer
009574 - Debug mode cheat pointer
00957A - Super Sonic cheat pointer