Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Lenophis

1531
Game Modification Station / Re: FF6 - possible bug
« on: January 31, 2008, 05:17:27 PM »
Maybe it's just me, but there seems to be problems regarding when something updates (most of these bugs documented of course).
It appears this is one of those bugs.

Quote
The only thing I can think of is running some sort of trace to look for the item usage code.. or specifically command execution...
When you confirm to use the item, this code is run:

Code: [Select]
C2/4D89: DA           PHX
C2/4D8A: 5A           PHY
C2/4D8B: 9B           TXY
C2/4D8C: C9 17        CMP #$17   
C2/4D8E: D0 02        BNE $4D92   (Branch if not X-Magic)
C2/4D90: A9 02        LDA #$02    (Set command to Magic)

C2/4D92: C9 19        CMP #$19   
C2/4D94: D0 11        BNE $4DA7   (Branch if not Summon)
C2/4D96: 48           PHA
C2/4D97: EB           XBA
C2/4D98: C9 FF        CMP #$FF    (Check if no Esper equipped)
C2/4D9A: D0 03        BNE $4D9F
C2/4D9C: B9 44 33     LDA $3344,Y
C2/4D9F: EB           XBA
C2/4DA0: B9 18 30     LDA $3018,Y
C2/4DA3: 0C 2E 3F     TSB $3F2E   
C2/4DA6: 68           PLA

C2/4DA7: C9 01        CMP #$01
C2/4DA9: F0 04        BEQ $4DAF   (Branch if Item)
C2/4DAB: C9 08        CMP #$08
C2/4DAD: D0 05        BNE $4DB4   (Branch if not Throw)
C2/4DAF: EB           XBA
C2/4DB0: 99 F4 32     STA $32F4,Y (store as item to add back to inventory.  this can
                                   happen with:
                                   1) Equipment Magic that doesn't destroy the item
                                      [no items have this, but the game supports it]
                                   2) the item user's turn never happens.  perhaps the
                                      character who acted before them won the battle.)
C2/4DB3: EB           XBA

