Users browsing this thread: 1 Guest(s)
Issue with SwdTech Speed Patch

#1
Posts: 14
Threads: 2
Thanks Received: 0
Thanks Given: 0
Joined: Oct 2017
Reputation: 0
Status
None
Hey guys. I'm having an issue trying to get Cyan's SwdTech gauge to work faster. I've tried 2 different patches for this:

Cyan's Sword Tech Gauge Speed Up which gives a general boost in speed to the gauge plus extra for each tech learned.


Selectable Blitz/SwdTech Patch which is basically self explanatory. Each SwdTech and Blitz is able to be selected from a menu similar to how Dance works.

I can live with getting either of these to work, but it seems they're only compatible with ROM v1.0. I use 1.1 currently (I heard it's fixed the malevolent Sketch bug?)

 
So here's where I think the problem lies in the first patch listed. Since it modifies the least amount of bytes:

The patch changes the byte at C1/7D8A: EE827B to jump to C1/FFF2 where it uses 14 bytes of code:
[Image: HexFF6.png]
v1.1 only has 8 bytes free in this section of code. So the patch ends up over-writing what is needed for the game:
[Image: HexFF6.png]

The idea I had (which was unsuccessful so far) was to have the code jump to a different location with more free space. But wouldn't I need to jump to a different bank for this, requiring a "long address"? I tried using the 3 bytes at C1/7D8A to jump to C1/FFF8, which is where the free space seems to start in 1.1. Then use that space to run a JSL 4-bytes to jump to something like bank C0 or C3. This just caused by game to reset or glitch out when I used SwdTech.

Is what I'm trying possible with this patch? Can I relocate the patch's code to a different bank?

I guess another valid question would be: Is there a sketch fix for 1.0. Last thing I want is my game freezing up on the 3rd Ultros fight or to not be able to use Sketch at all.

Thanks in advanced (perhaps this is why the 24-bit monster HP wouldn't work for the same reason...)
  Find
Quote  

#2
Posts: 175
Threads: 11
Thanks Received: 10
Thanks Given: 8
Joined: May 2013
Reputation: 13
Status
Well-Fed
@assassin has written a Sketch Bug fix for 1.0 that actually SAVES 7 bytes rather than using seven more -- I found it at Master ZED's page, it's there towards the bottom. It's also included in most if not all of the major bugfix compilations.

The idea of using that free space to JSL somewhere else is sound, though, if you do want to keep working on v1.1. (... Although if you want to keep using more patches, I highly recommend using 1.0 instead for greater patch compatibility.) The thing to remember is that when you JSL, you need to RTL -- my first thought as to why the game is crashing on you is that you ended the subroutine with an RTS instead.

When you jump to a subroutine, the game stores the address you... return to? I believe it adds the bytes, so if you JSR at C3/2330, it pushes $2333, not $2330, to the stack. When you JSL, it pushes THREE bytes -- in this case, it would push all of $C32333. Similarly, RTS only pulls two bytes from the stack, while RTL pulls three -- the game doesn't track whether you JSL or JSR, it relies on you to code the return properly. If you JSL from bank C1 into C3, but then RTS at the end of your new code, the game will jump to that address in C3. 

So basically what you'd do in your case is JSR to C1/FFF8, JSL to your new code in bank C3, RTL back to C1/FFFC, and RTS back to where you started from.

tl;dr: Use assassin's patch on 1.0 and work from there, but also, yes, you can add new code to a different bank if necessary, just make sure you're returning properly.


Current Project: FF6: Tensei | Discord ID: TristanGrayse
  Find
Quote  

#3
Posts: 14
Threads: 2
Thanks Received: 0
Thanks Given: 0
Joined: Oct 2017
Reputation: 0
Status
None
Wow. That worked perfectly!!! Thanks man!

For now I don't have any further patches to add so I'll stick with it in the mean time. Been battling this swdtech thing for weeks.
  Find
Quote  

#4
Posts: 200
Threads: 1
Thanks Received: 10
Thanks Given: 0
Joined: Oct 2015
Reputation: 18
Status
None
to be sure, my Sketch Bug fix is incomplete:
http://mnrogar.slickproductions.org/phpB...f=3&t=1010
(seen via https://www.ff6hacking.com/forums/thread...l#pid35060)

anybody up for beta testing my Bank C1 changes?

the SwordTech Speedup patch is pretty small, so the method you two discussed can easily convert it to work on FF3us 1.1.

Selectable Blitz/SwdTech Patch is considerably more involved, but has the benefit of included source code.
Quote  

#5
Posts: 208
Threads: 3
Thanks Received: 0
Thanks Given: 8
Joined: May 2013
Reputation: 0
Status
None
I was able to change SwdTech speed on 1.1 rom by changing 03 to 00 (can be 02 or 01 but 00 is fastest) at offset C1/7D86 (location without header). This solution is rather simple and doesn't use freespace. 00 is about .53sec (32/60fps) per Swdtech and stays the same whatever you've learned 1 or 8 techniques.
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite