Aslickproductions.org/forum/index.php?PHPSESSID=a93jpvqe9jutne9agvqo8ht1r1&topic=2441.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexaf22.htmlslickproductions.org/forum/index.php?board=17.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexaf22.html.zx8h^ V{.OKtext/htmlISO-8859-1gzip@{.Wed, 11 Mar 2020 01:19:14 GMT0 0P8h^/{. Inu's Patches

Author Topic: Inu's Patches  (Read 229 times)

Xardas

  • Siren
  • *
  • Posts: 75
    • View Profile
Inu's Patches
« on: April 14, 2018, 03:18:09 AM »
Hey guys, I got some good news for you!

Some of you may remember how I mentioned Inu's patches:
http://slickproductions.org/forum/index.php?topic=1980.msg28235#msg28235

Although his website wasn't updated for 8 years, I managed to get an answer from him. Unfortunately, he retired from hacking.  :sad:
But the earlier mentioned good news: he gave permission to use his patches and sourcecodes!
Just be decent people and give credit if you use/integrate his patches or create something based on his codes. :wink:

His website (Japanese):
http://x11.s11.xrea.com/

His FFV patch collection on RHDN:
http://www.romhacking.net/hacks/3766/

All provided information is in Japanese. Therefore, I am working on translations. You can download the translated txt files right here!
« Last Edit: April 18, 2018, 05:51:05 AM by Xardas »

Squall

  • Dark Dragon
  • *
  • Posts: 486
    • View Profile
Re: Inu's Patches
« Reply #1 on: April 14, 2018, 03:55:16 AM »
he gave permission to use his patches and sourcecodes!
Excellent work Xardas!!!

He has done quite some work. I checked the asm folder and there are plenty of interesting things :D
Unfortunately the comments are in Japanese :(

Xardas

  • Siren
  • *
  • Posts: 75
    • View Profile
Re: Inu's Patches
« Reply #2 on: April 14, 2018, 08:44:48 AM »
Unfortunately the comments are in Japanese :(
Yes, I'll try to translate the comments for you guys. Starting with "ff5_core.asm":

[Those seem to be about battle messages]
1st block: 攻撃が失敗した場合でも表示するメッセージ (Messages shown when an attack* fails)
2nd block: 味方の攻撃時に表示するメッセージ (Ally attack* messages)
3rd block: 敵の攻撃時に表示するメッセージ (Enemy attack* messages)
*The japanese word literally means attack, but I'm pretty sure in FF context, this might be used for "action" rather than just "attack".

4th block: 戦闘プログラム (Battle program (?) (maybe mechanics?))
  • JSR $0053       ; 各種レジスタを初期化する (reset all registers)
  • STZ $7CD8       ; 戦闘リセットフラグ (1: ON) (Battle reset flag (1: on))
  • JSR $4CE0       ; 戦闘開始処理 (Start-of-battle routine) (?)
  • LDA $7CD8       ; 戦闘リセットフラグ (1: ON) (Battle reset flag (1: on))
  • JSR $0053       ; 各種レジスタを初期化する (reset all registers)

Are these translations helpful / do they make sense to you? If so, I will continue translating.

C. V. Reynolds

  • Tunnel Armor
  • *
  • Posts: 153
  • RATED TEM OUTTA TEM.
    • View Profile
    • cvreynolds.net
Re: Inu's Patches
« Reply #3 on: April 15, 2018, 05:42:45 AM »
This is interesting to me. I'm glad to learn of Inu's impressive hacking history for FFV. I'd like to incorporate these into my personal FF5 bug-fix comp. But the problem is that I don't know what all these patches do. Could anyone give any help regarding that?

A few specific questions:

What's the difference between ff5_mimic_blank and ff5_mimic_weapon?
What's the difference between ff5_magicshell, ff5_magicshell_fast, ff5_magicshell_group, and ff5_magicshell_reflect?
Which patches are already covered by patches outside of Inu's?
I'm the former Hollywood Narrator from GameFAQs.

I'm a published novelist. My novels "Universe Eleven Series - Blue Ruin" Part 1, Part 2, and Part 3 are for sale on Amazon (check my website) in print and ebook formats.

Xardas

  • Siren
  • *
  • Posts: 75
    • View Profile
Re: Inu's Patches
« Reply #4 on: April 15, 2018, 08:38:03 AM »
This is interesting to me. I'm glad to learn of Inu's impressive hacking history for FFV. I'd like to incorporate these into my personal FF5 bug-fix comp. But the problem is that I don't know what all these patches do. Could anyone give any help regarding that?
If the demand is high enough, I will translate all the Japanese text. Also, someone gotta tell me if my translations make sense, since it would be wasted time if the translations aren't good enogh.
Some of the fixes address bugs I never heard of.
Quote
What's the difference between ff5_mimic_blank and ff5_mimic_weapon?
What's the difference between ff5_magicshell, ff5_magicshell_fast, ff5_magicshell_group, and ff5_magicshell_reflect?
Which patches are already covered by patches outside of Inu's?
1)
ff5_mimic_blank If you mimic an action where someone used an empty spot (weapon) as an Item in battle, the character who used mimic will just use "Magic Sword Fire". This behavior is fixed with that patch.
ff5_mimic_weapon This patch makes it possible to mimic someone who used a weapon as an item.

2)
ff5_magicshell If the character already is in Shell status, Magiwall won't trigger.
ff5_magicshell_fast Magiwall is now treted as a counterattack and therefore the action is executed faster.
ff5_magicshell_group If more than one character drops in critical state at the same time, every of those characters (who has Magiwall equipped or innate) now gets Magiwall, instead of just one.
ff5_magicshell_reflect Magiwall now trggers when the character in question is in reflect/wall status.

3)
As far as I looked in, Power Drink and Butz' Blue Mage sprite bug fixes have been made by Inu and by other people.
Inu also has a Kiss of Blessing fix - however, his fix works differently. He changed an unused bit into "Kiss of blessing immunity", which then must be set on every seperate monster you want to be immune. IMHO, instructrtrepe's fix is better.

Don't forget that there is no guarantee that every patch is compatible with RPGe's translation! E.g. the Lv.5 Death fix unfortunately does not work on the translation. I only tested a couple of the patches so far.

Squall

  • Dark Dragon
  • *
  • Posts: 486
    • View Profile
Re: Inu's Patches
« Reply #5 on: April 15, 2018, 09:47:57 AM »
Are these translations helpful / do they make sense to you? If so, I will continue translating.
Yes very helpful!!!
 
But if you do it in that way, its is hard to read after that. Could you get a file and replace Japanese with the English translations, while keeping the layout of the file? That is important to see the translation in the context, so we can understand what Inu is doing? Something like:
Code: [Select]
;--------------------------------
; Battle program (?) (maybe mechanics?)
;--------------------------------
org $C20003
BATTLE_MAIN:
    PHP
    REP #$30
    PHB
    PHD
    PHA
    PHX
    PHY
    SEP #$20
    JSR $0053       ; reset all registers
    JSR BATTLE_INIT
    STZ $7CD8       ;Battle reset flag (1: on)

Quote
Also, someone gotta tell me if my translations make sense, since it would be wasted time if the translations aren't good enogh.
No it is not a waste! Your translation will be much, much better then what google will do. If you have doubts or different versions - please add them too, let the reader decide (or you can share here and together from the code context decide)
« Last Edit: April 15, 2018, 09:53:58 AM by Squall »

Xardas

  • Siren
  • *
  • Posts: 75
    • View Profile
Re: Inu's Patches
« Reply #6 on: April 15, 2018, 12:20:16 PM »
Don't worry about the formating - I plan to translate the txt and upload the translation as txt as well.
I will first translate the readme file, then I'm gonna continue with the source codes.
Until then, you can try accessing the readme via RHDN - this is a short english version, although not translated very well.

Squall

  • Dark Dragon
  • *
  • Posts: 486
    • View Profile
Re: Inu's Patches
« Reply #7 on: April 15, 2018, 06:59:54 PM »
I will first translate the readme file, then I'm gonna continue with the source codes.
Until then, you can try accessing the readme via RHDN - this is a short english version, although not translated very well.
OK. If its possible, please prioritize the 'core' file. This is where the interesting part is. It contain not only fixes, but memory variables aka: ROM/RAM map. I know I will add plenty of new entries in my 'extended ROM map'. Also the code is well formatted and commented, so its super easy to read (and understand). I've read the whole core as I'm reading a book :D

Fun fact: Have you noticed that monster encounter always have max of 7, although the mechanics allow 8? It seems that design is not by chance ... the battle code (in C2) actually limit it too. Inu has made a fix for this ... but I don't think its a bug rather intended. I know that some the magic animation when used on 8 targets freeze the code (regardless is it a bug or hardware limitation)

Praetarius5018

  • Vargas
  • *
  • Posts: 88
    • View Profile
Re: Inu's Patches
« Reply #8 on: April 16, 2018, 01:28:41 AM »
I've had some trouble with 8 monster encounter;
e.g. targetting the 8th monster with a single target attack would aim at "something" different, specifically the attacker's position - 1 (so 3rd hero hits 2nd hero) and obviously if the first hero does that you get a major crash.
Also multi target animations are optimized for 5 or 6 monster, with 7-8 you get glitchy graphic overflows and in some cases crashes - that one was insanely hard to track down, I tell you.

Looking through the formations you'll see enemy spot 8 is never set and the bigget group of monsters alive at the same time is 6 - purely as a workaround.

Squall

  • Dark Dragon
  • *
  • Posts: 486
    • View Profile
Re: Inu's Patches
« Reply #9 on: April 16, 2018, 02:53:26 AM »
Looking through the formations you'll see enemy spot 8 is never set and the bigget group of monsters alive at the same time is 6 - purely as a workaround.
Exactly!
According to Inu, this fixes the code limitation:
Code: [Select]
;--------------------------------
; 8 番目のモンスターを対象に指定できるように修正
;--------------------------------
org $C29510
FIX_EIGHTH_MONSTER:
    CPY #$000D      ; <- CPY #$000C
But hearing of your problems, I doubt that is the only place.

BTW Praetarius5018, you made a huge hack. Does it happen to delve in magic/weapon animations? Also are you familiar with DMA/HDMA?

Xardas

  • Siren
  • *
  • Posts: 75
    • View Profile
Re: Inu's Patches
« Reply #10 on: April 16, 2018, 09:54:20 AM »
I have completed the translation of the readme file.
There are some bugs that I am not sure if I fully understood them. You will find some question marks. I am also pretty sure that the txt includes typos.
Therefore, I'll just treat it as a beta version. There will be an update for sure.
Any feedback and/or correction is welcome.

You will find the translations in the first post of this thread.
« Last Edit: April 18, 2018, 05:44:43 AM by Xardas »

Praetarius5018

  • Vargas
  • *
  • Posts: 88
    • View Profile
Re: Inu's Patches
« Reply #11 on: April 16, 2018, 11:29:12 AM »
@Xardas, thanks for the translation work!
looking forward to the rest

Looking through the formations you'll see enemy spot 8 is never set and the bigget group of monsters alive at the same time is 6 - purely as a workaround.
Exactly!
According to Inu, this fixes the code limitation:
Code: [Select]
;--------------------------------
; 8 番目のモンスターを対象に指定できるように修正
;--------------------------------
org $C29510
FIX_EIGHTH_MONSTER:
    CPY #$000D      ; <- CPY #$000C
But hearing of your problems, I doubt that is the only place.
My fix for that bug changed a different byte but the result should be the same mathematically:
$C2/9517 A8 to EA

as for the cast vs-8 targets animation issue, I've made a topic on that earlier and that's worked so far.


BTW Praetarius5018, you made a huge hack. Does it happen to delve in magic/weapon animations? Also are you familiar with DMA/HDMA?
Not really, I've only manipulated what LightPhoenix has dubbed Effect Master Table (D8/38EC) in his animation guide. (breakpoint on $C1/A853 gives the first byte of the starting animation)
That was enough to create good-enough spell animations for my new spells.
The hardest part ofc were the spellblade effects as there was almost nothing to work with ._.

Squall

  • Dark Dragon
  • *
  • Posts: 486
    • View Profile
Re: Inu's Patches
« Reply #12 on: April 16, 2018, 11:54:17 AM »
Thank you Xardas! Its very readable!

Here you are few things I spotted:
Code: [Select]
Some patches require the installation of another patch in BEFORE
in order to work properly.

Error fixed where sometimes a character who is not supposed to
      got the first turn in battle nevertheless

ff5_old_timer.ips
    Paralyze and Mute now now last the appropriate time on aging targets.

 :edit:
BTW Praetarius5018, you made a huge hack. Does it happen to delve in magic/weapon animations? Also are you familiar with DMA/HDMA?
Not really, I've only manipulated what LightPhoenix has dubbed Effect Master Table (D8/38EC) in his animation guide. (breakpoint on $C1/A853 gives the first byte of the starting animation)
That was enough to create good-enough spell animations for my new spells.
The hardest part ofc were the spellblade effects as there was almost nothing to work with ._.
What about DMA/HDMA? The things is - I understand the concept, I understand how to 'read' it, BUT it make no sense to me.
« Last Edit: April 16, 2018, 12:24:04 PM by Squall »

Xardas

  • Siren
  • *
  • Posts: 75
    • View Profile
Re: Inu's Patches
« Reply #13 on: April 16, 2018, 02:39:59 PM »
Code: [Select]
Some patches require the installation of another patch in BEFORE
in order to work properly.

Error fixed where sometimes a character who is not supposed to
      got the first turn in battle nevertheless

ff5_old_timer.ips
    Paralyze and Mute now now last the appropriate time on aging targets.
Not sure if you address grammar errors or typos, or issues with understanding.
I admit that the first example here is phrased sloppy. But I think it should be clear what I meant. The new phrasing is:
Code: [Select]
Some patches only work properly when another specific patch (usually ff5_core.ips or ff5_ext.ips)
is already applied in before. In that case, the required patch is mentioned in the explanation.
If the required patch is changed/updated, you must uninstall all patches which require that file,
apply the new version, and then re-install the patches which required said patch.
The second sentence is also not phrased well. It now reads:
Quote
Sometimes a character who is not supposed to gets the first turn in a battle.
This error is fixed. (?)
I am not sure what is fixed here - I remember that sometimes when characters had similar agility and weight, the character with more weight/less agility still sometimes got the first turn. But AFAIK, there is a little bit of randomness when generating the ATB bar for the first turn. So I do not know if the fix is about this "issue".
As for the third sentence, if you are pointing at the double "now" - this is fixed by now now. xD
If it is about the content - apperantely, silence and paralyze lasted too long on aging characters.

I am not complaining if you point out grammar or spelling errors - doing that is no problem at all. But before doing that, can you please focus on the content? It is more important for now to know, what exactly is fixed (= if the translation is correct). The sentences with (?) are those where I am not sure.

 :edit:
I will start with the source code soon, so you guys do not have to dive into the Japanese comments and hope for good results on Google Translator or dictionaries (looking especially at you, Squall  :laugh:)
« Last Edit: April 18, 2018, 05:45:00 AM by Xardas »

Squall

  • Dark Dragon
  • *
  • Posts: 486
    • View Profile
Re: Inu's Patches
« Reply #14 on: April 16, 2018, 03:37:56 PM »
Quote
Not sure if you address grammar arrors or typoes, or issues with understanding.
TBH I understand what you mean (actually Inu) without a need for correction.
But since you asked ... :)
Anyway, sorry that I didn't add a line what is wrong, but you got all 3 right!