don't click here

How can I add extra songs to Sonic 1?

Discussion in 'Engineering & Reverse Engineering' started by Puto, Dec 13, 2006.

Thread Status:
Not open for further replies.
  1. Puto

    Puto

    Shin'ichi Kudō, detective. Tech Member
    2,013
    0
    16
    Portugal, Oeiras
    Part of Team Megamix, but haven't done any actual work in ages.
    Since the slots from 94 to 9F in Sonic 1 seem to be empty, is there any way to add music to those slots? I tried simply adding extra references to the MusicIndex (and including the binary files of the extra songs, of course), but of course, it didn't work. So... can anyone please explain how can extra songs be added in those slots?
     
  2. Xenowhirl

    Xenowhirl

    Tech Member
    175
    0
    0
    Did you only try it in the sound test? If so, take a look in the Level Select routines, it's hard-coded to not play those slots. Otherwise, I haven't got a clue what's wrong.
     
  3. Puto

    Puto

    Shin'ichi Kudō, detective. Tech Member
    2,013
    0
    16
    Portugal, Oeiras
    Part of Team Megamix, but haven't done any actual work in ages.
    Yep, you're right, it worked. Thanks ;)
     
  4. fpusoft

    fpusoft

    Banned
    31
    0
    0
    Wisconsin
    Hacking sonic 2 Beta
    How do you do it exactly?
     
  5. To add more music slots to the sound test, search for this code in the level select routine:

    Code (Text):
    1. LevSel_NoCheat:
    2.         cmpi.w  #$94,d0 ; is sound $80-$94 being played?
    3.         bcs.s   LevSel_PlaySnd; if yes, branch
    4.         cmpi.w  #$A0,d0 ; is sound $95-$A0 being played?
    5.         bcs.s   LevelSelect; if yes, branch
    Change the line:
    Code (Text):
    1.         cmpi.w  #$94,d0 ; is sound $80-$94 being played?
    so it reads:
    Code (Text):
    1.         cmpi.w  #$9F,d0 ; is sound $80-$94 being played?
    then Rebuild the rom.

    And now the sound test will have the music slots going up to 9F, instead of 94, however attempts to play empty music slots will crash the sound driver, and possibly lock up the emulator. So, make sure you include a song in every slot.
     
Thread Status:
Not open for further replies.