Users browsing this thread: 1 Guest(s)
Attempting to create a new event command
04-06-2015, 05:52 PM
I hoped it wasn't necessary to show the updated code, since i already said it was fixed...:
With the new changes A is 8 bit, instead of doing LDX at the beginning i do LDA and then TAX (so it transfers just an 8 bit value... yeah i didn't changed bit n. of X and Y, i didn't knew how to do that before...)
C0/D649: E0 24 00 CPX #$0024
this line now compares to 0024 instead of 24, in this way the value size matches with the one of the value compared.
So it's not that the problem you pointed out in the latest posts... maybe the bit size of X and Y should be changed, when i do the following code?
C0/D64E: BD B0 3E LDA $3EB0,X
C0/D653: B9 AC 3D LDA $3DAC,Y
Please, check this one, while i'm away... ok?
Code:
C0/D613: E2 20 SEP #$20 (8 bit accum./memory)
C0/D615: A5 EB LDA $EB (First byte for FC)
C0/D617: AA TAX
C0/D618: 20 48 D6 JSR $D647 ($EB = variable #X)
C0/D61B: A5 EB LDA $EB (after the JSR the n. of the var is changed into its value)
C0/D61D: C5 EC CMP $EC
C0/D61F: 30 13 BMI (Branch if AA value < BB)
C0/D621: C2 20 REP #$20 (16 bit accum./memory)
C0/D623: A6 ED LDX $ED (Load parameter 3 and 4)
C0/D625: 86 E5 STX $E5 (store the low and middle byte of the offset in $E5)
C0/D627: E2 20 SEP #$20 (8 bit accum./memory)
C0/D629: A5 EF LDA $EF (Load parameter 5)
C0/D62B: 18 CLC (clear carry)
C0/D62C: 69 CA ADC #$CA (Add #$CA to the high byte of the offset)
C0/D62E: 85 E7 STA $E7 (Stre high byte of the offset in $E7)
C0/D630: 5C 6D 9A C0 JMP $C09A6D (Make the event branching/jumping effective)
C0/D634: C2 21 REP #$21
C0/D636: A5 E5 LDA $E5 (Load low and middle byte of current offset)
C0/D638: 69 06 00 ADC #$0006 (Command + parameters length)
C0/D63B: 85 E5 STA $E5 (Save in $E5)
C0/D63D: 7B TDC (Transfer D to C)
C0/D63E: E2 20 SEP #$20 (8 bit accum./memory)
C0/D640: 65 E7 ADC $E7 (Add to A $E7)
C0/D642: 85 E7 STA $E7 (Store A in $E7)
C0/D644: 5C 6D 9A C0 JMP $C09A6D (Make a 6 bytes jump from the command number in the event)
C0/D648: 48 PHA
C0/D649: E0 24 00 CPX #$0024
C0/D64C: B0 05 BCS $D64F
C0/D64E: BD B0 3E LDA $3EB0,X
C0/D651: 80 03 BRA $D652
C0/D653: B9 AC 3D LDA $3DAC,Y
C0/D656: 85 EB STA $EB
C0/D658: 68 PLA
C0/D659: 18 CLC
C0/D65A: 60 RTS
With the new changes A is 8 bit, instead of doing LDX at the beginning i do LDA and then TAX (so it transfers just an 8 bit value... yeah i didn't changed bit n. of X and Y, i didn't knew how to do that before...)
C0/D649: E0 24 00 CPX #$0024
this line now compares to 0024 instead of 24, in this way the value size matches with the one of the value compared.
So it's not that the problem you pointed out in the latest posts... maybe the bit size of X and Y should be changed, when i do the following code?
C0/D64E: BD B0 3E LDA $3EB0,X
C0/D653: B9 AC 3D LDA $3DAC,Y
Please, check this one, while i'm away... ok?
THE GREATEST CHALLENGE OF ALL TIMES AWAITS:
http://www.ff6hacking.com/forums/showthr...p?tid=2593
DO YOU HAVE WHAT IT TAKES TO SLAY A GOD?
------------------------------------------------------------------------
Tenkarider's project #2 is started: FF6 Curse of the Madsiur Joke (CotMJ)
http://www.ff6hacking.com/forums/showthr...p?tid=2755
What happens when Madsiur tweaks your account? This full game hack will show that!
« Next Oldest | Next Newest »
Users browsing this thread: 1 Guest(s)