øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=1952.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexc1ad-3.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&board=8.140e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexc1ad-3.html.zxÂ%h^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈð�sOKtext/htmlISO-8859-1gzip8:ÖsÿÿÿÿÿÿÿÿTue, 10 Mar 2020 23:58:19 GMT0ó°° ®0®P®€§²ð®Â%h^äs Various expansion questions.

Author Topic: Various expansion questions.  (Read 990 times)

dn

  • Ymir
  • *
  • Posts: 14
    • View Profile
Various expansion questions.
« on: September 06, 2014, 11:14:04 PM »
Figured I may be able to find more information here than I have thus far. This could benefit everybody if we can figure it out.

Somebody managed to expand item and monster indices in a Japanese FF6 hack (Final Fantasy 6 T-edition, look it up) and the author said he doesn't know how it was done; it was done by somebody else.
The hack in question has 277 items and 511 enemy (not formation!) entries.

Here's what I know about items in this particular hack:
Items utilize the highest bit on the quantity byte to determine which index it uses. $80+ signifies the expanded portion. This is likely a simple BMI but I don't know any specifics or even all the hooks necessary.
SRAM has been expanded to 16KB for the item expansion. There is a single byte that triggers expansion ($C0FFD8), but I don't know if he changed where it reads the expanded from or to at all. It seems to read original RAM fine, but I'm not sure how expanded SRAM has been implemented. The new item location actually still seems to be in original RAM ($1600-$1FFF)

Stored item check: 7EECA0-7EEDB3 (this is because the expanded portion of the menu cuts off at $40. It goes slightly further in RAM but won't display if you insert anything.)
Item quantity check: 7EEDD0-7EEEE3 (same issue. It goes further, but he seems to have cut it off at $40.)

I have no idea about monster expansion, other than the game seems to use two bytes but only uses the first bit of the second byte (cap is presently 383) and I have no idea what is presently disabling us from expanding it to 511.

On a more personal side note, does anybody have experience with the overkill patch? I'm havin some issue with the dog block graphic being replaced with some green sprite.

B870 seems to be some kind of save exchange space. probably in vanilla, but notable nevertheless.
« Last Edit: September 07, 2014, 07:01:11 PM by dn »

Madsiur

  • Tunnel Armor
  • *
  • Posts: 149
  • Gender: Male
  • FF6AE coder
    • View Profile
    • Madsiur's Lair
Re: Various expansion questions.
« Reply #1 on: September 07, 2014, 11:02:37 AM »
I started looking at this yesterday and figured as much as you did so far. I looked at the item decreasing routine (bank C3) of the hack and my main question was how doing a STA EDD0,X was translating into writing in expanded SRAM.... I think I need to read more about how the SNES works  :blush:

Madsiur

  • Tunnel Armor
  • *
  • Posts: 149
  • Gender: Male
  • FF6AE coder
    • View Profile
    • Madsiur's Lair
Re: Various expansion questions.
« Reply #2 on: September 14, 2014, 07:30:52 AM »
I'm trying to identify all the code in the vanilla ROM that needs to be changed in banks C1 and C3 concerning items. While C3 is well documented, I'm hitting a wall in bank C1. I can't find a single instance $1869, $1969, 7EAA8D, 7EAB8D, AA8D or AB8D. I'm trying to find the routine concerning item swapping, item added to inventory, item double clicked (decreasing) as well as item list population.

Thanks to the comments in the disassembly, I think I have found 2 of those four routines. How does items and quantities are read from RAM (or SRAM) in bank C1? Any help would be appreciated. Thanks.

LightPhoenix

  • FF5 Hacker
  • *
  • Posts: 130
    • View Profile
Re: Various expansion questions.
« Reply #3 on: September 14, 2014, 03:55:14 PM »
C1 primarily concerns the battle system.  Because of this, the item arrays are probably moved into a temp array for the duration of battle.  Put a breakpoint on the first slot of the item array, get into battle, and see where it gets loaded.