øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=2245.45e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexd1e7.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&board=8.40e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexd1e7.html.zxw$h^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ0Pd‡7OKtext/htmlISO-8859-1gzip8:Ö‡7ÿÿÿÿÿÿÿÿTue, 10 Mar 2020 23:52:47 GMT0ó°° ®0®P®€§²ð®v$h^ÿÿÿÿÿÿÿÿ1,‡7 New bank C3 disassembly, and related docs

Author Topic: New bank C3 disassembly, and related docs  (Read 7303 times)

Novalia Spirit

  • Pandora's Masking Tape
  • *
  • Posts: 33
  • Gender: Male
    • View Profile
Re: New bank C3 disassembly, and related docs
« Reply #45 on: December 12, 2016, 06:50:26 PM »
Quote from: magitek
Funny, I had the same idea only a day or two ago. I kind of dismissed it as I wouldn't know where to even start, but it is a good idea nonetheless. I was thinking it could be modeled after the Item menu and the info window that comes up when you double click equipment, with an attack list and status info in the lower half.

That's pretty much what I had in mind. I'd probably display a table including all of the possible status effects, using a different color for each entry based on monster data, making it easier to find what you're looking for. This is nothing I wouldn't be able to do, but I tend to be very reluctant to claim free space, so I'll have to give it some thought.

I've been scratching my head for a while, trying to figure out a way to display the attack info in battle instead. One idea I had would be to implement a system where pressing Y would replace the Rage list with an attack list, but that wouldn't be of much help with special attacks. Another possibility would be to display a small window above the menu, or perhaps just shorten the on-screen Rage list and use the created space to display the attack info.

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: New bank C3 disassembly, and related docs
« Reply #46 on: December 13, 2016, 01:04:16 AM »
This actually sounds maybe a bit more similar to the "learnable Spells" menu for Espers.
"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: New bank C3 disassembly, and related docs
« Reply #47 on: December 13, 2016, 02:12:43 AM »
By the way, I'm getting a problem when I load a game that was saved at a Save Point. The top half of the Save Point is cut off, and a countdown timer is started from 6:02, but the timer graphics are completely muffled on the map screen. When the timer runs out, the screen flashes and then shakes for a while before panning hard southeast endlessly. I've attached a couple of screenshots. This doesn't seem to happen on the World Map.

I'm investigating the SwdTech renaming patch to see if it's the cause.
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

Novalia Spirit

  • Pandora's Masking Tape
  • *
  • Posts: 33
  • Gender: Male
    • View Profile
Re: New bank C3 disassembly, and related docs
« Reply #48 on: December 13, 2016, 02:22:14 AM »
Thanks, it does seem like my patch is the culprit. Curiously, my restored disassembly doesn't seem to have this problem. I'll investigate later.

magitek

  • Antlion
  • *
  • Posts: 67
  • Gender: Male
  • Juggler
    • View Profile
Re: New bank C3 disassembly, and related docs
« Reply #49 on: December 13, 2016, 04:59:57 AM »
Quote from: magitek
Funny, I had the same idea only a day or two ago. I kind of dismissed it as I wouldn't know where to even start, but it is a good idea nonetheless. I was thinking it could be modeled after the Item menu and the info window that comes up when you double click equipment, with an attack list and status info in the lower half.

That's pretty much what I had in mind. I'd probably display a table including all of the possible status effects, using a different color for each entry based on monster data, making it easier to find what you're looking for. This is nothing I wouldn't be able to do, but I tend to be very reluctant to claim free space, so I'll have to give it some thought.

I've been scratching my head for a while, trying to figure out a way to display the attack info in battle instead. One idea I had would be to implement a system where pressing Y would replace the Rage list with an attack list, but that wouldn't be of much help with special attacks. Another possibility would be to display a small window above the menu, or perhaps just shorten the on-screen Rage list and use the created space to display the attack info.

If you think it's feasible, a general purpose select-toggleable info window a la chrono trigger or ffvii in battle would be very useful not only for rages. It could display all sorts of context based info.

I wouldn't worry much about claiming fre space. If you provide code it's easy enough for hackers to manage their own free space usage. Besides, you've freed up quite a bit. :)
Don't feed the trolls. Use proper grammar, spelling, and punctuation. Eat your vegetables.

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: New bank C3 disassembly, and related docs
« Reply #50 on: December 13, 2016, 04:06:34 PM »
I found the problem. Your "JSR svtech" call at C3/1533 overwrites the call to C3/1586, which stores timer info to SRAM.
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

