Users browsing this thread: 1 Guest(s)
FFV Battle Windows

#11
Posts: 11
Threads: 1
Thanks Received: 1
Thanks Given: 2
Joined: Dec 2022
Reputation: 0
Status
Chocobo
Default Value of 04:
[Image: attachment.php?aid=750]

Changed Value of 03:
[Image: attachment.php?aid=751]


Attached Files
Quote  

#12
Posts: 178
Threads: 2
Thanks Received: 23
Thanks Given: 4
Joined: Apr 2015
Reputation: 18
Status
None
Okay, I will keep working on it. The subroutine for the Neo Exdeath background animation is pretty complicated so there must be something else that needs to be fixed.

You might want to check all of the other battle backgrounds too, especially desert, underwater tower of Walse, and Karnak castle on fire.
  Find
Quote  

#13
Posts: 11
Threads: 1
Thanks Received: 1
Thanks Given: 2
Joined: Dec 2022
Reputation: 0
Status
Chocobo
It took a bit to check, but all of the battle backgrounds do work with the fix, including the wavy ones like the desert, underwater Walse Tower, and Karnak Castle. Only one that doesn't is Neo Exdeath's, since it works differently from the rest of them like you said.
Quote  

#14
Posts: 178
Threads: 2
Thanks Received: 23
Thanks Given: 4
Joined: Apr 2015
Reputation: 18
Status
None
I'm still not sure how to fully fix the Neo Exdeath battle background, but I did notice some more errors in the HDMA tables. I think these are what cause those gray lines at the very bottom of the screen during the Neo Exdeath battle. To fix this, change all of the bytes listed below from 0x80 to 0x00. This is probably due to the developers misunderstanding how to terminate the HDMA table. As usual, subtract 0xC00000 to get a ROM address.

Code:
C1/14FF: 80
C1/1506: 80
C1/1519: 80
C1/1595: 80 <- this is for Neo Exdeath, the others are for other types of battles
C1/15A8: 80
C1/15BB: 80
D8/32EA: 80



It seems to me that the byte at 0x1158F should adjust the transition point between the battlefield area and the menu area during the Neo Exdeath battle. The vanilla value is 0x04 and I thought that changing it to 0x03 would shift everything up by 1 scanline, but it sounds like that's not the case. Maybe try some other values like 0x05, 0x02, or 0x01 and see what happens? Don't use 0x00 because that will terminate the HDMA table. If that doesn't work you can also try adjusting the byte at C1/151A in the same way.
And just to clarify, after changing one of these bytes you need to restart the final battle for it to take effect because the HDMA table gets loaded right after the Exdeath tree dies. If you load a save state mid-battle it won't reload the table.
  Find
Quote  

#15
Posts: 11
Threads: 1
Thanks Received: 1
Thanks Given: 2
Joined: Dec 2022
Reputation: 0
Status
Chocobo
I found that changing the value at 0x11592 from C0 to BF seems to get rid of the gray line(s) at the bottom of the screen, but only when I replace 80 with 00 at the end of the Neo Exdeath BG table like you mentioned. But I don't know if changing C0 to BF would have any other effects on the Neo Exdeath BG, and if it does, it's not immediately obvious to me.

I didn't notice before, but changing the value at 0x1158F from 04 to 03 - 01 stops the line that overlaps the menu windows (and in the case of 01 and 02, the lines above that as well) from scrolling, in addition to the already noted effect of adding a line to the bottom of the screen, one for each step back. While changing it from 04 to 05 (and potentially higher since there's probably values up to FF that I didn't bother to check because it would take too long to) causes the line below the line where the bg overlaps the menu windows to scroll with the rest of the background in addition to getting rid of the lines at the bottom of the screen.

So maybe 0x1158F is what sets where the scroll effect ends, instead of setting where the bg itself ends and the menu begins?

A video demonstrating BF and 03 at their respective addresses, recorded with OBS in BSNES v115.
https://www.youtube.com/watch?v=EErvTIAPtb4

As a side note, to make Tree Exdeath go behind the menu window during the defeat transition, I changed 0x11596 from A0 to 9F.
Quote  

#16
Posts: 178
Threads: 2
Thanks Received: 23
Thanks Given: 4
Joined: Apr 2015
Reputation: 18
Status
None
I made some progress. Change 0x10DD8B and 0x10DDB9 from 0x50 to 0x4F. This fixes two other HDMA tables which switch the BG mode ($2105) and BG2 base address ($2108) between the battlefield region and the menu region. This mostly fixes the Neo Exdeath battle.

