Users browsing this thread: 2 Guest(s)
Random battle theme
12-14-2018, 03:28 PM
(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.
Ok, if I change the code to the following there are no more compile errors, but now the music is just the default in-game for the 3 backgrounds I changed:
Code:
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
« Next Oldest | Next Newest »
|
||||
Users browsing this thread: 2 Guest(s)