Author Topic: Any info on Map Transfer effects?  (Read 1074 times)

Bahamut ZERO

  • Cagnazzo
  • *
  • Posts: 347
  • Gender: Male
  • If ye're takin a beatin, hop in de back row!
    • View Profile
Any info on Map Transfer effects?
« on: September 04, 2015, 02:32:48 PM »
Last night I was playing around with FF4ckster and decided to see the difference between the normal transfer effect (pixelation as black screen draws in), and without the normal transfer effect (a quick simple fade out/in, sometimes used during events). I set up a Naimingway in Troia Cafe to transfer me back outside with the simple fade in/out, and I really like the quickness in the transfering (not to mention it feels more in line with FF5-6's method for transfer effect).

Is there any info floating around about these transfer effects? I'm wondering the feasability of essientially swapping the two effects around; quick fade in/outs during normal map transferring via triggers, while the normal pixelation effect could still be initiated during evenrts via the "Load map without Pixelation Effect"...effect.
I update my graphics thread on almost a daily basis, so keep an eye out for new stuff!

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Any info on Map Transfer effects?
« Reply #1 on: September 04, 2015, 11:25:13 PM »
All I can really tell you is that there is a lot of stuff that goes on during a map change. I've tried to zero in on some stuff before, but it can get really tricky if you don't have a particular byte of RAM to latch onto. The pixelation effect, from what I can tell, is an innate ability of the SNES PPU, to which Geiger's cannot set breakpoints, so figuring out how to switch those transitions might be beyond my capabilities.
Sorry, man.

Bahamut ZERO

  • Cagnazzo
  • *
  • Posts: 347
  • Gender: Male
  • If ye're takin a beatin, hop in de back row!
    • View Profile
Re: Any info on Map Transfer effects?
« Reply #2 on: September 06, 2015, 12:23:23 PM »
 It's alright, I halfway figured it would be like that, given how much is likely going on the background during transitions. Though, it makes me wonder how the "Load map without pixelation" option in the Load Map event command functions. I've been looking through some (well, a lot of them, actually) of the older threads looking for info on it, but no dice so far.  If there were some way to see where/how that command's calling the non-pixelation transfer, perhaps there would be a way of setting it up to be triggered by a particular flag instead of that command....

Hell, for all I know that's probably what "Load map without pixelation effect" is doing in the first place - setting some particular flag that we otherwise consider unused. with some sub routine turning it back off after the transfer. But that's just me theorizing (aka talking out of my ass haha).


 :offtopic: I did find something neat, though it has nothing to do with this subject. Dragonsbrethren's thread  "I buy most things!" (Found here: http://slickproductions.org/forum/index.php?topic=618.0 ) shows how to add a pointer to the unsused text string that the Shop's sell Screen would have used. I also came across Grimoire's HP display on the file select screen for your Shadow Mod, which strangely broke my hack's compatability with ZNES... until I set up the unused sell screen text.  It was a fun afternoon. :happy:
« Last Edit: September 06, 2015, 12:49:46 PM by Bahamut ZERO »
I update my graphics thread on almost a daily basis, so keep an eye out for new stuff!

avalanche

  • Mom Bomb
  • *
  • Posts: 122
    • View Profile
Re: Any info on Map Transfer effects?
« Reply #3 on: October 30, 2015, 10:51:55 AM »
I (almost) got what you asked for to work.  I was able to change the "normal map transitions" for when just walking around to use a fade out/in instead of the pixelation effect.  I also found how to invert the event script "load map without pixelation effect", but there's a problem with that, as I'll describe later.

Fair warning - there are a number of places where this patch needed to occur. I may have missed some. Obviously one would need to really play through the whole game to ensure there weren't event scripts messing something up.

First, find routines to do what we need

Original pixelation routines:
  00:9021 - routine to perform pixelation keyhole-close
  00:904B - routine to perform pixelation keyhole-open

Low level fade routines, but cannot just use them directly:
  00:8BB3 - low level fade-to-black, but needs param in accumulator
  00:8B92 - low level fade-from-black, but needs param in accumulator

Now luckily I found some existing assembly that happened to do what was needed, even though they aren't whole routines:
  00:87EA - passes fastest fade speed parameter to fade-to-black routine
  00:8834 - passes fastest fade speed parameter to fade-from-black routine


Normal Map Transitions
First up, the places where the pixelation routines are called for normal map transitions.  Note: The close and open routines seem to be paired, so if you only change some of them, then glitches can occur.

Various closures, change each JSR from $9021 to $87EA:
Code: [Select]
World to dungeon:
  00:9C12  20 21 90    JSR $9021

Dungeon to dungeon:
  00:9A99  20 21 90    JSR $9021

Dungeon to world:
  00:9AA8  20 21 90    JSR $9021

Using a Return Tile:
  00:8197  20 21 90    JSR $9021


Various openings, change each JSR from $904B to $8834:
Code: [Select]
Opening on Overworld:
  00:831B  20 4B 90    JSR $904B

Opening on Underground:
  00:8328  20 4B 90    JSR $904B

Opening on Moon:
  00:8335  20 4B 90    JSR $904B

Opening on Dungeon:
  00:8348  20 4B 90    JSR $904B

With these changes, I was able to test walking around Baron, the town, buildings, and the overworld, and it just uses the fade transition.


Inverting the event scripts transitions (sort of)
I found where to invert this, but it's buggy.  It will work okay for some transitions, but many event scripts will need to be modified to make it work, because they assume the state of the fade.  Some are flickery, and some mess up and try to "toggle fade" when it isn't needed and end up re-fading permanently as a result.  Also some of the visual FX are involved, leaving the fade wrong, etc.

So, I recommend leaving the "without pixelation" as-is, and simply modify each script to toggle the checkbox.  Fixing all the errors otherwise seems prohibitive.

In any case, the places to modify to invert the behavior.  Simply change the BEQ's to BNE's.
Code: [Select]
00:EDE5  F0 04       BEQ $04
  ...
00:EE1B  F0 04       BEQ $04


Again, there could be some bits I missed. But it's a good start!  Happy hacking.


Bahamut ZERO

  • Cagnazzo
  • *
  • Posts: 347
  • Gender: Male
  • If ye're takin a beatin, hop in de back row!
    • View Profile
Re: Any info on Map Transfer effects?
« Reply #4 on: May 08, 2016, 06:48:16 PM »
Holy shit how did I not notice your reply!? Forgive me. :isuck:


I went with changing the normal map transisitions like your first example. I like how the Overworld has a straight cut-to-black effect instead of the faster fade in/out of the other maps.

I also notice that map loading from event still causes a pixelation effect, which will be perfect for some of the things I have planned. Thanks for the help!!
I update my graphics thread on almost a daily basis, so keep an eye out for new stuff!