Users browsing this thread: 1 Guest(s)
Random battle theme

#21
Posts: 3,969
Threads: 279
Thanks Received: 236
Thanks Given: 57
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(10-14-2018, 02:33 PM)Lightning Wrote: Is there a WOR desert background missing from this hack, or am I not seeing it?  I only see one desert background listed, while there are actually two in the game.

It's the same background, the game only do a palette swap.

Edit: I could actually check the WoR event bit if desert background then have one for WoR and one for WoB.
  Find
Quote  

#22
Posts: 311
Threads: 20
Thanks Received: 0
Thanks Given: 0
Joined: Dec 2017
Reputation: 2
Status
None
(10-14-2018, 03:07 PM)madsiur Wrote:
(10-14-2018, 02:33 PM)Lightning Wrote: Is there a WOR desert background missing from this hack, or am I not seeing it?  I only see one desert background listed, while there are actually two in the game.

It's the same background, the game only do a palette swap.

Edit: I could actually check the WoR event bit if desert background then have one for WoR and one for WoB.

That would be awesome, because I was now thinking of having a different overworld battle theme for the WOB and the WOR.  You really grew my ambitions with this patch.  Lol.
  Find
Quote  

#23
Posts: 3,969
Threads: 279
Thanks Received: 236
Thanks Given: 57
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
You can test this:

Code:
hirom

org $C2BDB7
JSR free_space
NOP

org $C26469          ; change to free space
free_space:
LDA $C2BF3B,X
CMP #$24             ; check if battle song
BNE exit             ; branch if not
LDA $11E2            ; load battle background byte
AND #$3F             ; isolate battle background
BEQ is_wob_grass
CMP #$01
BEQ is_wob_forest
CMP #$02
BEQ is_desert
CMP #$03
BEQ is_wor_forest
CMP #$05
BEQ is_wor_grass
LDA #$15             ; default battle song ID
BRA exit
is_wob_grass:
LDA #$10             ; song ID
BRA exit
is_wob_forest:
LDA #$11             ; song ID
BRA exit
is_desert:
LDA $1E94
BIT #$10
BNE is_wor_desert
LDA #$22             ; song ID (wob desert)
BRA exit
is_wor_desert:
LDA #$23             ; song ID (wor desert)
BRA exit
is_wor_forest:
LDA #$13             ; song ID
BRA exit
is_wor_grass:
LDA #$14             ; song ID
BRA exit
exit:
RTS
  Find
Quote  

#24
Posts: 311
Threads: 20
Thanks Received: 0
Thanks Given: 0
Joined: Dec 2017
Reputation: 2
Status
None
(10-14-2018, 03:16 PM)madsiur Wrote: You can test this:

Code:
hirom

org $C2BDB7
JSR free_space
NOP

org $C26469          ; change to free space
free_space:
LDA $C2BF3B,X
CMP #$24             ; check if battle song
BNE exit             ; branch if not
LDA $11E2            ; load battle background byte
AND #$3F             ; isolate battle background
BEQ is_wob_grass
CMP #$01
BEQ is_wob_forest
CMP #$02
BEQ is_desert
CMP #$03
BEQ is_wor_forest
CMP #$05
BEQ is_wor_grass
LDA #$15             ; default battle song ID
BRA exit
is_wob_grass:
LDA #$10             ; song ID
BRA exit
is_wob_forest:
LDA #$11             ; song ID
BRA exit
is_desert:
LDA $1E94
BIT #$10
BNE is_wor_desert
LDA #$22             ; song ID (wob desert)
BRA exit
is_wor_desert:
LDA #$23             ; song ID (wor desert)
BRA exit
is_wor_forest:
LDA #$13             ; song ID
BRA exit
is_wor_grass:
LDA #$14             ; song ID
BRA exit
exit:
RTS

The WOB desert music works as it should, but the WOR desert music just plays the default battle theme.

By the way, I noticed the wob and wor grass songs were reversed, but I figured it out so no big deal.

Edit: May I request a Kefka's tower background battle song? That would be really nice to reflect the final dungeon (kind of like what was done in FF4 near the end of the game).
  Find
Quote  

