Author Topic: Passive Dash and Learning for Freelancer  (Read 162 times)

Tzepish

  • Siren
  • *
  • Posts: 71
  • Gender: Male
    • View Profile
Passive Dash and Learning for Freelancer
« on: October 29, 2017, 02:02:52 PM »
Hey guys, I'm attempting to make Dash and Learning (blue magic) innate all the time, regardless of your equipped class, just for convenience. I found the class innate abilities data and I added +08h (for Dash) and +10h (for Learning) to every class, and it all seems to work -- except for the Freelancer. I'm guessing their innate abilities get stomped by the list of innates from mastered classes, so at the beginning of the game nothing is mastered and so they end up with no innate abilities (even if their data asks for Dash and Learning).

Is there a way to work around this check to get Dash and Learning always innate for the Freelancer (and the Mime, who probably works similarly)? Or, are there better or sneakier ways to accomplish what I'm looking for, such as:
* Making Dash and Learning simply function all the time, regardless of if they are assigned as innate abilities?
* Creating a new, empty job that contains these two abilities and masters at level 0? (I noticed some blank space at the end of the jobs table that maybe could be used for creating these hacky, placeholder jobs).

Praetarius5018

  • Siren
  • *
  • Posts: 78
    • View Profile
Re: Passive Dash and Learning for Freelancer
« Reply #1 on: October 30, 2017, 12:32:01 PM »
for dash just put A9 08 EA at $C0/125E
this is where the game loads if you have dash equipped
Code: [Select]
$C0/125E BD 20 05    LDA $0520,x[$00:0520]   equipped innates of character, replace with LDA #$08 so it is always true
$C0/1261 29 08       AND #$08
$C0/1263 D0 13       BNE $13    [$1278]

for learning you should be able to do the same, just check when
7E2020 in-battle innates character1
7E20A0 in-battle innates character2
7E2120 in-battle innates character3
7E21A0 in-battle innates character4
is checked for $10 = learning and replace the character based load with a constant load

Tzepish

  • Siren
  • *
  • Posts: 71
  • Gender: Male
    • View Profile
Re: Passive Dash and Learning for Freelancer
« Reply #2 on: November 04, 2017, 12:30:09 PM »
Thanks Praetarius, your dash info did the trick! I confess, though, that your explanation for Learning is too technical for me (I know next to nothing of ASM). I went to 7E020 and expected to see something similar to C0/125E for dash, but I wasn't able to make sense of the hex staring back at me!

Praetarius5018

  • Siren
  • *
  • Posts: 78
    • View Profile
Re: Passive Dash and Learning for Freelancer
« Reply #3 on: November 05, 2017, 04:25:56 AM »
well, you need an emulator with debugging options, e.g. geigers.
It should have a breakpoint option where simply enter the ram address you want to observe.
(see picture in attachment)
this case is "easy" since we know what value is used from which address
hint: cheat lists are useful, at least the kind that modifies 7Exxxx or 7Fxxxx values
try samurai goroh's from http://erick.guillen.com.mx/Codes/SNES%20Final%20Fantasy%20V.txt

in this case we want a read access, since the info is simply read from the address 7E2020.
write is for cases where you want to watch when a value is changed.
exec is for asm code that is actually executed.
the game will run until one of the breakpoints is triggered; hit "step into" to forward command by command in the code.
we expect here a case where the value is checked for the "learning" flag in 7E2020, $10 in this case.
so step a bit further in;
I got a few
29 80       AND #$80
29 40       AND #$40
29 20       AND #$20
those are not the flags we look for, so continue with run, we need a new read call.

this one looks promising
Code: [Select]
$C2/4C87 B9 20 20    LDA $2020,y[$7E:2020]   A:0000 X:0000 Y:0000 P:envMxdiZc
$C2/4C8A 29 10       AND #$10                A:0077 X:0000 Y:0000 P:envMxdizc
$C2/4C8C F0 DF       BEQ $DF    [$4C6D]      A:0010 X:0000 Y:0000 P:envMxdizc
change $C2/4C87 to A9 10 EA, that should do the trick.
with that every job ever should have learning = true.

A9 10   is  LDA #$10
EA  is <do nothing>, we have one byte left over here since we replace the 3 byte B9 20 20    LDA $2020,y with just two A9 10.
specifically we are in 8 bit mode here, as the capital M to the right of the line tells us.
if it was a lower case m we'd be in 16 bit mode, so we'd have to do A9 10 00   is  LDA #$0010, load a 16 bit number.

as a reference sheet what bytes are what command I usually use https://wiki.superfamicom.org/snes/show/65816+Reference


Sorry, that explanation is not very complete, I'm not good at teaching.

Tzepish

  • Siren
  • *
  • Posts: 71
  • Gender: Male
    • View Profile
Re: Passive Dash and Learning for Freelancer
« Reply #4 on: November 05, 2017, 12:18:35 PM »
That explanation was just complete enough for me to give it a try and learn something new. Thanks so much!

Squall

  • Iron Claw
  • *
  • Posts: 393
    • View Profile
Re: Passive Dash and Learning for Freelancer
« Reply #5 on: November 09, 2017, 05:38:59 AM »
That explanation was just complete enough for me to give it a try and learn something new. Thanks so much!
Same here :)

Tzepish

  • Siren
  • *
  • Posts: 71
  • Gender: Male
    • View Profile
Re: Passive Dash and Learning for Freelancer
« Reply #6 on: November 12, 2017, 03:36:29 PM »
Hey Praetarius, do you mind if I package the above changes up into a small patch release for romhacking.net? I'd credit you with actually figuring this stuff out (and do you preferred to be credited as 'Praetarius' or 'Praetarius5018' (or some other cool name?)
« Last Edit: November 12, 2017, 03:54:27 PM by Tzepish »

Praetarius5018

  • Siren
  • *
  • Posts: 78
    • View Profile
Re: Passive Dash and Learning for Freelancer
« Reply #7 on: November 12, 2017, 05:02:41 PM »
I don't mind.
Please append the numbers for credits, easier to find correct search results for that.

There are other people using the numberless name just to maximize confusion... (WoW, LoL, some browser games)
Only on YT I have that, on a different forum I tried to register that but had to switch emails because I never got the response on my regular mail address so I appended numbers each time - 3 was finally successful so I stuck with that for some time.
Two forums later registration failed again, I was mad and added random numbers to the end, until 5018 on the finally working account (that number has no meaning at all except that email registration is a...) and kept that since.
Enough rant.