Users browsing this thread: 1 Guest(s)
Error in Imp affecting call monster sprite

#1
Posts: 145
Threads: 47
Thanks Received: 0
Thanks Given: 0
Joined: Jan 2020
Reputation: 0
Status
None
After applying several Leet Sketcher's patches, testing and not crashing the game. I thought it went well until I discover that if I cast Imp on Live Sr Behemoth and kill it, the death version sprite that came out is corrupted.
  Find
Quote  

#2
Posts: 3,966
Threads: 279
Thanks Received: 234
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
Well the easiest fix is removing the patche(s) that cause this problem. Testing if the game doesn't crash is a good start but it doesn't mean there won't be more problem. You may also have a patch conflict that use the same free space and this is the result. I would inform leetsketcher when you find the culprit..
  Find
Quote  

#3
Posts: 145
Threads: 47
Thanks Received: 0
Thanks Given: 0
Joined: Jan 2020
Reputation: 0
Status
None
(06-19-2020, 10:22 AM)madsiur Wrote: Well the easiest fix is removing the patche(s) that cause this problem. Testing if the game doesn't crash is a good start but it doesn't mean there won't be more problem. You may also have a patch conflict that use the same free space and this is the result. I would inform leetsketcher when you find the culprit..

Found the problem in using V1.0 us rom. If I apply Leet's Imp Skimp & Unaffected Rows from http://assassin17.brinkster.net/, then undead sprite is corrupted. 

So I just need to unpatch one of them.
  Find
Quote  
[-] The following 2 users say Thank You to doofenH for this post:
  • assassin (06-20-2020), SilentEnigma (10-17-2020)

#4
Posts: 200
Threads: 1
Thanks Received: 10
Thanks Given: 0
Joined: Oct 2015
Reputation: 18
Status
None
no interactions between the patches jump out at me, and i can't say the following necessarily relates to the problem, but this:

Code:
LDA #$01
JML C2_2E75_helper

can't be doing what i intended, given the target function promptly clobbers A to preserve $B1 (a late-stage addition). :/

if $B1 holds 20h, i'll be calling some bogus pointer instead of a ($2E93, X) table entry. if it holds 00h, the toggle i'm attempting will fail.

try changing C2_2E75_helper's
LDA $B1/pha/.../pla/sta $b1 to:
ldx $b1/phx/.../plx/stx $b1 .

if we're worried about altering X's value from vanilla, we can probably edit only the first 2 instructions.

another alternative is to leave all 4 instructions untouched, change "JSR $2E75" to "JSR $2E77" (or "JSR $2E74"), and the caller's "LDA #$01" to "LDX #$02" (or "LDX #$01").
Quote  
[-] The following 1 user says Thank You to assassin for this post:
  • SilentEnigma (10-17-2020)

#5
Posts: 173
Threads: 23
Thanks Received: 20
Thanks Given: 6
Joined: Feb 2016
Reputation: 8
Status
Enlight
Howdy,

Gi Nattak referred me to this thread when the same bug was reported in ROSE, which has both Imp Skimp and Unaffected Rows.

(10-16-2020, 09:51 PM)SilentEnigma Wrote: The patch periodically compares each enemy's "displayed" Imp status with its "actual" Imp status, and if the two disagree, then the displayed sprite is updated accordingly.

The problem is, sometimes the status bit for the "actual" Imp status is not up to date, leading to at least two issues:

  1. The SrBehemoth fight. The undead SrBehemoth replaces the living one in the same slot, and the Imp bit never gets cleared. The undead SrBehemoth is immune to Imp. The patch runs the check, and invalidly attempts to replace the normal enemy sprite with an Imp.
  2. The Pugs fight. According to LeetSketcher, their appearance should not revert from Imp to normal whenever they step back, because they still have Imp status at the time. But the Pugs' statuses DO actually revert to normal automatically after stepping back; just not right away with the bit checked by the patch. (With the patch applied, Pugs will abruptly change from the Imp sprite to normal when the "actual" Imp status bit finally clears -- not very appealing.)

To fix the above, revert these two subroutine calls to the original:
Code:
Executes upon new enemy appearing (i.e. SrBehemoth; start of battle)
> Imp Skimp v1.4:
C1/9369: 20 1B D7    JSR $D71B
> Original FF3us v1.0:
C1/9369: 20 7C 25    JSR $257C

Executes upon enemy regenerating (i.e. Pugs; undead+Doom)
> Imp Skimp v1.4:
C1/93C5: 20 1B D7    JSR $D71B
> Original FF3us v1.0:
C1/93C5: 20 7C 25    JSR $257C

I will be posting any further developments to this solution in the FF6:ROSE thread or the C. V. Bug-Fix Compilation thread.

I have also looked into Assassin's solution above for Unaffected Rows, and have found the following:
  • The code called out by Assassin does not normally execute, at least not during the SrBehemoth fight. My guess is that it only applies to "hacks that introduce formation switches differing from SrBehemoth's" --- so, this is not not a problem for Vanilla FF3us formations.
  • The code is indeed bugged.