Instead of changing 0x11596, I would recommend changing 0x115A2 from 0xA0 to 0x9F instead.

I don't think you need to change 0x11592. Changing the HDMA table terminator values from 0x80 to 0x00 should be all you need.

I noticed another problem during the Neo Exdeath battle. When you have the Fight command selected and you press left or right to open the "Row" or "Def." window, the top row of pixels looks wonky. Let me know if you see that too. I'm still trying to figure out how to fix it.
  Find
Quote  

#17
Posts: 11
Threads: 1
Thanks Received: 1
Thanks Given: 2
Joined: Dec 2022
Reputation: 0
Status
Chocobo
(05-08-2023, 11:42 PM)Everything Wrote: I noticed another problem during the Neo Exdeath battle. When you have the Fight command selected and you press left or right to open the "Row" or "Def." window, the top row of pixels looks wonky. Let me know if you see that too. I'm still trying to figure out how to fix it.

Yeah, it appears to be cycling the colors like it does for the BG, if that's what you meant.
[Image: attachment.php?aid=753][Image: attachment.php?aid=754]
At first I thought it might be because the tilemaps for those are typically drawn on the same layer as the battle BG, but upon checking the Neo Exdeath BG tilemap in BSNES Plus, they were nowhere to be found in any of the layers.
[Image: attachment.php?aid=755]


Attached Files Thumbnail(s)
   
Quote  

#18
Posts: 178
Threads: 2
Thanks Received: 23
Thanks Given: 4
Joined: Apr 2015
Reputation: 18
Status
None
There's one more HDMA table that I missed. Change 0x10DDAF from 0x50 to 0x4F. That should fix the row and def. windows. I think that's everything. Let me know if you notice any other unwanted behavior. Here's the full list of changes:

Code:
C1/14FF: 80 -> 00  bg1 scroll hdma table terminator (credits)
C1/1506: 80 -> 00  bg2 scroll hdma table terminator (credits)
C1/1513: A0 -> 9F  bg2 scroll hdma table - shift menu by 1 scanline
C1/1519: 80 -> 00  bg2 scroll hdma table terminator
C1/158F: 04 -> 03  bg2 scroll hdma table (neo-exdeath) - shift menu by 1 scanline
C1/1595: 80 -> 00  bg2 scroll hdma table terminator (neo-exdeath)
C1/15A2: A0 -> 9F  bg1 scroll hdma table - shift menu by 1 scanline
C1/15A8: 80 -> 00  bg1 scroll hdma table terminator
C1/15BB: 80 -> 00  bg1 scroll hdma table terminator (unknown, possibly unused)
D0/DD8B: 50 -> 4F  bg mode hdma table - shift menu by 1 scanline
D0/DDAF: 50 -> 4F  color math hdma table - shift menu by 1 scanline
D0/DDB9: 50 -> 4F  bg2 base address hdma table - shift menu by 1 scanline
D8/32EA: 80 -> 00  bg3 scroll hdma table terminator

The result is that the battlefield region is now 159 scanlines instead of 160, allowing the top scanline of the menu window to be visible. Although I think it looks better with the fix applied, I'm now not so sure that this is a bug. I think they intended for the battlefield region to be 160 scanlines because it's evenly divisible into the SNES's native 8x8 tiles. FF6 also has 160 scanlines for the battlefield region. This leaves 64 scanlines for the menu region, though the last few will not be visible on a CRT due to overscan.
  Find
Quote  
[-] The following 1 user says Thank You to Everything for this post:
  • Mike 64 (05-09-2023)

#19
Posts: 11
Threads: 1
Thanks Received: 1
Thanks Given: 2
Joined: Dec 2022
Reputation: 0
Status
Chocobo
Awesome, thanks. Everything seems to be working fine now.

While I was at it, I decided to check FFVI, and the BG is actually 152 lines(151 on-screen), or one row of tiles less than FFV, while also hiding the top four lines of pixels of the BG, five if you count the extra one that gets hidden thanks to the mentioned quirk of the SNES, so the menu windows in FFVI get one more row of tiles as a result, and it also appears that Square caught the "issue" after FFV, so the BG and menu no longer overlap by a pixel.

So I think this fix for FFV is definitely appropriate.
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite