News: 11 March 2016 - Forum Rules, Mobile Version
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia

Author Topic: Adding Patches to Link to the Past VT Randomizer  (Read 432 times)

Joseph Lithius

  • Jr. Member
  • **
  • Posts: 87
  • Lv. 34 K-176 Unit
    • View Profile
    • JosephLithius @ Tumblr
Adding Patches to Link to the Past VT Randomizer
« on: February 04, 2018, 07:10:50 pm »
So, I have a problem.  My problem is that I'm either not understanding, or utterly screwing up, something in my Link to the Past randomized ROM.
See, what I'm trying to do is add Kazuto's "AST Dashing" patch to the randomized ROM.  The patch consists of changing the original Pegasus Boots code to call to code located in an empty place of the ROM – a place which is full of data, in the Randomized ROMs.  Now, this isn't the problem, as I've already found an empty place to put the extra call functionality.  The problem I'm encountering seems to be actually making it work properly.

The original Pegasus Boots code is located at $31195, in the randomized ROM.  I've replaced that part with the custom call code that Kazuto came up with.  In a normal, US Link to the Past ROM that's been patched with Kazuto's "AST Dashing" patch, the code, normally located at $3911B-$3912A, would make a call to secondary code, located at $3F89F-$3F8CF.  In the randomized ROM, I had to move that secondary code over to $3B526-$3B556 and change the JSR code in the first address' code from 22 9F F8 07 to 22 26 B5 07.  While this still allows for straight dashing, trying to change direction causes the game to crash.  So, what am I doing wrong?

Sidenote: If this isn't enough information, I can provide more code, but I'm trying to be considerate, to Kazuto, by not posting the entirety of their work, here.

Hoping for good news,
Joseph
I'm not that hard to find... if you know where to look.
-=( http://josephlithius.tumblr.com )=-

Kiyoshi Aman

  • RHDN Patreon Supporter!
  • Hero Member
  • *****
  • Posts: 2240
  • Browncoat Captain
    • View Profile
    • Aerdan's Blog
Re: Adding Patches to Link to the Past VT Randomizer
« Reply #1 on: February 04, 2018, 11:49:07 pm »
Have you tried talking to the Z3R folks about it?

Joseph Lithius

  • Jr. Member
  • **
  • Posts: 87
  • Lv. 34 K-176 Unit
    • View Profile
    • JosephLithius @ Tumblr
Re: Adding Patches to Link to the Past VT Randomizer
« Reply #2 on: February 05, 2018, 07:05:55 pm »
Well, no.  No, I have not.  Mostly because I don't want to bother them.  Adding directional dashing isn't really something that the Randomizer people would be interested in.  Plus, they're not the ones who made the patch.

In any case, I compared said patch to the Ancient Stone Tablets Pegasus Boots coding.  Being that Kazuto's patch is more-or-less a port, there's a minimal amount of changes, between the two, mostly having to do with "jump to sub-routine" codes and, oddly, counter values.  However, at the end of the dash code, Kazuto's code uses "set carry flag," "pull accumulator," and "clear carry" code while the Ancient Stone Tablets dash code just ends with a "branch always" and "load accumulator from memory" code.  I'm guessing this is because the Ancient Stone Tablets Pegasus Boots code is self-contained while Kazuto's code has to jump to a sub-routine.
In any case, I don't know my way around 65816 code well enough to know what the heck I'm doing, much less understand what its doing. (An emulator with a debugger would probably help me, thinking about it…)  So, I'm pretty heartily stuck.
I'm not that hard to find... if you know where to look.
-=( http://josephlithius.tumblr.com )=-