don't click here

Spin Dash Sound Help

Discussion in 'Engineering & Reverse Engineering' started by ALittleTooFast, Jul 29, 2017.

  1. ALittleTooFast

    ALittleTooFast

    How about that? Member
    This might seem like a bit of a noob question, but I simply can't figure this out.
    I'm trying to add in the Sonic 2 Spin Dash sound into Sonic 1, and I am using the Guide for it, but I just can't seem to find this code at all.

    cmpi.b #$E0,d7
    bcs.w Sound_D0toDF ; sound $D0-$DF

    I assumed it would be in the Driver or the Spin Dash code itself, but that doesn't seem to be the case. Am I missing something? Because It feels that after the first part of the Spin Dash guide, it got pretty vague on which files I should be editing. It should also be noted that I am using the Git Hub disassembly, so that could very well be the reason why I can't seem to find it. :v:
     
  2. Clownacy

    Clownacy

    Tech Member
    1,060
    607
    93
    It's vague because the guide was written for the old Hivebrain disasm, where everything was in one file. Anyway, the lines you're looking for are replaced with these in the Git disasm:

    Code (ASM):
    1.         cmpi.b  #spec__Last+$10,d7  ; Is this special sfx ($D0-$DF)?
    2.         blo.w   Sound_PlaySpecial   ; Branch if yes
    If you keep a copy of the Hivebrain disasm handy, you can find lines you need in it, and then compare where they should be in the Git disasm to find equivalent lines.
     
  3. ALittleTooFast

    ALittleTooFast

    How about that? Member
    Alright then, cool. I do hope the guide does get updated one day to include the GitHub disassembly just to ease further confusion, but I'll still go ahead and download the Hivebrain disassembly just in case this happens again. Thanks!
     
  4. ALittleTooFast

    ALittleTooFast

    How about that? Member
    Erm, seems like I got a new problem.

    D:\SONIC ROM\S1DISASM-MASTER - COPY\S1.SOUNDDRIVER.ASM(2544) : Error : Bad size on opcode
    ptr_sndd1: dc.1 soundd1

    I'm fairly certain I followed the guide exactly, so what did I do wrong? Is this another Github Issue?

    I'm assuming this has to do with the Sound Index. Did I rename something wrong here?

    Edit: I seemed to have fixed it, but now I've got a whole new batch of errors.

    D:\SONIC ROM\S1DISASM-MASTER - COPY\S1.SOUNDDRIVER.ASM(660) : Error : Symbol 'sound_d1todf' not defined
    D:\SONIC ROM\S1DISASM-MASTER - COPY\S1.SOUNDDRIVER.ASM(918) : Error : Symbol '@locret' not defined
    D:\SONIC ROM\S1DISASM-MASTER - COPY\S1.SOUNDDRIVER.ASM(920) : Error : Symbol '@locret' not defined
    D:\SONIC ROM\S1DISASM-MASTER - COPY\S1.SOUNDDRIVER.ASM(922) : Error : Symbol '@locret' not defined
    D:\SONIC ROM\S1DISASM-MASTER - COPY\S1.SOUNDDRIVER.ASM(924) : Error : Symbol 'a1' not defined
    D:\SONIC ROM\S1DISASM-MASTER - COPY\S1.SOUNDDRIVER.ASM(925) : Error : Symbol 'soundeffects_common' not defined
    D:\SONIC ROM\S1DISASM-MASTER - COPY\S1.SOUNDDRIVER.ASM(1081) : Error : Symbol '@sfxloadloop' not defined

    Assembly completed.
    7 error(s) from 53059 lines in 3.59 seconds

    Edit 2: Alright, I renamed some of the symbols, but now I get this:

    D:\SONIC ROM\S1DISASM-MASTER - COPY\S1.SOUNDDRIVER.ASM(659) : Error : Illegal addressing mode
    cmpi.b $d1,d7
    Errors during pass 1 - pass 2 aborted
    Assembly completed.
    1 error(s) from 53060 lines in 6.31 seconds


    Holy hell this is way more complicated than I expected. I think I'll stop messing around with the code until you guys tell me to, because I'm worried that I may have dug a hole too deep to climb out of.
     
  5. Clownacy

    Clownacy

    Tech Member
    1,060
    607
    93
    You might be better off sticking with the Hivebrain disassembly until you figure out more about hacking. I don't think the people here have the patience to walk you through applying every non-Git guide.

    The thing with the Hivebrain disasm, besides personal preference, is that it's a 'snapshot' of the disassembly as it was in 2005. This basically guarantees that anyone following the guide will have the exact same code as the guy who wrote the guide. Git doesn't have that luxury: it's not a snapshot, it's the most up-to-date version, constantly changing. This means what the code might have looked like when a guide was written might not be the same now. As a result, it's very possible for a Git guide to be incompatible with Git. This makes it a little infeasible to 'update' a guide to Git, since it will be outdated whenever the Git disasm changes again.
     
  6. ALittleTooFast

    ALittleTooFast

    How about that? Member
    That's understandable, I assumed it would be easier to use the GitHub disassembly, but I guess that's just not the case. :v:
    It is a little frustrating however, as I have already edited a good amount of sprites already, along with the SEGA sound, but I'll probably figure out a way to port these over to the Hivebrain disassembly. Probably.