C2/4DB4: C9 0F        CMP #$0F
C2/4DB6: D0 23        BNE $4DDB   (Branch if not Slot)
C2/4DB8: 48           PHA         (save command #)
C2/4DB9: EB           XBA           (get our Slot index)
C2/4DBA: AA           TAX
C2/4DBB: BF 4A 4E C2  LDA $C24E4A,X   (get spell # used by this Slot combo)
C2/4DBF: E0 02        CPX #$02
C2/4DC1: B0 0F        BCS $4DD2       (branch if it's Bahamut or higher -- i.e. neither form
                                       of Joker Doom)
C2/4DC3: 48           PHA             (save spell #)
C2/4DC4: BF 52 4E C2  LDA $C24E52,X   (get Joker Doom targeting)
C2/4DC8: 95 B8        STA $B8,X       (if X is 0 [7-7-Bar], mark all party members in $B8
                                       if X is 1 [7-7-7], mark all enemies in $B9)
C2/4DCA: A5 B8        LDA $B8
C2/4DCC: 4D 40 3A     EOR $3A40     
C2/4DCF: 85 B8        STA $B8         (toggle whether characters acting as enemies are targeted.
                                       e.g. Shadow in Colosseum or Gau returning from Veldt leap)
C2/4DD1: 68           PLA             (restore spell #)
C2/4DD2: C9 FF        CMP #$FF
C2/4DD4: D0 03        BNE $4DD9   (branch if not Bar-Bar-Bar)
C2/4DD6: 20 DC 37     JSR $37DC   (Pick random esper)
C2/4DD9: EB           XBA
C2/4DDA: 68           PLA         (restore command #)

C2/4DDB: C9 13        CMP #$13
C2/4DDD: D0 0D        BNE $4DEC   (Branch if not Dance)
C2/4DDF: 48           PHA
C2/4DE0: EB           XBA
C2/4DE1: 99 E1 32     STA $32E1,Y
C2/4DE4: 8D 6F 3A     STA $3A6F
C2/4DE7: 20 9C 05     JSR $059C   (Pick dance and dance move)
C2/4DEA: EB           XBA
C2/4DEB: 68           PLA

C2/4DEC: C9 10        CMP #$10
C2/4DEE: D0 0A        BNE $4DFA   (Branch if not Rage)
C2/4DF0: 48           PHA
C2/4DF1: EB           XBA
C2/4DF2: 99 A8 33     STA $33A8,Y (Which rage is being used)
C2/4DF5: 20 D1 05     JSR $05D1   (Picks a Rage [when Muddled/Berserked/etc], and picks
                                   the Rage move)
C2/4DF8: EB           XBA
C2/4DF9: 68           PLA

C2/4DFA: C9 0A        CMP #$0A
C2/4DFC: D0 15        BNE $4E13   (Branch if not Blitz)
C2/4DFE: 48           PHA
C2/4DFF: EB           XBA
C2/4E00: 48           PHA
C2/4E01: 30 0D        BMI $4E10   (If no blitz selected)
C2/4E03: AA           TAX
C2/4E04: 20 57 1E     JSR $1E57
C2/4E07: 2C 28 1D     BIT $1D28
C2/4E0A: D0 04        BNE $4E10   (Branch if selected blitz is known)
C2/4E0C: A9 FF        LDA #$FF
C2/4E0E: 83 01        STA $01,S   (replace spell/attack # with null)
C2/4E10: 68           PLA
C2/4E11: EB           XBA
C2/4E12: 68           PLA

C2/4E13: A2 04        LDX #$04
C2/4E15: DF 3C 4E C2  CMP $C24E3C,X   (does our command match one that needs its
                                       spell # calculated?)
C2/4E19: D0 0B        BNE $4E26       (branch if not)
C2/4E1B: EB           XBA
C2/4E1C: 18           CLC
C2/4E1D: 7F 41 4E C2  ADC $C24E41,X   (add the first spell # for this command to our
                                       current index.  ex - for Pummel, Blitz #0, we'd
                                       end up with 55h.)
C2/4E21: 90 02        BCC $4E25       (branch if the spell # didn't overflow)
C2/4E23: A9 EE        LDA #$EE        (load Battle as spell #)
C2/4E25: EB           XBA             (put spell # in top of A, and look at command # again)
C2/4E26: CA           DEX
C2/4E27: 10 EC        BPL $4E15       (loop for all 5 commands)

C2/4E29: 48           PHA
C2/4E2A: 18           CLC             (clear Carry)
C2/4E2B: 20 17 52     JSR $5217       (X = A DIV 8, A = 2 ^ (A MOD 8) )
C2/4E2E: 3F 46 4E C2  AND $C24E46,X   (compare to bitfield of commands that need to retarget)
C2/4E32: F0 04        BEQ $4E38       (Branch if command doesn't need to retarget)
C2/4E34: 64 B8        STZ $B8   
C2/4E36: 64 B9        STZ $B9         (clear targets)
C2/4E38: 68           PLA
C2/4E39: 7A           PLY
C2/4E3A: FA           PLX
C2/4E3B: 60           RTS

When the item is used, this code is run:

Code: [Select]
Item
C2/1897: 9C 14 34     STZ $3414   (Set ignore damage modification)
C2/189A: A9 80        LDA #$80
C2/189C: 14 B3        TRB $B3     (Set Ignore Clear)
C2/189E: BB           TYX
C2/189F: A9 01        LDA #$01
C2/18A1: 8D 12 34     STA $3412
C2/18A4: AD 7D 3A     LDA $3A7D
C2/18A7: 20 C1 19     JSR $19C1
C2/18AA: A9 10        LDA #$10
C2/18AC: 14 B1        TRB $B1     (clear "don't deplete from Item inventory" flag)
C2/18AE: D0 05        BNE $18B5   (branch if it was set)
C2/18B0: A9 FF        LDA #$FF
C2/18B2: 9D F4 32     STA $32F4,X  (null item index to add to inventory.  this means
                                    the item will stay deducted from your inventory.)
C2/18B5: BD 18 30     LDA $3018,X
C2/18B8: 0C 8C 3A     TSB $3A8C      (set this character's "add item to inventory" bit)
C2/18BB: A5 B5        LDA $B5    (Command #)
C2/18BD: 90 24        BCC $18E3  (Carry is set (by the $19C1 call) for:
  - Skeans/Tools that don't use a spell
                                  - normal Item usage
                                  which means it isn't set for:
                                  - Equipment Magic or Skeans/Tools that do use a spell )
 
C2/18BF: C9 02        CMP #$02   (Carry will be set if Command >=2, which means it'll
                                  be set for Throw and Tools, but not plain Item --
                                  or apparently Item Magic, which also uses Command 1)

C2/18C1: AD 11 34     LDA $3411
C2/18C4: 20 37 2A     JSR $2A37
C2/18C7: AD AA 11     LDA $11AA
C2/18CA: 89 C2        BIT #$C2    (Check if Dead, Petrify or Zombie attack)
C2/18CC: D0 12        BNE $18E0   (if so, branch)
C2/18CE: C2 20        REP #$20    (Set 16-bit Accumulator)
C2/18D0: AD 74 3A     LDA $3A74
C2/18D3: 0D 42 3A     ORA $3A42
C2/18D6: 25 B8        AND $B8
C2/18D8: 85 B8        STA $B8
C2/18DA: E2 20        SEP #$20    (Set 8-bit Accumulator)
C2/18DC: A9 04        LDA #$04
C2/18DE: 14 B3        TRB $B3
C2/18E0: 4C 7B 31     JMP $317B

C2/18E3: C9 01        CMP #$01    (is command Item?)
C2/18E5: D0 07        BNE $18EE   
C2/18E7: E6 B5        INC $B5     (if so, bump it up to Magic, as we've reached this
                                   point thanks to Equipment Magic)
C2/18E9: AD 10 34     LDA $3410
C2/18EC: 85 B6        STA $B6
C2/18EE: 64 BD        STZ $BD
C2/18F0: 20 51 29     JSR $2951
C2/18F3: A9 02        LDA #$02
C2/18F5: 0C A3 11     TSB $11A3   (Set Not reflectable)
C2/18F8: A9 20        LDA #$20
C2/18FA: 0C A4 11     TSB $11A4   (Set unblockable)
C2/18FD: A9 08        LDA #$08
C2/18FF: 14 BA        TRB $BA     (Clear "can target dead/hidden targets")
C2/1901: 9C A5 11     STZ $11A5   (Set MP cost to 0)
C2/1904: 4C 7B 31     JMP $317B

My first attempt to fix it was at the item use, but that turned out to be less than successful.

1532
Gaming Discussion / Re: Movies of playthrus
« on: January 31, 2008, 02:46:37 PM »
This is something I meant to post yesterday. Question, has anybody ever experienced the following:





The game is stuck at that point, but that probably appears obvious. To show it in action, I've made a movie of how to do it. Requires Sonic & Knuckles attached to Sonic 2, and Gens+. This bug is also much more difficult to pull off with Sonic, so don't attempt it unless you have some patience. :tongue:

1533
Game Modification Station / Re: FF6 - possible bug
« on: January 31, 2008, 01:01:27 PM »
Ok, I found where the item is initially being adding to the reserve.

Code: [Select]
C2/4DA7: C9 01        CMP #$01
C2/4DA9: F0 04        BEQ $4DAF   (Branch if Item)
C2/4DAB: C9 08        CMP #$08
C2/4DAD: D0 05        BNE $4DB4   (Branch if not Throw)
C2/4DAF: EB           XBA
C2/4DB0: 99 F4 32     STA $32F4,Y (store as item to add back to inventory.  this can
                                   happen with:
                                   1) Equipment Magic that doesn't destroy the item
                                      [no items have this, but the game supports it]
                                   2) the item user's turn never happens.  perhaps the
                                      character who acted before them won the battle.)
C2/4DB3: EB           XBA

Simply adding a hook there wouldn't work though. As Kejar pointed it out to me last night, it'd make all items bottomless. $3A8C isn't tweaked until the item is actually used though. It seems like this is where it needs to be done, but I'm currently unsure as to how. Any ideas?

1534
Game Modification Station / Re: FF6 - possible bug
« on: January 31, 2008, 01:57:05 AM »
Ok, my attempt to fix the bug instead caused it to occur more frequently (maybe even 100%, I dunno, what's 1/1?) :tongue: This is where I tried to put it:

Code: [Select]
Item
C2/1897: 9C 14 34     STZ $3414   (Set ignore damage modification)
C2/189A: A9 80        LDA #$80
C2/189C: 14 B3        TRB $B3     (Set Ignore Clear)
C2/189E: BB           TYX
C2/189F: A9 01        LDA #$01
C2/18A1: 8D 12 34     STA $3412
C2/18A4: AD 7D 3A     LDA $3A7D
C2/18A7: 20 C1 19     JSR $19C1
C2/18AA: A9 10        LDA #$10
C2/18AC: 14 B1        TRB $B1     (clear "don't deplete from Item inventory" flag)
C2/18AE: D0 05        BNE $18B5   (branch if it was set)
C2/18B0: A9 FF        LDA #$FF
C2/18B2: 9D F4 32     STA $32F4,X  (null item index to add to inventory.  this means
                                    the item will stay deducted from your inventory.)
C2/18B5: BD 18 30     LDA $3018,X
C2/18B8: 0C 8C 3A     TSB $3A8C      (set this character's "add item to inventory" bit)

My hook was at C2/18B5, and C2/18B8 was NOP'ed out and included in the hook. After that, I saved the indexes and processor, then called $62C7.

*currently out of ideas*

1535
General Discussion / Re: The official "Happy Birthday" thread!
« on: January 31, 2008, 12:08:48 AM »
Leno, you're old.
Fix'ed. :wink:

Quote
Happy Bday to you and the others I missed.
Uh... Happy birthday
:cycle:

1536
Game Modification Station / Re: Temporal Flux 2.75 Release.
« on: January 30, 2008, 11:18:07 PM »
Still no monster, item, and character editor?
Apparently he doesn't think too highly of those. :sad: They are too simple to not add, so I see no reason or excuse as to why they aren't there yet.

1537
General Discussion / Re: Minnesota + trading = bad
« on: January 30, 2008, 12:17:46 PM »
:laugh: Oh man. I don't know how to respond to that.

1538
General Discussion / Re: The official "Happy Birthday" thread!
« on: January 30, 2008, 12:10:15 PM »
Thanks. :cycle:

1539
General Discussion / Re: Minnesota + trading = bad
« on: January 30, 2008, 03:00:42 AM »
Boston thanks Minnesota for David Ortiz too.  :happy:
Ugh, I didn't need to be reminded of that again. :sad:

Quote
A wild cap?
Our hockey team. The northwest division is so tightly packed, the analysts are predicting 4 of the 5 teams to make it into the playoffs this year. That's insane. :tongue:

1540
Game Modification Station / Re: FF6 - possible bug
« on: January 30, 2008, 02:57:47 AM »
i don't think you need to have their ATB refilled, but rather change from one character to another with X or Y.  iirc, the Item List you see can't update while you're just sitting on a character's main battle menu as somebody else is altering the Item inventory.  so it's the same deal with Stolen items.   X/Y triggers the "refresh".
Yeah, that was explained to me earlier tonight. Kejar's pretty sure that if the inventory were to be updated immediately after $32F4's array is written to, the bug will be crushed. I haven't tested it yet, but that's what I'll try, and ask Gil to try as well.

1541
General Discussion / Minnesota + trading = bad
« on: January 29, 2008, 11:33:47 PM »
Ok, there was one exception with the AJ for Liriano, Nathan, and Bonser trade, but other than that one, this state sucks at it. As many of you may remember, before the season started, Kevin Garnett was traded to Boston, and got a bunch of junk in return. A couple years ago, Randy Moss was traded to Oakland for Napolean Harris, and before that the Vikings were idiots for giving up an entire draft for Hershel Walker. Well, as if they feel the need to outdo themselves yet again, the Twins traded Johan Santana to the Mets for 4 goddamn prospects.
:wtf:

I don't know why I'm surprised. The Twins are always trading for the future, even when they are a winning club. They even trade the future, for the future. But they traded the best left-handed pitcher in 50 years... :bah: They signed Morneau and Cuddyer to long-term deals, but what the hell good will it do with one pitcher in the rotation?

Ugh, I'm now almost ready to swear off all loyalties to that ball club. *ponders wearing a Vikings or Wild cap*

1542
Game Modification Station / Re: FF6 - possible bug
« on: January 29, 2008, 03:28:19 PM »
Well, isn't it worth pointing out that this array is borked regarding the Thief Glove+Offering?
Yeah, since there's only one byte per character, only the first item stolen can be added. Since all this does is one item at a time, it shouldn't be a factor. Then again, this is Square we're talking about. :tongue:

Quote
Maybe it is doing something similar there.
That's why I was trying various ways to replicate the bug, (other characters using items, ending battle before items could be used, etc) and I haven't been able to replicate it yet. Gil hadn't used Imzog's Multi-steal fix before this post, and had lost many rods and shields. He has since used that patch, but I haven't asked him if it's been happened again though.

1543
Game Modification Station / Re: FF6 - possible bug
« on: January 29, 2008, 03:01:22 PM »
Ok, in an attempt to find the cause, I've stumbled onto something that seems odd.

$32F4 is the array of "items to be re-added." Whenever an item is stolen, it is put in this array, and then added. Keeping an eye on it, it is blanked immediately after an item is used, whether the "don't deplete item" is set or not. This indicates that the item is being re-added immediately after it is used, but we know this to be false. The item doesn't reappear in inventory until the character that uses it gets their ATB refilled. This suggests a behavior similar to "Control doesn't update with MP cost," but it's different because the item isn't always being re-added.

The code looks pretty solid, so I'm not sure why it's being inconsistent. *keeps digging*

1544
Gaming Discussion / Re: As expected this forum is teh suck [Eyes on FF]
« on: January 27, 2008, 01:54:44 PM »
In an ironic twist of fate, the person that responded to you at that board has edited his/her post.

Quote
Edit: Wow, sorry about that I guess. Basically I just restated what you said in your youtube video's, you integrated songs into other games.

I don't see how coding a song from an emulator game to another is something that would musically excite me. Congrats on being able to make it so zone songs in one game are from different games, but I guess I'm not one of those people who are naturally excited about it.
Also, leaving a forum because one person (even if you were expecting it) isn't that great, I'm sure you have other coding talents that don't involve replacing game songs, you can always show us those.

1545
General Discussion / Re: File attachments
« on: January 27, 2008, 01:40:08 PM »
Oh, ok. Never mind then.
How big is it compressed?