øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=17.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index2978.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&board=8.340e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index2978.html.zxE(h^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈà•¤`ÀOKtext/htmlISO-8859-1gzip8:Ö`ÀÿÿÿÿÿÿÿÿWed, 11 Mar 2020 00:09:02 GMT0ó°° ®0®P®€§²ð®E(h^ÿÿÿÿÿÿÿÿM `À FF6 hacking help topic (again)

Author Topic: FF6 hacking help topic (again)  (Read 2956 times)

Leviathan Mist

  • Schizophrenic Madman
  • *
  • Posts: 362
  • Gender: Male
  • Game over.
    • View Profile
    • Retro Gaming Central
FF6 hacking help topic (again)
« on: November 16, 2007, 06:37:16 PM »
Okay, let's try this again...I was in the process of going to save all that info Lenophis gave me yesterday, when the site shut down. Is there a way to get that topic back? If not, then I'll go over what I was working on yesterday.

Firstly, I want to disable Ragnarok from being summoned via Setzer's bar slots/Magicite item. Second, I want to remove the inherent +20 to speed in the battle formula.

Lenophis

  • Forum Overlord
  • *
  • Posts: 1,688
  • Gender: Male
  • I sad
    • View Profile
    • Slick Productions
Re: FF6 hacking help topic (again)
« Reply #1 on: November 16, 2007, 07:09:03 PM »
I can just repost the info for ya.

First, the original esper selection code:

Code: [Select]
Pick a random Esper (not Odin or Raiden)

C2/37DC: A9 19        LDA #$19
C2/37DE: 20 65 4B     JSR $4B65   (0 to $18)
C2/37E1: C9 0B        CMP #$0B
C2/37E3: 90 02        BCC $37E7   (Branch if A < $0B)
C2/37E5: 1A           INC         (Add 2 if over $0B)
C2/37E6: 1A           INC
C2/37E7: 18           CLC
C2/37E8: 69 36        ADC #$36
C2/37EA: 60           RTS

All three versions of what I propose to fix it will require this routine either be moved elsewhere, or you branch out to new space after you've filled up the old one.

Code: [Select]
Pick a random Esper (not Odin, Raiden, or Ragnarok version 1)
this version will keep trying for another esper if Ragnarok is selected

C2/xxxx: A919    LDA #$19    (BEQ branches here)
C2/xxxx: 20654B  JSR $4B65   (0 to $18)
C2/xxxx: C90B    CMP #$0B
C2/xxxx: 9002    BCC $37E7   (Branch if A < $0B)
C2/xxxx: 1A      INC A       (Add 2 if over $0B)
C2/xxxx: 1A      INC A
C2/xxxx: C910    CMP #$10
C2/xxxx: F0F3    BEQ $xxxx   (branch to LDA #$19)
C2/xxxx: 18      CLC
C2/xxxx: 6936    ADC #$36
C2/xxxx: 60      RTS

Pick a random Esper (not Odin, Raiden, or Ragnarok version 2)
this version will make the esper selection Kirin if Ragnarok is selected

C2/xxxx: A919    LDA #$19
C2/xxxx: 20654B  JSR $4B65   (0 to $18)
C2/xxxx: C90B    CMP #$0B
C2/xxxx: 9002    BCC $37E7   (Branch if A < $0B)
C2/xxxx: 1A      INC A       (Add 2 if over $0B)
C2/xxxx: 1A      INC A
C2/xxxx: C910    CMP #$10
C2/xxxx: D001    BNE $xxxx
C2/xxxx: 1A      INC A
C2/xxxx: 18      CLC
C2/xxxx: 6936    ADC #$36
C2/xxxx: 60      RTS

Pick a random Esper (not Odin, Raiden, or Ragnarok version 3)
this version will make the esper selection Crusader (ouch!) if Ragnarok is selected

C2/xxxx: A919    LDA #$19
C2/xxxx: 20654B  JSR $4B65   (0 to $18)
C2/xxxx: C90B    CMP #$0B
C2/xxxx: 9002    BCC $37E7   (Branch if A < $0B)
C2/xxxx: 1A      INC A       (Add 2 if over $0B)
C2/xxxx: 1A      INC A
C2/xxxx: C910    CMP #$10
C2/xxxx: D001    BNE $xxxx
C2/xxxx: 3A      DEC A
C2/xxxx: 18      CLC
C2/xxxx: 6936    ADC #$36
C2/xxxx: 60      RTS

Now for the battle speed:

Code: [Select]
Battle Time Counter function
(Recalculate the amount by which to increase the ATB gauge. 
 This will also affect the speed of the "wait timer" [which determines how long a
 character is in their ready stance], the Condemned counter, invisible timers
 for auto-expiring statuses, and the frequency of damage/healing from statuses
 like Regen and Poison.)

C2/09D2: 08           PHP
C2/09D3: A0 20        LDY #$20      (ATB multiplier = 32 if slowed)
C2/09D5: BD F8 3E     LDA $3EF8,X
C2/09D8: 89 04        BIT #$04
C2/09DA: D0 08        BNE $09E4     (Branch if Slow)
C2/09DC: A0 40        LDY #$40      (ATB multiplier = 64 normally)
C2/09DE: 89 08        BIT #$08
C2/09E0: F0 02        BEQ $09E4     (Branch if not Haste)
C2/09E2: A0 54        LDY #$54      (ATB multiplier = 84 if hasted)
C2/09E4: 98           TYA
C2/09E5: 9D DD 3A     STA $3ADD,X   (save the ATB multiplier)
C2/09E8: 98           TYA           (this instruction seems frivolous)
C2/09E9: 48           PHA
C2/09EA: 18           CLC
C2/09EB: 4A           LSR
C2/09EC: 63 01        ADC $01,S
C2/09EE: 83 01        STA $01,S     (A = ATB multiplier * 1.5)
C2/09F0: BD 19 3B     LDA $3B19,X   (Speed)
C2/09F3: 69 14        ADC #$14       
C2/09F5: EB           XBA           (Speed + 20 in top byte of Accumulator)
C2/09F6: E0 08        CPX #$08   
C2/09F8: 90 06        BCC $0A00     (branch if not an enemy)
C2/09FA: AD 90 3A     LDA $3A90     (= 255 - (Battle Speed setting * 24) )
                                    (remember that what you see on the Config menu is
                                     Battle Speed + 1)
C2/09FD: 20 81 47     JSR $4781     (A = (speed + 20) * $3A90 )
C2/0A00: 68           PLA           (bottom byte of A is now Slow/Normal/Haste Constant)
C2/0A01: 20 81 47     JSR $4781     (Let C be the Slow/Normal/Haste constant, equal to
                                     48, 96, or 126, respectively.

                                     for characters:
                                      A = (Speed + 20) * C
                                     for enemies:
                                      A = ( ((Speed + 20) * $3A90) DIV 256) * C
C2/0A04: C2 20        REP #$20
C2/0A06: 4A           LSR
C2/0A07: 4A           LSR
C2/0A08: 4A           LSR
C2/0A09: 4A           LSR
C2/0A0A: 9D C8 3A     STA $3AC8,X   (A = A / 16.  amount to increase ATB timer by?)
C2/0A0D: 28           PLP
C2/0A0E: 60           RTS

There are a couple ways to fix it.

  • Change the ADC #$14 to NOP NOP. This will prevent the +20 from occuring.
  • Optimize the routine a little, and check for an overflow (after the ADC #$14, BCC 02, LDA #$FF). I don't know if there will be enough room for it though.
  • Become a madman, and redo the whole thing. :laugh:

Deja vú, anyone? In any event, the easiest solution is the two NOP's in place of the ADC #$14.

And also, since I don't think it was seen last time, can anybody confirm that I have Ragnarok's number correct?

119 bugs fixed and counting.

Leviathan Mist

  • Schizophrenic Madman
  • *
  • Posts: 362
  • Gender: Male
  • Game over.
    • View Profile
    • Retro Gaming Central
Re: FF6 hacking help topic (again)
« Reply #2 on: November 17, 2007, 02:41:01 AM »
Change the ADC #$14 to NOP NOP. This will prevent the +20 from occuring.

I'm no good with assembly...what would that value be in hex? (I use a hex editor to modify the game)

Thanks for all your help though, much appreciated.

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: FF6 hacking help topic (again)
« Reply #3 on: November 17, 2007, 03:30:04 AM »
EA.

Leviathan Mist

  • Schizophrenic Madman
  • *
  • Posts: 362
  • Gender: Male
  • Game over.
    • View Profile
    • Retro Gaming Central
Re: FF6 hacking help topic (again)
« Reply #4 on: November 23, 2007, 05:38:26 AM »
Hey guys, thanks for the info...I finally got around to editing this stuff, and I think I'm good to go for the time being :) I hope my hack is actually worth playing when it's complete.

Odbarc

  • Hell's Rider
  • *
  • Posts: 424
  • Gender: Male
  • FF6 obsessed
    • View Profile
    • Newage3.com, a text based web game RPG I Admin.
Re: FF6 hacking help topic (again)
« Reply #5 on: May 28, 2009, 11:20:30 AM »
Quote
+20 to speed in the battle formula.
What's this?

Leviathan Mist

  • Schizophrenic Madman
  • *
  • Posts: 362
  • Gender: Male
  • Game over.
    • View Profile
    • Retro Gaming Central
Re: FF6 hacking help topic (again)
« Reply #6 on: June 15, 2009, 10:23:07 PM »
When the game calculates how fast your character will be, it automatically adds 20 points to your speed to determine it. This makes it so if your speed stat is above 235 (235+20=255, max byte value for stats), it "rolls over" to 0 and your characters are super slow. For hacks which allow for speed to get higher than 235, you can see how this is a problem :P