Novalia Spirit

  • Pandora's Masking Tape
  • *
  • Posts: 33
  • Gender: Male
    • View Profile
Re: New bank C3 disassembly, and related docs
« Reply #51 on: December 13, 2016, 04:10:39 PM »
Yep, I had the following explanation ready to be posted but wanted to include the updated patch with it:

Quote
Okay, I've figured out the problem. In case anyone's interested:

My patch overwrites a call in the save function that moves event timer data to the SRAM block. The call now leads to a new function that transfers not only the timer data, but the SwdTech names as well. At some point during the optimization process, I came up with the idea of using the MVN opcode to merge this function with the one that copies the names the other way for the Load menu, but carelessly forgot to preserve the timer-related call.

It's a good thing Geiger's debugger initializes all of RAM to 55h, otherwise this bug would likely have gone unnoticed for quite a long time.

Edit: Attached the updated patch. It fixes the aforementioned bug and introduces an optional sound-related patch.
« Last Edit: December 14, 2016, 07:09:17 PM by Novalia Spirit »

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: New bank C3 disassembly, and related docs
« Reply #52 on: December 15, 2016, 08:27:38 AM »
I'm noticing several problems with this new version of the patch, mostly because there seem to be discrepancies between the patch and the attached ASM files. For example:

Code: [Select]
org $C3665B
JSR $0EC0  ; ASM

org $C3665B
JSR $0E5D  ; patch

Code: [Select]
org $C36692
LDY #$790F  ; ASM

org $C36692
JSR $790F  ; patch

Code: [Select]
org $C3669E
PHA  ; ASM

org $C3669E
SED  ; patch

Code: [Select]
org $C366DA
LDY #$0380  ; ASM
CMP #$01
BEQ .line
JSR $A8A9

org $C366DA
CMP #$80  ; patch
ORA $C9,S
ORA ($F0,X)
BEQ $6702
LDA #$A8

I'm just going through and finding them all, and I'll probably end up listing them all here as I run into them.
« Last Edit: December 15, 2016, 08:37:28 AM by 13375K31C43R »
"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: New bank C3 disassembly, and related docs
« Reply #53 on: December 15, 2016, 08:42:16 AM »
Actually, on second thought, it could be because I applied the new version after having already applied the old version. Patch Conflict Finder tells me your patch has a lot of one-byte "holes", which could be why I'm seeing the wrong bytes in all these places. Personally, I'd go through and fill in those holes because not only does that mean this won't happen in the future, but it'll also reduce the size of the patch file.
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

Novalia Spirit

  • Pandora's Masking Tape
  • *
  • Posts: 33
  • Gender: Male
    • View Profile
Re: New bank C3 disassembly, and related docs
« Reply #54 on: December 15, 2016, 05:48:28 PM »
I'm using a very old IPS creation utility. Modern patch makers optimize the code in such a way that if you modify two bytes, skip the next three, and then modify the next four, instead of specifying two start addresses for storing the data, they'll just write 9 consecutive bytes. This is fine in most cases, but this can lead to false alarms with patch conflicts, especially when editing jump tables. Obviously this can lead to some problems if you apply the patch over previously modified data (usually an older version of the patch), so expect an updated patch within a few hours.
« Last Edit: December 16, 2016, 07:31:00 PM by Novalia Spirit »

Madsiur

  • Tunnel Armor
  • *
  • Posts: 149
  • Gender: Male
  • FF6AE coder
    • View Profile
    • Madsiur's Lair
Re: New bank C3 disassembly, and related docs
« Reply #55 on: December 16, 2016, 01:54:46 AM »
Might as well add a bestiary of some sort by making the enemy names clickable and displaying the enemy data in a submenu, ideally with the option to switch between enemies with L and R for convenience.

I might be able to pull this off, now that menu editing has been greatly made easier with your work. It worth a shot. I just need to think of the layout and if I'll use a form of array presentation with status icons...

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: New bank C3 disassembly, and related docs
« Reply #56 on: December 16, 2016, 01:45:10 PM »
About the Equip menu relic indicators patch...is it possible that you could add those to the Relic menu as well, and also add some indication of when those effects are being removed? For example, an effect that isn't there to begin with doesn't have its icon shown, but if it's being added then the icon appears in yellow. If the effect was there to start, then it appears in turquoise (as usual), but then if it gets removed, the icon appears in red. Is that doable? Or perhaps overkill?
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

