• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Research: What is up with the fanfare command?

Sierraffinity

Desperately trying to retire from ROM hacking
1,069
Posts
16
Years
  • I'm sure that most of you have realized that, when a non-fanfare song is given in a parameter to a fanfare command, it will just revert back to the Level Up sound. I was wondering if anybody here could either tell me the offset of the command table (which points to the ASM used for scripting commands) and maybe I could try fixing it, or maybe somebody else could help.
     

    Sierraffinity

    Desperately trying to retire from ROM hacking
    1,069
    Posts
    16
    Years
  • Fanfare- temporarily interrupts music and plays sound effect.
    Sound- plays sound effect while music also plays.

    I want the fanfare effect, and strangely enough, sound screws up my script...

    Also, for both, there's some table that determines the length for checksound and waitfanfare, and changing the sound effect doesn't change the length in the table.
     

    AmineX

    Music Expert
    152
    Posts
    16
    Years
  • I tried that but unfortunately the music won't resume after new fanfare added to the table.
    maybe somthing gone wrong give it a try:

    Code:
    BPED:
    
    Table    :    5248BC
    Pointer  :    EC655308
    Offset  1:    0A30A8
    Offset  2:    0A30FC
    Offset  3:    0A3120
    Amount   :   0A3128
    
    
    BPEE:
    
    Table    :    5248BC
    Pointer  :    A8975208
    Offset  1:    0A308C
    Offset  2:    0A3104
    Offset  3:    0A30E0
    Amount   :   0A310C 
    
    
    BPEF:
    
    Table    :    5297A8
    Pointer  :    A8975208
    Offset  1:    0A30A0
    Offset  2:    0A30F4
    Offset  3:    0A3118
    Amount   :   0A3120
    
    
    BPRE:
    
    Table    :    3Ac990
    Pointer  :    90c93A08 
    Offset  1:    071C08
    Offset  2:    071C5C
    Offset  3:    071C80
    Amount   :   071C88
    
    
    BPRF:
    
    Table    :    3A6D08
    Pointer  :    086D3A08
    Offset  1:    071C2C
    Offset  2:    071C80 
    Offset  3:    071CA4
    Amount   :   071CAC
    
    BPRD:
    
    Table    :    3AC7DC
    Pointer  :    DCC73A08
    Offset  1:    071B6C  
    Offset  2:    071BC0
    Offset  3:    071BE4
    Amount   :   071BEC
    Well i dont remember what are these stuff but it's easy to fugure out.
    here also dump of table from emerald if i remember well.
    View attachment 58126

    I have so much things to do i didnt got time for it anyway if you find a solution please contact me
     
    Last edited:

    Shiny Quagsire

    I'm Still Alive, Elsewhere
    697
    Posts
    14
    Years
  • I checked for any useage of that table, and all that I came up with was a random function, and the actual play fanfare.

    Code:
    08071C60     fanfare_play:                           @ CODE XREF: sub_080333D4+1Ap
    08071C60                                             @ sub_08038BE0+1Ap ...
    08071C60 000                 PUSH    {LR}
    08071C62 004                 LSLS    R0, R0, #0x10
    08071C64 004                 LSRS    R3, R0, #0x10
    08071C66 004                 MOVS    R1, #0
    08071C68 004                 LDR     R2, =unk_083AC990
    08071C6A
    08071C6A     loc_08071C6A:                           @ CODE XREF: fanfare_play+2Aj
    08071C6A 004                 LDRH    R0, [R2]
    08071C6C 004                 CMP     R0, R3
    08071C6E 004                 BNE     loc_08071C84
    08071C70 004                 LSLS    R0, R1, #0x18
    08071C72 004                 LSRS    R0, R0, #0x18
    08071C74 004                 BL      sub_08071BC4
    08071C78 004                 BL      sub_08071CEC
    08071C7C 004                 B       loc_08071C96
    08071C7C     @ ---------------------------------------------------------------------------
    08071C7E 004                 .byte    0
    08071C7F 004                 .byte    0
    08071C80 004 off_08071C80:   .long unk_083AC990      @ DATA XREF: fanfare_play+8r
    08071C84     @ ---------------------------------------------------------------------------
    08071C84
    08071C84     loc_08071C84:                           @ CODE XREF: fanfare_play+Ej
    08071C84 004                 ADDS    R2, #4
    08071C86 004                 ADDS    R1, #1
    08071C88 004                 CMP     R1, #0xD
    08071C8A 004                 BLS     loc_08071C6A
    08071C8C 004                 MOVS    R0, #0
    08071C8E 004                 BL      sub_08071BC4
    08071C92 004                 BL      sub_08071CEC
    08071C96
    08071C96     loc_08071C96:                           @ CODE XREF: fanfare_play+1Cj
    08071C96 004                 POP     {R0}
    08071C98 000                 BX      R0
     

    Jambo51

    Glory To Arstotzka
    736
    Posts
    14
    Years
    • Seen Jan 28, 2018
    Is there any way we could adapt this so that rather than restarting the music on the route after a battle, that it simply resumes like in HG/SS/D/P/PT? I'm sure it'd be complicated, but it'd be a worthwhile little hack if we got it to work.
     

    Sierraffinity

    Desperately trying to retire from ROM hacking
    1,069
    Posts
    16
    Years
  • Is there any way we could adapt this so that rather than restarting the music on the route after a battle, that it simply resumes like in HG/SS/D/P/PT? I'm sure it'd be complicated, but it'd be a worthwhile little hack if we got it to work.
    That would be interesting, but there's not really that much point to it.
    I mean, I never even really noticed how it resumed anyways, and I doubt anyone will if we do it in the 3rd gen, either.
     

    Jambo51

    Glory To Arstotzka
    736
    Posts
    14
    Years
    • Seen Jan 28, 2018
    That would be interesting, but there's not really that much point to it.
    I mean, I never even really noticed how it resumed anyways, and I doubt anyone will if we do it in the 3rd gen, either.

    Yeah, you're probably right. I'm good at noticing these little things tbh. Always have been, but I get the feeling you're right on this one.

    Useful hack, nonetheless, as I too was looking to use different fanfares on FR.
     
    Back
    Top