(06-20-2020, 01:36 AM)assassin Wrote:
try changing C2_2E75_helper's
LDA $B1/pha/.../pla/sta $b1 to:
ldx $b1/phx/.../plx/stx $b1 .

if we're worried about altering X's value from vanilla, we can probably edit only the first 2 instructions.
  • Assassin's first suggestion, the X-preserving variant, fixes the bug.
  • The full revision should work too. After the function, X gets written before the next time it gets read.
So, this is the fix I confirmed:

Code:
> Unaffected Rows v0.20:
C2/50AF A5 B1       LDA $B1
C2/50B1 48          PHA
> Fixed:
C2/50AF A6 B1       LDX $B1
C2/50B1 DA          PHX



UPDATE 2020-10-21:
My original post erroneously reported the original FF3us 1.0's C1/9369 and C1/93C5 as the following:
Code:
C1/9369: 20 25 7C
C1/93C5: 20 25 7C

Sorry for the confusion! The error was is pointed out by Gi Nattak in the following post.
This post has been updated to fix the error.

Always remember your endianness, friends!
Quote  
[-] The following 2 users say Thank You to SilentEnigma for this post:
  • assassin (10-18-2020), Warrax (08-27-2022)

#6
Posts: 2,548
Threads: 98
Thanks Received: 147
Thanks Given: 156
Joined: Aug 2009
Reputation: 52
Status
Nattak\'d
Just a slight heads up, when reverting these two lines' values here:

Code:
C1/9369: 20 25 7C    JSR $257C
C1/93C5: 20 25 7C    JSR $257C

the offset bytes appear to not have received the 'reverse-byte' treatment, and should be:

Code:
C1/9369: 20 7C 25    JSR $257C
C1/93C5: 20 7C 25    JSR $257C

Not sure if C.V. Reynolds caught that as well before updating his patch!  Huh


We are born, live, die and then do the same thing over again.
Quote  
[-] The following 1 user says Thank You to Gi Nattak for this post:
  • SilentEnigma (10-21-2020)

#7
Posts: 173
Threads: 23
Thanks Received: 20
Thanks Given: 6
Joined: Feb 2016
Reputation: 8
Status
Enlight
Oh, no!
And I posted that all over the place!

Thanks, Gi.
Will be fixing that pronto.
Quote  

#8
Posts: 22
Threads: 0
Thanks Received: 0
Thanks Given: 0
Joined: Apr 2017
Reputation: 0
Status
None
Wondering if anyone could update Imp Skimp with the fix, to a standalone patch? Or, short of that, make available the Unaffected Rows patch, which is BeheRows.zip, since Assassin17's site is permanently gone. I'm using Dr. Meat's Relocalization overhaul, which has the Rows patch included, so I can't get rid of it without the anti-patch that's supposedly included in Assassin's original zip. My only other option is to get rid of Imp Skimp, which I'm loathe to do since I love that patch. But it does seem to be causing problems when characters are imped, the game can freeze at times.

Regardless of that issue, it seems like Imp Skimp & Unaffected Rows can't be used together without Skimp being fixed or Rows removed, so if anyone can help, I'd appreciate it.

EDIT: I finally figured out the freezes were caused by my particular usage of Geiger's Select Any Command patch. Sometimes I give a character 4 battle commands and leave out the item command. And I substitute Mug for Attack on everyone. So when they're imped, the game freezes since there's no Item or Attack command: the only 2 you can use as an imp. So that was my bad, not any patch. Unaffected Rows has now been removed and things are going well so far with imp issues, though I expect to encounter some later with Behemoths while still using the unfixed Imp Skimp, if I understand the above posts correctly.
  Find
Quote  

#9
Posts: 200
Threads: 1
Thanks Received: 10
Thanks Given: 0
Joined: Oct 2015
Reputation: 18
Status
None
Quote: Or, short of that, make available the Unaffected Rows patch, which is BeheRows.zip, since Assassin17's site is permanently gone.

permanently gone, you say?!  why am i always the last to know?! :'(

it was up 3-4 days ago, so it's a wee bit premature to call the current issue more than a momentary lapse.

anyway, i think that SilentEnigma determined the flaw with Unaffected Rows to be unrelated to what DoofenX was encountering with Imp Skimp.

at any rate, BeheRows.zip is attached.  we've only just met, and yet this Unsubscribe hits me hard for some reason.


Attached Files
.zip  BeheRows.zip (21.25 KB, 6 downloads)
Quote  
[-] The following 1 user says Thank You to assassin for this post:
  • Dev J (03-12-2021)

#10
Posts: 22
Threads: 0
Thanks Received: 0
Thanks Given: 0
Joined: Apr 2017
Reputation: 0
Status
None
Thanks so much for taking the time to put up that file. Sorry I presumed the site was dead; that happens so frequently with older FF3 hacking sites that I got used to using Wayback to try to get access to files. In this case it could access the main page but the files were not cached. Usually when I see that, the site is dead, but I guess it's just a temp outage.
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite