øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=2069.msg27424e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexe302.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=profile;area=showposts;u=33e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexe302.html.zxæFh^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ z ½OKtext/htmlISO-8859-1gzip8:Ö½ÿÿÿÿÿÿÿÿWed, 11 Mar 2020 02:19:42 GMT0ó°° ®0®P®€§²ð®åFh^ÿÿÿÿÿÿÿÿg ½ Monsters die slowly...

Author Topic: Monsters die slowly...  (Read 4590 times)

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: Monsters die slowly...
« Reply #30 on: May 31, 2017, 06:33:58 PM »
OK, I've been debugging with No$SNS and I do notice a lot of flickering, but less of it if I slow down the dissolve animation. Unfortunately, the only way to get rid of the flickering entirely is to bring it back to what it is normally. For all I can fathom, either there's some other variable I can modify that can fix the flickering issue while retaining the sped-up animation, or what this comes down to is simply too much work for the DMA.

What causes the animation to be so slow is that C1/FD27, which is called 64 times, calls the function at C1/02F2 eight times itself, and one of the things C1/02F2 does is wait for an interrupt signal from the GPU thread; this signal is sent from a function located at C1/18D2. That means that over the course of the dissolve animation, we receive a total of 512 interrupt signals! It's no wonder the animation is so slow.

Stepping through C1/18D2, I noticed that one of the functions called near the beginning activates DMA channel 4 to draw VRAM on the screen. I refuse to believe that there isn't a way to speed up the animation without causing problems.
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: Monsters die slowly...
« Reply #31 on: May 31, 2017, 07:34:02 PM »
OK, now this is REALLY odd. Somehow the function at C1/18D2 is being called the same number of times even with the patch applied. Now I get eight interrupt signals for every one call to C1/FD27 within the dissolve animation. What's up with that? :wtf:
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

assassin

  • Bane of Retards
  • *
  • Posts: 1,033
  • space bears are not gentle!
    • View Profile
    • My Barren Webpage
Re: Monsters die slowly...
« Reply #32 on: May 31, 2017, 09:25:50 PM »
what if you don't attempt to do more calls in a given time period, but do more fading per call?  or will that look like step-ridden arse?

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: Monsters die slowly...
« Reply #33 on: May 31, 2017, 10:00:44 PM »
That's basically what I'm trying to do. The vanilla ROM basically calls the dissolve function eight times for each step of the dissolve because each call applies a partial dissolve to a different piece of VRAM, and there are roughly eight steps to the dissolve, meaning 64 calls in total. I found a way to reduce the number of calls to one per step by having each call apply to all the relevant parts of VRAM at once, but for some reason the screen is strobing black everywhere during the animation as a side effect.
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

assassin

  • Bane of Retards
  • *
  • Posts: 1,033
  • space bears are not gentle!
    • View Profile
    • My Barren Webpage
Re: Monsters die slowly...
« Reply #34 on: May 31, 2017, 10:04:49 PM »
what about making the pixel (or palette) changes for each call have a larger decrementation?

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: Monsters die slowly...
« Reply #35 on: June 01, 2017, 12:18:21 AM »
I could try it, but I think I'd prefer it as smooth as possible.
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: Monsters die slowly...
« Reply #36 on: June 04, 2017, 01:12:32 AM »
OK, here's the new version! Be sure to apply the old reverse patch before applying this new patch.
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

Praetarius5018

  • Vargas
  • *
  • Posts: 88
    • View Profile
Re: Monsters die slowly...
« Reply #37 on: June 04, 2017, 04:24:22 AM »
I see no more side effects.
Good work!

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: Monsters die slowly...
« Reply #38 on: June 04, 2017, 06:56:53 AM »
Thanks! I haven't tested on every monster, so some of them may still be a bit on the slow side, but hopefully not. Also, this version does not affect the already-faster boss dissolve animation.

I do kinda think maybe the animation is a little too fast now, though. I'll experiment some more to see if reining it back in a little helps.
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: Monsters die slowly...
« Reply #39 on: June 04, 2017, 04:49:01 PM »
OK, I decided to slow the animation back down a bit, but it's still much faster than in the vanilla ROM.

A word to the wise: some monsters' dissolve animations will be faster than others'.
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: Monsters die slowly...
« Reply #40 on: June 05, 2017, 02:59:22 PM »
Here's another update: the previous version causes large enemy sprites, like bosses, to still have a somewhat slow death animation. Therefore, I added a control to keep the death animation as fast as possible if the amount of RAM being dissolved is large enough.
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

Squall

  • Dark Dragon
  • *
  • Posts: 486
    • View Profile
Re: Monsters die slowly...
« Reply #41 on: June 06, 2017, 02:17:47 AM »
Thank you for adding the modifications on Wiki!

Its sad when a good info or mod sunk buried in the forum threads.

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: Monsters die slowly...
« Reply #42 on: June 06, 2017, 10:35:19 PM »
Whoa, hold the phone folks! There was a mistake in the previous version of the patch - one of the patched ranges had a misreported size, which one person has reported to result in an expansion of the ROM to over 13 MB! :eek:

Here's a corrected version.
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

Jorgur

  • Moderator
  • *
  • Posts: 437
  • Gender: Male
    • View Profile
Re: Monsters die slowly...
« Reply #43 on: June 08, 2017, 02:57:40 PM »
I did a full playthrough of FF5 Ancient Cave with the patch applied - no issues whatsoever.