#25
Posts: 3,969
Threads: 279
Thanks Received: 236
Thanks Given: 57
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
I think this will work. WoR Desert is background $2F, I had to do debugging to find it.

Code:
hirom

org $C2BDB7
JSR free_space
NOP

org $C26469          ; change to free space
free_space:
LDA $C2BF3B,X
CMP #$24             ; check if battle song
BNE exit             ; branch if not
LDA $11E2            ; load battle background byte
AND #$3F             ; isolate battle background
BEQ is_wor_grass
CMP #$01
BEQ is_wob_forest
CMP #$02
BEQ is_wob_desert
CMP #$03
BEQ is_wor_forest
CMP #$05
BEQ is_wob_grass
CMP #$2F
BEQ is_wor_desert
CMP #$16
BEQ is_kefka
CMP #$28
BEQ is_kefka
LDA #$24             ; default battle song ID
BRA exit
is_wob_grass:
LDA #$10             ; song ID
BRA exit
is_wob_forest:
LDA #$11             ; song ID
BRA exit
is_wob_desert:
LDA #$12             ; song ID
BRA exit
is_wor_forest:
LDA #$13             ; song ID
BRA exit
is_wor_grass:
LDA #$14             ; song ID
BRA exit
is_wor_desert:
LDA #$15             ; song ID
BRA exit
is_kefka:
LDA #$16             ; song ID
exit:
RTS
  Find
Quote  
[-] The following 1 user says Thank You to madsiur for this post:
  • Lightning (10-16-2018)

#26
Posts: 311
Threads: 20
Thanks Received: 0
Thanks Given: 0
Joined: Dec 2017
Reputation: 2
Status
None
Well, I think we got a little ahead of ourselves... Unfortunately, my mod suddenly doesn't work on real hardware. The music doesn't sound right, and the game crashes randomly. If I had to guess, I would say the cause is tsushiy's instrument pack. This is a huge shame, because a lot of work went in to adding music the last few days. I will have to mess with things and see if the expanded ROM is causing the issues, or if the new samples are causing the issues.
  Find
Quote  

#27
Posts: 3,969
Threads: 279
Thanks Received: 236
Thanks Given: 57
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
Here is a version with the different kefka tower songs:

Code:
hirom

org $C2BDB7
JSR free_space
NOP

org $C26469          ; change to free space
free_space:
LDA $C2BF3B,X
CMP #$24             ; check if battle song
BNE exit             ; branch if not
LDA $11E2            ; load battle background byte
AND #$3F             ; isolate battle background
BEQ is_wor_grass
CMP #$01
BEQ is_wob_forest
CMP #$02
BEQ is_wob_desert
CMP #$03
BEQ is_wor_forest
CMP #$05
BEQ is_wob_grass
CMP #$2F
BEQ is_wor_desert
CMP #$16
BEQ is_kefka1
CMP #$28
BEQ is_kefka2
LDA #$24             ; default battle song ID
BRA exit
is_wob_grass:
LDA #$10             ; song ID
BRA exit
is_wob_forest:
LDA #$11             ; song ID
BRA exit
is_wob_desert:
LDA #$12             ; song ID
BRA exit
is_wor_forest:
LDA #$13             ; song ID
BRA exit
is_wor_grass:
LDA #$14             ; song ID
BRA exit
is_wor_desert:
LDA #$15             ; song ID
BRA exit
is_kefka1:
LDA #$16             ; song ID
BRA exit
is_kefka2:
LDA #$17             ; song ID
exit:
RTS
  Find
Quote  
[-] The following 2 users say Thank You to madsiur for this post:
  • Gi Nattak (10-16-2018), Lightning (10-16-2018)

#28
Posts: 311
Threads: 20
Thanks Received: 0
Thanks Given: 0
Joined: Dec 2017
Reputation: 2
Status
None
Dang, I realized it would be a crime to have default music in the floating continent after all this, but I will leave that completely up to you Madsiur... If you are done with this hack, then no worries; you have done more than enough already! I wish I could click the "thank you" comment more than once. Lol.
  Find
Quote  

