This is a very simple guide to add a cheat code in Sonic 1 using the songs played in the level select screen. I know there are other ways to do this (Sonic 2 does it differently, for example), but I came up with my own implementation when I added a cheat in my hack, and I thought to share it with the world since I think it's pretty simple and good at the same time. Please note that this only works with sequences of 4 songs. This is how the LevelSelect routine looks like in a clean Sonic 1 disasm: LevelSelect: move.b #4,($FFFFF62A).w bsr.w DelayProgram bsr.w LevSelControls bsr.w RunPLC_RAM tst.l ($FFFFF680).w bne.s LevelSelect andi.b #$F0,($FFFFF605).w; is A, B, C, or Start pressed? beq.s LevelSelect; if not, branch move.w ($FFFFFF82).w,d0 cmpi.w #$14,d0; have you selected item $14 (sound test)? bne.s LevSel_Level_SS; if not, go to Level/SS subroutine move.w ($FFFFFF84).w,d0 addi.w #$80,d0 tst.b ($FFFFFFE3).w; is Japanese Credits cheat on? beq.s LevSel_NoCheat; if not, branch cmpi.w #$9F,d0; is sound $9F being played? beq.s LevSel_Ending; if yes, branch cmpi.w #$9E,d0; is sound $9E being played? beq.s LevSel_Credits; if yes, branch LevSel_NoCheat: cmpi.w #$94,d0; is sound $80-$94 being played? bcs.s LevSel_PlaySnd; if yes, branch cmpi.w #$A0,d0; is sound $95-$A0 being played? bcs.s LevelSelect; if yes, branch LevSel_PlaySnd: bsr.w PlaySound_Special bra.s LevelSelect And this is how it looks in my hack: LevelSelect: move.b #4,($FFFFF62A).w bsr.w DelayProgram bsr.w LevSelControls bsr.w RunPLC_RAM tst.l ($FFFFF680).w bne.s LevelSelect andi.b #$F0,($FFFFF605).w; is A, B, C, or Start pressed? beq.s LevelSelect; if not, branch move.w ($FFFFFF82).w,d0 cmpi.w #$15,d0; have you selected item $15 (sound test)? bne.s LevSel_Level_SS; if not, go to Level/SS subroutine move.w ($FFFFFF84).w,d0 addi.w #$80,d0 move.l ($FFFFC60C).w,d1; move the last 4 songs played into d1 rol.l #8,d1; rotate d1 by 8 bits move.l d1,($FFFFC60C).w; put the rotated d1 back there move.b d0,($FFFFC60F).w; overwrite the right-most song cmpi.l #$91999894,($FFFFC60C).w; did you play 91, 99, 98, 94? bne.b LevSel_PlaySnd; if not, proceed normally bra.s LevSel_Bonus; let's play the bonus stage LevSel_PlaySnd: bsr.w PlaySound_Special bra.s LevelSelect Please note that I removed the japanese credits cheat because I wasn't using it (the japanese credits are visible by default in my hack), but this doesn't mean that you can't have both of them. I also removed the two bcs.s instructions because I use all the song slots so they're not needed anymore. One more note, the sound test is on line $15 in my sound test, don't alter that line if your sound test is still on line $14. What does this cheat do? In my case, if you play songs 91, 99, 98, 94 in the sound test, you will play the secret bonus stage (the one with 1080 rings and shit). But you can do whatever you want, just change the bra.s LevSel_Bonus with something else to suit your needs. Also you can have more than one cheat by doing multiple CMPI checks. And yeah, I know that now I spoiled that 91 99 98 94 is the cheat code for my hack, I wanted it to stay secret but whatever Bonus points to everyone who knows why I chose those numbers. One more thing, you can replace $FFFFC60C with any other free RAM address, but keep in mind that it MUST be dword-aligned (e.g. a multiple of 4).