{ FIXED } Rolling sound not stopping properly (Sonic 1)

Discussion in 'Discussion and Q&A Archive' started by bluBird, May 5, 2016.

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

    bluBird Game Developer Member

    Joined:
    May 19, 2015
    Messages:
    32
    Location:
    Michigan
    Hello.
    I don't know what I did to trigger this, but the rolling sound effect isn't ending properly. Instead of fading out like it normally does, it keeps going. What did I do to cause this to happen, and how can I fix it? I'm so confused right now. :confused:

    ROM included below.
     

    Attached Files:

  2. vladikcomper

    vladikcomper Well-Known Member Member

    Joined:
    Dec 2, 2009
    Messages:
    415
    There's a bug in stock SMPS 68k that causes incorrect voice data to be loaded when updating the TL operators of the SFX channel. That's exactly your issue here, I checked.

    Go to the SendVoiceTL (or sub_72CB4 in case you're using Hivebrain's disassembly), find and replace this:
    Code:
        movea.l    $20(a6),a1
    with this
    Code:
        movea.l    $20(a5),a1
    This fixes spin SFX playback in your ROM.

    The bug is present in 99% of Sonic 1 hacks, but surprisingly, it never shows up unless some rare and unlikely conditions are met. As you see, it's simply a register misspelled, which often leads to crashes or at least the data corruption. The only real question here is how the hell did this even work like it should with such an outrageous error in the code.
     
  3. bluBird

    bluBird Game Developer Member

    Joined:
    May 19, 2015
    Messages:
    32
    Location:
    Michigan
    I applied the fix and the spin sound works again. Thanks for the help! :)

    If any staff are viewing this, please lock this thread.
     
Thread Status:
Not open for further replies.