Go Back   The PokéCommunity Forums > ROM Hacking > Research & Development
Reload this Page Research What is up with the fanfare command?

Notices
For all updates, view the main page.

Research & Development Got a well-founded knack with ROM hacking? Love reverse-engineering the Pokémon games? Or perhaps you love your assembly language. This is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!
Research & Development programs in this forum are subject to moderator approval before they are displayed.



Reply
 
Thread Tools
  #1    
Old July 8th, 2010 (7:21 AM).
diegoisawesome's Avatar
diegoisawesome diegoisawesome is offline
Oh god the bees
Silver Tier
 
Join Date: Dec 2007
Location: :noitacoL
Age: 19
Gender: Male
Nature: Naive
Posts: 997

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.

__________________


My other resources:
My Website
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
diegoisawesome's Miscellaneous Finds
The Ruins of Alph Puzzles
Diego's Miscellaneous Patches
GBA Intro Manager
The Secret Sauce: Triple-Layer Tiles
Reply With Quote

Relevant Advertising!

  #2    
Old July 9th, 2010 (10:38 AM).
Shiny Quagsire's Avatar
Shiny Quagsire Shiny Quagsire is offline
I'm Still Alive, Elsewhere
 
Join Date: May 2009
Location: Hoenn Safari Zone
Age: 18
Gender: Male
Nature: Jolly
Posts: 695

try using the sound command. It works so much better.
sound 0xsound number

__________________



Reply With Quote
  #3    
Old July 9th, 2010 (10:42 AM).
diegoisawesome's Avatar
diegoisawesome diegoisawesome is offline
Oh god the bees
Silver Tier
 
Join Date: Dec 2007
Location: :noitacoL
Age: 19
Gender: Male
Nature: Naive
Posts: 997

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.

__________________


My other resources:
My Website
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
diegoisawesome's Miscellaneous Finds
The Ruins of Alph Puzzles
Diego's Miscellaneous Patches
GBA Intro Manager
The Secret Sauce: Triple-Layer Tiles
Reply With Quote
  #4    
Old December 18th, 2010 (1:44 AM). Edited January 26th, 2013 by AmineX.
AmineX's Avatar
AmineX AmineX is offline
Music Expert
 
Join Date: Feb 2008
Location: Algeria
Age: 27
Nature: Gentle
Posts: 151
Send a message via ICQ to AmineX Send a message via Windows Live Messenger to AmineX Send a message via Skype™ to AmineX

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.
Attachment 58126

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

__________________
AmineX


All my pokemon music related videos here:
http://www.youtube.com/user/LHV1?feature=mhee
Reply With Quote
  #5    
Old December 18th, 2010 (8:02 AM).
Shiny Quagsire's Avatar
Shiny Quagsire Shiny Quagsire is offline
I'm Still Alive, Elsewhere
 
Join Date: May 2009
Location: Hoenn Safari Zone
Age: 18
Gender: Male
Nature: Jolly
Posts: 695

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

__________________



Reply With Quote
  #6    
Old December 18th, 2010 (8:29 AM).
diegoisawesome's Avatar
diegoisawesome diegoisawesome is offline
Oh god the bees
Silver Tier
 
Join Date: Dec 2007
Location: :noitacoL
Age: 19
Gender: Male
Nature: Naive
Posts: 997

Wow, I did not expect to see this after such a long hiatus.
Thanks a lot, AmineX and shiny quagsire! This will really help, as I can now insert custom fanfares without the sound and music overlapping!

__________________


My other resources:
My Website
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
diegoisawesome's Miscellaneous Finds
The Ruins of Alph Puzzles
Diego's Miscellaneous Patches
GBA Intro Manager
The Secret Sauce: Triple-Layer Tiles
Reply With Quote
  #7    
Old December 20th, 2010 (4:36 AM).
Jambo51's Avatar
Jambo51 Jambo51 is offline
Glory To Arstotzka
 
Join Date: Jun 2009
Gender: Male
Nature: Quiet
Posts: 732

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.

__________________
Hey guys, please check out my recreations of the gen 1 and 2 music on my custom engine at my SoundCloud! - Here!
Reply With Quote
  #8    
Old December 20th, 2010 (10:31 AM).
diegoisawesome's Avatar
diegoisawesome diegoisawesome is offline
Oh god the bees
Silver Tier
 
Join Date: Dec 2007
Location: :noitacoL
Age: 19
Gender: Male
Nature: Naive
Posts: 997

Quote originally posted by Jambo51:
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.

__________________


My other resources:
My Website
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
diegoisawesome's Miscellaneous Finds
The Ruins of Alph Puzzles
Diego's Miscellaneous Patches
GBA Intro Manager
The Secret Sauce: Triple-Layer Tiles
Reply With Quote
  #9    
Old December 26th, 2010 (12:58 PM).
Jambo51's Avatar
Jambo51 Jambo51 is offline
Glory To Arstotzka
 
Join Date: Jun 2009
Gender: Male
Nature: Quiet
Posts: 732

Quote originally posted by diegoisawesome:
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.

__________________
Hey guys, please check out my recreations of the gen 1 and 2 music on my custom engine at my SoundCloud! - Here!
Reply With Quote
Reply
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 12:29 AM.