12-14-2018, 03:16 PM
yeah you need to write your table entries as "db $56" instead of "56". Also you might want to change the two ".exit" to "exit" but those error might be cause by previous ones I'm not sure.
(12-14-2018, 03:16 PM)madsiur Wrote: [ -> ]yeah you need to write your table entries as "db $56" instead of "56". Also you might want to change the two ".exit" to "exit" but those error might be cause by previous ones I'm not sure.
hirom
header
org $C2BDB7
JSR free_space
NOP
org $C264C9 ; change to free space
free_space:
TDC
LDA $C2BF3B,X ; load formation song
CMP #$24 ; check if battle song
BNE exit ; branch if not
LDA $11E2 ; load battle background byte
AND #$3F ; isolate battle background
REP #$20
TAX ; set BG as index
SEP #$20
LDA table,X ; load BG song ID
exit:
RTS
; your $37 song IDs
; this table can be anywhere in the ROM:
org $F15550 ;(uncomment and change to move table elsewhere)
table:
db $56 ; W O B Grass
db $57 ; WOR Forest
db $66 ; W O B Desert
db $00 ; song ID for 4th background
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
db $00
(12-14-2018, 04:53 PM)madsiur Wrote: [ -> ]I dunno, remove the TDC and try "LDA $00, XBA" after the "BNE exit". If it still fail, set a breakpoint at your new code with bsnes+ and post the debugger trace.
hirom
header
org $C2BDB7
JSR free_space
NOP
org $C264C9 ; change to free space
free_space:
TDC
LDA $C2BF3B,X ; load formation song
CMP #$24 ; check if battle song
BNE exit ; branch if not
LDA $11E2 ; load battle background byte
AND #$3F ; isolate battle background
REP #$20
TAX ; set BG as index
SEP #$20
LDA table,X ; load BG song ID
exit:
RTS
; your $37 song IDs
; this table can be anywhere in the ROM:
org $F15550 ;(change this to move table elsewhere)
table:
db $56 ; W O B Grass
db $57 ; WOR Forest
db $66 ; W O B Desert
db $5B ; W O B Forest
db $6A ; Building
db $6E ; WOR Grass
db $24 ; The Veldt
db $24 ; Falling through clouds
db $24 ; Narshe Exterior
db $24 ; Narshe Cave with Mine Tracks
db $6D ; Common Brown Cave
db $61 ; Mountain Outside
db $61 ; Mountain Cave
db $5C ; Raft on River
db $24 ; Imperial Base
db $74 ; On top of train car
db $74 ; inside train car
db $6D ; Blue Narshe Secret Entrance Cave and Umaro Cave
db $71 ; Icy Field
db $24 ; Bright Town
db $58 ; Vector Inside / Kefkas Tower Interior
db $62 ; Floating Continent
db $59 ; Kefka's Tower Exterior
db $24 ; Opera Stage
db $24 ; Opera House Rafters
db $5F ; Flaming House
db $77 ; Ancient Castle interior and Figaro Castle basement
db $64 ; Magitek Research (Testing Tubes)
db $6B ; Colosseum
db $72 ; Magitek Facility
db $24 ; Village
db $5F ; Waterfall
db $24 ; Owzer's House
db $24 ; Running on Train Tracks
db $24 ; Bridge near Sealed Gate
db $24 ; Underwater
db $6A ; Zozo
db $24 ; Airship, WOB, Centered
db $76 ; Tomb
db $77 ; Ancient Castle Exterior Ruins and Doma Castle
db $59 ; Kefka's Tower
db $24 ; Airship WOR Right
db $6C ; Red Lava Cave
db $24 ; Light Building
db $24 ; Magitek Cart Ride
db $24 ; Fanatic's Tower
db $64 ; Cyan's Dream World
db $55 ; WOR Desert
db $24 ; Airship, Wob, Right
db $24 ; Unused
db $24 ; Unused
db $24 ; Statue 1 (Doom)
db $24 ; Statue 2 (Poltergeist)
db $24 ; Statue 3 (Goddess Minerva)
db $24 ; Kefka's Background
db $24 ; Tentacles
(07-11-2021, 03:22 PM)Lightning Wrote: [ -> ]Would it be exceedingly difficult to have the Magitek facility background play different music in the WOR (Kefka's Tower) than in the WOB (Magitek facility)?
(07-11-2021, 03:52 PM)madsiur Wrote: [ -> ](07-11-2021, 03:22 PM)Lightning Wrote: [ -> ]Would it be exceedingly difficult to have the Magitek facility background play different music in the WOR (Kefka's Tower) than in the WOB (Magitek facility)?
You can skip ASM code for that and do it by events. There's a WoR event bit, in the entrance event of the map check if it is set and if so use a "Play song" event command with the WoR track ID. I think that would work.
(07-11-2021, 04:11 PM)Lightning Wrote: [ -> ]So you are saying that each map (which I'm guessing there are maps for each themed area) have a way to change the battle theme for that one area only? I have two questions about this method though. Will it affect the battle background code already in place by the ASM hack, and also, can I figure out where these events are by only hex editing? After all, my 1.1 rom is corrupted and event editors will not allow me to save (consequences of basing my hack on General Leo edition).