#29
Posts: 2,548
Threads: 98
Thanks Received: 147
Thanks Given: 158
Joined: Aug 2009
Reputation: 52
Status
Nattak\'d
I know next to nothing when it comes to assembly code, but this one's simple, you'd just need to add in another exception for the Floating Continent background. The Floating Continent Background is: ID $15 Floating Island.
Can check the background IDs on the wiki: https://www.ff6hacking.com/wiki/doku.php...ackgrounds

So like...
Code:
hirom

org $C2BDB7
JSR free_space
NOP

org $C2CE2B          ; change to free space
free_space:
LDA $C2BF3B,X
CMP #$24             ; check if battle song
BNE exit             ; branch if not
LDA $11E2            ; load battle background byte
AND #$3F             ; isolate battle background
BEQ is_wor_grass
CMP #$01
BEQ is_wob_forest
CMP #$02
BEQ is_wob_desert
CMP #$03
BEQ is_wor_forest
CMP #$05
BEQ is_wob_grass
CMP #$2F
BEQ is_wor_desert
CMP #$16
BEQ is_kefka1
CMP #$28
BEQ is_kefka2
CMP #$15
BEQ is_floating_island
LDA #$24             ; default battle song ID
BRA exit
is_wob_grass:
LDA #$10             ; song ID
BRA exit
is_wob_forest:
LDA #$11             ; song ID
BRA exit
is_wob_desert:
LDA #$12             ; song ID
BRA exit
is_wor_forest:
LDA #$13             ; song ID
BRA exit
is_wor_grass:
LDA #$14             ; song ID
BRA exit
is_wor_desert:
LDA #$15             ; song ID
BRA exit
is_kefka1:
LDA #$16             ; song ID
BRA exit
is_kefka2:
LDA #$17             ; song ID
BRA exit
is_floating_island:
LDA #$18             ; song ID
exit:
RTS

Notice the Floating Continent has been added now.


We are born, live, die and then do the same thing over again.
Quote  
[-] The following 1 user says Thank You to Gi Nattak for this post:
  • Lightning (10-17-2018)

#30
Posts: 311
Threads: 20
Thanks Received: 0
Thanks Given: 0
Joined: Dec 2017
Reputation: 2
Status
None
(10-17-2018, 05:28 PM)Gi Nattak Wrote: I know next to nothing when it comes to assembly code, but this one's simple, you'd just need to add in another exception for the Floating Continent background. The Floating Continent Background is: ID $15 Floating Island.
Can check the background IDs on the wiki: https://www.ff6hacking.com/wiki/doku.php...ackgrounds

So like...
Code:
hirom

org $C2BDB7
JSR free_space
NOP

org $C2CE2B          ; change to free space
free_space:
LDA $C2BF3B,X
CMP #$24             ; check if battle song
BNE exit             ; branch if not
LDA $11E2            ; load battle background byte
AND #$3F             ; isolate battle background
BEQ is_wor_grass
CMP #$01
BEQ is_wob_forest
CMP #$02
BEQ is_wob_desert
CMP #$03
BEQ is_wor_forest
CMP #$05
BEQ is_wob_grass
CMP #$2F
BEQ is_wor_desert
CMP #$16
BEQ is_kefka1
CMP #$28
BEQ is_kefka2
CMP #$15
BEQ is_floating_island
LDA #$24             ; default battle song ID
BRA exit
is_wob_grass:
LDA #$10             ; song ID
BRA exit
is_wob_forest:
LDA #$11             ; song ID
BRA exit
is_wob_desert:
LDA #$12             ; song ID
BRA exit
is_wor_forest:
LDA #$13             ; song ID
BRA exit
is_wor_grass:
LDA #$14             ; song ID
BRA exit
is_wor_desert:
LDA #$15             ; song ID
BRA exit
is_kefka1:
LDA #$16             ; song ID
BRA exit
is_kefka2:
LDA #$17             ; song ID
BRA exit
is_floating_island:
LDA #$18             ; song ID
exit:
RTS

Notice the Floating Continent has been added now.


Thanks for that link!  I didn't know how Madsiur was getting the background IDs.  Now I have also added the mountains and Magitek facility. Maybe this patch will cover all backgrounds by the time I'm finished. Lol.
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite