Users browsing this thread: 2 Guest(s)
Pony Fantasy VI Remake
07-04-2017, 06:38 PM
(This post was last modified: 07-06-2017, 04:51 PM by assassin.
Edit Reason: more assemblable, then take no free space, then properly defined data, then remove earth-shattering bug
)
come to think of it, i believe Bank C3 calls C2 for this, as i'm not finding any $D85008 or $D85009 references in the former bank. so it shouldn't be too involved; just this one function.
a similar-sized way to what i posted would be to use a data table:
one advantage is the code and data don't require contiguous free space.
a similar-sized way to what i posted would be to use a data table:
Code:
hirom
header
org $C20EFA
lda #$05
JSR setup_boost_HP_or_MP
org $C20F0B
lda #$02
JSR setup_boost_HP_or_MP
org $C20F7D
setup_boost_HP_or_MP:
pha
tdc
pla ; clear upper A so it doesn't corrupt upper X
phx
tax
lda $11d5
loop:
lsr
dex
bne loop ; always iterates at least once, so not truly robust
and #$07
tax
lda.l data,x ; hope that's proper format for 24-bit label
plx
rts
; org $C2????
data:
db $00
db $40
db $80
db $80
db $C0
db $80
db $80
db $80
;nop
;nop
;nop ; 0 bytes to spare, now. :|
one advantage is the code and data don't require contiguous free space.
« Next Oldest | Next Newest »
Users browsing this thread: 2 Guest(s)