Imzogelmo

  • Ogopogo Aficianado
  • *
  • Posts: 241
  • Gender: Male
  • Ask me about my other job.
    • View Profile
    • NEPROMR
Re: New bank C3 disassembly, and related docs
« Reply #57 on: December 16, 2016, 06:09:30 PM »
Regarding a Rage Description patch: By all means, if you want to make such a patch, go for it. For the record, though, I just made static descriptions and a pointer table. Figuring out where to hook it was the biggest issue.
 :edit:
Now that I think about it, hand-tweaking some of the descriptions was an issue too. If I recall correctly, it will line-break automatically, but the calculation of how wide the constituent words are is not accurate, so with some descriptions it would spill over (particularly if a lot of the letters are wide). I could be mistaken about the cause, as that was not something I set out to fix, when manual breaking of lines sufficed for my purposes. If you're planning to do it automatically, then the other hack-only bug would probably need to be fixed too.
5/31/16 - I have an assembly of the battle portion of C2, relocated to the F0 bank, which has both vanilla and patch code in my dropbox. I'll be updating it with additional patches as I have time. I will *not* be releasing it publicly, but ask me for the link and I'll share.

Imzogelmo

  • Ogopogo Aficianado
  • *
  • Posts: 241
  • Gender: Male
  • Ask me about my other job.
    • View Profile
    • NEPROMR
Re: New bank C3 disassembly, and related docs
« Reply #58 on: December 16, 2016, 06:42:33 PM »
I'm using a very old IPS creation utility. Modern patch makers optimize the code in such a way that if you modify two bytes, skip the next three, and then modify the next four, instead of specifying two start addresses for storing the data, they'll just write 9 consecutive bytes. This is fine in most cases, but this can lead to false alarms with patch conflicts, especially when editing jump tables. Obviously this can lead to some problems if you apply the patch over previously modified data (usually an older version of the patch), so expect an updated patch within a few hours.

Also, as an technical/legality issue, including those 1-3 intervening bytes in a patch could be considered illegal, as it's including copyrighted material in an otherwise legal derivative work. Of course the entirety of anti-patches are copyrighted work too. However, all the inclusions are typically small enough that they could be considered to fall under "fair use" so I wouldn't get too worked up over it.  Patching an entire bank may be another story, though.
5/31/16 - I have an assembly of the battle portion of C2, relocated to the F0 bank, which has both vanilla and patch code in my dropbox. I'll be updating it with additional patches as I have time. I will *not* be releasing it publicly, but ask me for the link and I'll share.

Novalia Spirit

  • Pandora's Masking Tape
  • *
  • Posts: 33
  • Gender: Male
    • View Profile
Re: New bank C3 disassembly, and related docs
« Reply #59 on: December 16, 2016, 08:50:52 PM »
Quote
Regarding a Rage Description patch: By all means, if you want to make such a patch, go for it.

Thanks, I'll start working on a patch once I'm fully done with C3, which should not take too long.

Quote
Now that I think about it, hand-tweaking some of the descriptions was an issue too. If I recall correctly, it will line-break automatically, but the calculation of how wide the constituent words are is not accurate, so with some descriptions it would spill over (particularly if a lot of the letters are wide). I could be mistaken about the cause, as that was not something I set out to fix, when manual breaking of lines sufficed for my purposes. If you're planning to do it automatically, then the other hack-only bug would probably need to be fixed too.

Unfortunately, unlike field dialogue, descriptions in the main menu don't really benefit from an automatic text-wrapping feature. The string will just spill into the next line, usually splitting a character in the process, and causing text-merging issues if an actual line break follows. Right now, I'm leaning toward listing each attack on a separate line, as in Pandora's Box, so this shouldn't be a problem. But I'll probably have to limit the text width anyway to account for the title window, which covers a significant portion of the second line.

Quote
About the Equip menu relic indicators patch...is it possible that you could add those to the Relic menu as well, and also add some indication of when those effects are being removed? For example, an effect that isn't there to begin with doesn't have its icon shown, but if it's being added then the icon appears in yellow. If the effect was there to start, then it appears in turquoise (as usual), but then if it gets removed, the icon appears in red. Is that doable? Or perhaps overkill?

It's definitely doable, but as you suggested, I think it would be a bit superfluous, as I'd expect the player to remember what changes he made a few seconds ago, and the only thing this would achieve would be to provide an indication that the Reequip feature will kick in.

Note that I've finally attached the updated SwdTech menu patch to my previous post. No version change, just a different release date.
« Last Edit: December 16, 2016, 09:12:14 PM by Novalia Spirit »