Users browsing this thread: 1 Guest(s)
FF6LE and event triggers

#1
Posts: 3,970
Threads: 279
Thanks Received: 236
Thanks Given: 58
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
I already posted the same questions on slick production but here we go:

I would like to be able to create more event trigger or event tiles than FF6LE limit us by moving that data in the ROM. That can be easily done and movin the pointers also but I have a few questions:

1) how does the game recognize which event trigger goes on which map since that data is only 5 bytes long ( X position, y position and 3 bytes for the event offset)? I ask that because if I add a new trigger manually, I suppose I can't just put it at the end of all the others. It must be regrouped with the others triggers who are on the same map... So how does the game recognize or calculate the number of triggers on the same map?

2) my second question is related to the function that loads the pointers and go to the correct event trigger and then loads the correct event. I suspect that function would be in the C0 bank but since my knowledge of that kind of coding is limited I would just like know if I found the correct function where the pointer of a event trigger is loaded:

Code:
C0/BC6F:    A584        LDA $84        (from C0/00D4)
C0/BC71:    D05C        BNE $BCCF
C0/BC73:    A559        LDA $59
C0/BC75:    D058        BNE $BCCF
C0/BC77:    AC0308      LDY $0803
C0/BC7A:    B96A08      LDA $086A,Y
C0/BC7D:    290F        AND #$0F
C0/BC7F:    D04E        BNE $BCCF
C0/BC81:    B96908      LDA $0869,Y
C0/BC84:    D049        BNE $BCCF
C0/BC86:    B96D08      LDA $086D,Y
C0/BC89:    290F        AND #$0F
C0/BC8B:    D042        BNE $BCCF
C0/BC8D:    B96C08      LDA $086C,Y
C0/BC90:    D03D        BNE $BCCF
C0/BC92:    A6E5        LDX $E5
C0/BC94:    E00000      CPX #$0000
C0/BC97:    D036        BNE $BCCF
C0/BC99:    A5E7        LDA $E7
C0/BC9B:    C9CA        CMP #$CA
C0/BC9D:    D030        BNE $BCCF
C0/BC9F:    B97C08      LDA $087C,Y
C0/BCA2:    290F        AND #$0F
C0/BCA4:    C902        CMP #$02
C0/BCA6:    D027        BNE $BCCF
C0/BCA8:    C220        REP #$20      (16 bit accum./memory)
C0/BCAA:    A582        LDA $82
C0/BCAC:    0A          ASL A
C0/BCAD:    AA          TAX
C0/BCAE:    BF0200C4    LDA $C40002,X
C0/BCB2:    851E        STA $1E
C0/BCB4:    BF0000C4    LDA $C40000,X
C0/BCB8:    C51E        CMP $1E
C0/BCBA:    F013        BEQ $BCCF
C0/BCBC:    AA          TAX
C0/BCBD:    BF0000C4    LDA $C40000,X
C0/BCC1:    C5AF        CMP $AF
C0/BCC3:    F00E        BEQ $BCD3
C0/BCC5:    8A          TXA
C0/BCC6:    18          CLC
C0/BCC7:    690500      ADC #$0005
C0/BCCA:    AA          TAX
C0/BCCB:    E41E        CPX $1E
C0/BCCD:    D0EE        BNE $BCBD
C0/BCCF:    7B          TDC
C0/BCD0:    E220        SEP #$20      (8 bit accum./memory)
C0/BCD2:    60          RTS


From what I think I understand, near the end of the function (C0/BCAE) the value of two pointers are compared to each other then if they are equals we branch at $BCCF, if not there is a transfer from A to X and then the value of the pointer loaded from the same place is compared to AF$ and I really don't know what $AF hold as data. Anyway I'm not even sure if I'm looking at the right thing. So a little bit of help in assembly would be appreciated...

I think that if I change the value of the (LDA $C40002,X) and the (LDA $C40000,X) to the new offset where I moved the pointers and the event triggers I should be okay...
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite