Users browsing this thread: 1 Guest(s)
Make "The Veldt" jungle theme play everywhere on the overworld Map.

#2
Posts: 3,970
Threads: 279
Thanks Received: 236
Thanks Given: 58
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
Here's the relevant code concerning the world maps song loading:

Code:
EE/8A0D:    AD641F      LDA $1F64      (Map number from SRAM, low byte)
EE/8A10:    2903        AND #$03       (We only care about world maps... and the Serpent Trench)
EE/8A12:    0A          ASL A          (Multiply by 2)
EE/8A13:    AA          TAX            (Set as song index)
EE/8A14:    ADB71E      LDA $1EB7      (Event bits)
EE/8A17:    8901        BIT #$01       (Is the "alternate overworld music" bit set?)
EE/8A19:    F001        BEQ $8A1C      (Branch if not) (LSR A, BCC...)
EE/8A1B:    E8          INX            (Increase song index)
EE/8A1C:    BF9183EE    LDA $EE8391,X  (Song number)
EE/8A20:    8D801F      STA $1F80      (Save in SRAM)


You have some free space in bank EE. You could jump to that free space and insert the following code:

Code:
first:
EE/8A0D: JSR $EE/B000

Now at EE/B0000:
01) LDA $1F64     (Map number from SRAM, low byte)
02) AND #$03      (We only care about world maps... and the Serpent Trench)
03) CMP #$01      (Check if in WOB)
04) BNE $????     (jump to step 7)
05) LDA #$19      (Veldt song ID)
06) JMP $????     (Jump to step 14)    
07) ASL A         (Multiply by 2)
08) TAX           (Set as song index)
09) LDA $1EB7     (Event bits)
10) BIT #$01      (Is the "alternate overworld music" bit set?)
11) BEQ           (Branch to step 13)
12) INX           (Increase song index)
13) LDA $EE8391,X (song number)
14) STA $1F80     (Save in SRAM)
15) RTS

Finally, NOP everything up to EE/8A20 (except your first JSL instruction).

With this code, the Veldt music would play in the WOB but the WOR would still have its 2 different map songs. I haven't tested this but I think my logic is good even if my coding is more than lazy :P
  Find
Quote  



Messages In This Thread
RE: Make "The Veldt" jungle theme play everywhere on the overworld Map. - by madsiur - 12-30-2013, 07:34 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite