Users browsing this thread: 2 Guest(s)
Pony Fantasy VI Remake
07-04-2017, 02:02 PM
(This post was last modified: 07-04-2017, 03:51 PM by assassin.
Edit Reason: code correction
)
you'd still have to rewrite C2/0F7D et al, this time to make their flag setting cumulative; they currently exit after putting their first flag value in A. you'd also need to swap entries in the C2/2859 pointer table (not hard).
the C2/0F7D rewrite i was alluding to in my previous post wouldn't mark flags cumulatively, but rather return 80h if it detected both 12.5% and 25% original flags set. C2/2859 would be untouched.
see, C2/0F7D does two things:
- takes 3 possible input bits regarding HP or MP, and outputs a 2-bit value in Bits 6-7 (which become Bits 14-15).
- outputs to Bits 6-7 regardless of whether input is coming from $11D5 Bits 2-4 (HP) or Bits 5-7 (MP).
also, either reworking method would require rewriting Bank C3 code to use the new system.
anyway, here's a longer C2/0F85 that might work:
using 16-bit Y to hold 0000h or 0040h might reduce the XBAs and branches needed.
or if we could find a way to zero the top half of A before calling C2/0F7D (+2 bytes), we could drop the "bra try_125" thru "lda #$00" (-5 bytes).
the C2/0F7D rewrite i was alluding to in my previous post wouldn't mark flags cumulatively, but rather return 80h if it detected both 12.5% and 25% original flags set. C2/2859 would be untouched.
see, C2/0F7D does two things:
- takes 3 possible input bits regarding HP or MP, and outputs a 2-bit value in Bits 6-7 (which become Bits 14-15).
- outputs to Bits 6-7 regardless of whether input is coming from $11D5 Bits 2-4 (HP) or Bits 5-7 (MP).
also, either reworking method would require rewriting Bank C3 code to use the new system.
anyway, here's a longer C2/0F85 that might work:
Code:
LSR
BIT $11D5
beq no_25
xba
lda #$40
bra try_125
no_25:
xba
lda #$00
try_125:
xba
ASL
ASL
BIT $11D5
BEQ use_25_result
xba
EOR #$C0
RTS
use_25_result:
XBA
RTS
or if we could find a way to zero the top half of A before calling C2/0F7D (+2 bytes), we could drop the "bra try_125" thru "lda #$00" (-5 bytes).
« Next Oldest | Next Newest »
Users browsing this thread: 2 Guest(s)