Users browsing this thread: 1 Guest(s)
Random battle theme
You have to do something like this:
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 $F35000 (uncomment and change to move table elsewhere)
table:
00 ; song ID for 1st background
00 ; song ID for 2nd background
00 ; song ID for 3rd background
00 ; song ID for 4th background
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
« Next Oldest | Next Newest »
|
||||
Users browsing this thread: 1 Guest(s)