øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=printpage;topic=2134.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexfd65-2.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=2134.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexfd65-2.html.zx´@h^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ P,ò$OKtext/htmlISO-8859-1gzip0|Öò$ÿÿÿÿÿÿÿÿWed, 11 Mar 2020 01:53:16 GMT0ó°° ®0®P®€§²ð®³@h^ÿÿÿÿÿÿÿÿ¬½ò$ Print Page - FFV Viewer

Board of Slick

Library of the Ancients => Final Fantasy V Research & Development => Topic started by: Squall on October 27, 2015, 07:14:10 AM

Title: FFV Viewer
Post by: Squall on October 27, 2015, 07:14:10 AM
Hey guys,

while I was learning how the info for weapons is stored an application emerged. As a token of thanks to the great support (mainly Jorgur *respect*) I'm sharing it with you.
It was written for specific purpose - learning and export the accumulated data for my damage calculation project, but regardless I will be happy to hear from you your comments, suggestion or critics :)

Download: :edit: Images (zip) (https://drive.google.com/file/d/0B9eDezdHI7RWZnpfX29aTEZRcXM/view?usp=sharing)  Maps (zip) (https://drive.google.com/file/d/0B9eDezdHI7RWRHBKSkN1TjNLbHc/view?usp=sharing)  Music (zip) (https://drive.google.com/file/d/0B9eDezdHI7RWdE5VUHRWeF9oSDA/view?usp=sharing)   7.2 (exe-only) (https://drive.google.com/file/d/0B9eDezdHI7RWazdsQ2VGSzdFVUk/view?usp=sharing)
You will need .smc or .gba file!
In order to see images, download both files and extract 'Images' folder where the .exe is!


 :xzone: Versions:
1.0  Can read SNES files (with headers)
1.1  Can read GBA files (tested with '2564 - Final Fantasy V Advance (U)(Independent)' )
1.2  Added all missing info. Now it read correctly all SNES files (with or without a header)

2.0 Major update. Name changed. Can read armor info (SNES only). A new Text section for GBA/SNES <-> ANSI text conversation. Fully read Weapon, Armor, Magic & Description text from ROM.
2.1 Many visual changes. Corrected SNES no header reading routines. Added missing info on ChikenKnife FX.
2.2 Can read GBA armor info, including Element/Status table. Export to CSV.

3.0 Major update. Can read Enemy/Monster info & AI script (SNES only).
3.1 Internal structure redesigned. Drop/steal info added.
3.2 Now work for GBA too.

4.0 Major update. Can read Magic info (SNES only)
4.1 Full parsing on all magic/abilities! Some minor bug fixes.
4.2 Added GBA info (big thanks to x0_000).

5.0 Name changed. Added Job/Ability tabs (SNES only).
5.1 Full parsing on all Job/Ability (SNES only).
5.2 Added GBA info (big thanks to x0_000).
5.3 Added Usable Items section. Added more filters in different tabs. Export moved in Text tab.
5.4 Many small fixes for GBA Enemy content & Display Info
5.5 Added Job Sprites & Palettes. Now you may see all frames in the battle for all characters & all jobs (SNES only!)
5.6 Added Monster Image as it is in the ROM (SNES only!, no Compression flag)
5.6.1 Now handle Compression flag  (SNES only!)

6.0 Added Encounters. You can see the battle, hear the music ^^. Added interactive WorldMap encounter selection! (SNES only!)
6.1 Added missing Encounters - Monster-in-a-box treasure, Dungeons, Event related. (SNES only!)

7.0 Added Background tab (GBA only!) Added LZ77 GBA compression. Added Monster Graphics (GBA)
7.1 Various bug fixes and small changes
7.2 Added Font (GBA only for now)

 :xzone: Credits:
Great icon artwork from Alforata (http://alforata.deviantart.com/art/Super-Nintendo-Rom-Icons-119694994)
Sprites extracted from FF1&3 by The Spriters Resource (http://www.spriters-resource.com/)
Initial 'guide' by samurai goroh (http://erick.guillen.com.mx/FFV_Editor.htm)
Title: Re: SNES Weapon viewer
Post by: samurai goroh on October 27, 2015, 10:00:15 AM
I tried downloading the file but it's a .bpl file, which I don't know which program it uses (well a search tells me is likely a Delphi file, but I was expecting an .exe so I can run it w/o needing to install anything). Also it has an odd name...

As for the data in the GBA, x0_000 posted this information on another topic (http://slickproductions.org/forum/index.php?topic=2043.0)

Quote
Items

Weapon Table - 0x155810
Basic stats of weapons. Each entry is 12 bytes long, and the data mostly matches the SNES notes (although the order is changed.) Weapons *must* have ID < 128. The new byte order is 8 9 A B 0 1 4 2 3 5 6 7 (See this doc for the meaning of each index.)
Accessory Table - 0x1462d0
Basic stats of any equippables that aren't weapons. Each entry is 12 bytes long, and I think (need to double check) that the order is the same as weapons. Accessories *must* have ID between 129 and 223.
Item Table - 0x148fbc
Basic stats of consumable items. Unlike the previous two, each entry is 8 bytes long. Consumables can have any ID above 224.
Title: Re: SNES Weapon viewer
Post by: Squall on October 27, 2015, 11:00:44 AM
Sorry, my mistake - wrong link, I will fix it in a minute.

 :edit: Link is now fixed. I hope its ok now.

I've read careful x0_000 post and tried to extract the same info ... it didnt work, I even tried 4 bytes search, copied from SNES rom, couldnt find a match ... maybe I'm doing something wrong?
Is data crypted in the file? Is file offset the same as entry points? (because in SNES I need to subtract C00000)
Title: Re: SNES Weapon viewer
Post by: Jorgur on October 27, 2015, 06:08:04 PM
Neat program, but it doesn't seem to display the information correctly. My ROM doesn't have a header, maybe that's why?

 :edit:
This might be relevant:
http://slickproductions.org/forum/index.php?topic=1060.0
Title: Re: SNES Weapon viewer
Post by: Squall on October 28, 2015, 02:37:02 AM
Neat program, but it doesn't seem to display the information correctly. My ROM doesn't have a header, maybe that's why?
Yes, the file offset is calculated with 0x200 header. I've tested with mainly with 'Dark Knight Kain' but it seems ok with RPGe, EasyType 1.1 & DeJap 1.03.

How I can check (with code ofc) for Header? Is the header size a constant?
Title: Re: SNES Weapon viewer
Post by: Jorgur on October 28, 2015, 08:54:15 AM
Yes, the 0x200 header is constant. Programming isn't my strong point, though. Maybe a filesize check of some kind?
Title: Re: SNES Weapon viewer
Post by: samurai goroh on October 28, 2015, 09:02:17 AM
Headers are usually the size of 0x200, but don't assume that will always be the case. What you can assume is that a ROM file should be in chunks of size 0x8000, so doing a modulo and checking if there's a reminder that would be the size of the header (if any).

Here's what I have in my editor (in Visual Basic):

Code: [Select]
Public Sub GetHeader(freefile)
    Dim length As Long

    length = LOF(freefile)
    Header = length Mod &H8000

End Sub
Title: Re: SNES Weapon viewer
Post by: Jorgur on October 28, 2015, 09:22:48 AM
Quote
Headers are usually the size of 0x200, but don't assume that will always be the case.
So you get the modulo remainder and assume that to be the header?
Title: Re: SNES Weapon viewer
Post by: Squall on October 28, 2015, 11:28:14 AM
Hey guys I uploaded a version 1.1. Now it can read .gba but it seems to work with '2564 - Final Fantasy V Advance (U)(Independent)'. There, the ROM map suggested by x0_000 is identical.
I tested it with '2727 - Final Fantasy V Advance (E)(Eternity)' but weapons data starts at 0x157700 (header again?).

O btw another interesting feature in 1.1 is that you can see the 12 bytes as they should appear in GBA file (for easy Hex search).
I added the GBA extra weapon names from here: http://www.cavesofnarshe.com/ff5/weapons.php (http://www.cavesofnarshe.com/ff5/weapons.php)

Thank you @samurai goroh, I will try your suggestion for headers tomorrow.
Title: Re: SNES Weapon viewer
Post by: Squall on October 28, 2015, 11:37:28 AM
One interesting thing was comparing extracted data for extra weapons from gba with that of 'caves of narshe' ... I have to admit I found a huge difference. The best katana Mutsunokami has clearly 30% crit, but they state 50%. I found that @Djibriel in http://www.gamefaqs.com/gba/930369-final-fantasy-v-advance/faqs/61876 (http://www.gamefaqs.com/gba/930369-final-fantasy-v-advance/faqs/61876) states 50% too...
 :hmm: So I was wondering ... were they both using bad info (maybe same source) or had the game been 'nurfed', so there are releases with 50% (probably old) and with 30% (probably newer)
Title: Re: SNES Weapon viewer
Post by: Jorgur on October 28, 2015, 08:23:51 PM
Does this program have a name? "SNESParser" is a little vague, isn't it?

 :edit:
It would be neat if it used the weapon names from the ROM, so I could check out the weapons from FF5 Ancient Cave.  :tongue:
Title: Re: SNES Weapon viewer
Post by: Squall on October 29, 2015, 03:08:45 AM
Quote
Does this program have a name? "SNESParser" is a little vague, isn't it?
Hehe I think I state it clear enough that this program emerged, and wasn't intended. So I just named it to have a project name (in Delphi) but didn't really put some thinking in it :D Anyway if you guys have a suggestion - I will gladly change it.

Quote
It would be neat if it used the weapon names from the ROM, so I could check out the weapons from FF5 Ancient Cave
I like to 'drink from the source' ... meaning I prefer to get my data from a ROM rather then somewhere else. That include the names. But to do so I will need more info on how to extract names and to be honest I have no time do it on my own.
So far I know the entry point of texts and from your last link that they are 'crypted' using 'letter-frequency based table'. If this data is not compressed in a rom (GBA) it should be a simple table based transformation to ASCII. If it is compressed ... this will stay on hold :D

P.S. Nobody said something about the huge difference in stats from a gba rom and couple internet places that I mention ... and while Crit is a hidden stat so its hard to 'prove', Apocalypse has Boost: Stats - Strength+3 Stamina+3 in the ROM, but no such things mentioned in the caves.
Title: Re: SNES Weapon viewer
Post by: x0_000 on October 29, 2015, 04:21:35 PM
(E) and (U) is referring to the region; U is american and E is european so they are in fact different ROMs. All my notes are for the (U) ROMs.The text table is uncompressed data, I don't know the full conversion table, but I've done some text editing in the GBA ROM and have a partial reference: http://pastebin.com/mPJv1LUZ
Quote
Text Pointer Table - 0x36DD54
Points to text data in the ROM. This table is formatted unusually, each entry is a word long which indicates how far (relative to the offset 36dd54) the text begins. Note that the word at 36dd60 is the size of the combined text data. Editing text is very annoying; the next entry indicates when the first entry ends, so editing a text to be longer than the original entry would require repointing everything after, and then fixing all the offsets.
Title: Re: SNES Weapon viewer
Post by: Squall on October 30, 2015, 03:43:09 AM
Hey guys, a new version 1.2 was released:
- added 'back row' info
- added all missing info in Action:
* status inflicting info (darkness/killer bow)
* Rune info
* 'const dmg' info (Excalipoor)
* parsing of formula: 8E (Demon's Rod - GBA+)
- SNES header info, now it can read roms without headers, also roms with 'non-traditional' length ('Final Fantasy V - EasyType 1.1 by jce3000gt [h1].smc' & Final Fantasy V - Expert 0.947 by jce3000gt [h1].smc)

Let me share a little bit more about the last point ... initially I tried @samurai goroh suggestion to detect headers in SNES ROMs. It worked fine for most files, except jce3000gt ones. FileLength mod $8000 returns 513/544, but header itself is 512($200). So I corrected the routine:
Code: [Select]
    n := GetFileSize(f, nil);
    n := n mod $8000;
    n := $200 * ord (n > 0);
n is the size of the header, in other-words correction for the offset to weapon info.

P.S. Finally I understood how to extract/parse 'Back Row' info without hard-coding it  :laugh:
Title: Re: SNES Weapon viewer
Post by: Squall on October 30, 2015, 04:19:08 AM
Hey @x0_000 welcome back. I hopped that you will see these posts, because I use your GBA notes as reference :)

Please, help me understand this dump from '2564 - Final Fantasy V Advance (U)(Independent).gba', starting with offset 0x36DD54:
Code: [Select]
Offset      0  1  2  3  4  5  6  7   8  9  A  B  C  D  E  F

0036DD50               00 00 00 00  54 45 58 54 01 79 17 00           TEXT y 
0036DD60   1D 83 04 00 F4 5D 00 00  F6 5D 00 00 F8 5D 00 00    ?  ?]  ?]  ?] 
0036DD70   FA 5D 00 00 FC 5D 00 00  FE 5D 00 00 00 5E 00 00   ?]  ?]  ?]   ^ 
0036DD80   02 5E 00 00 04 5E 00 00  06 5E 00 00 08 5E 00 00    ^   ^   ^   ^ 
0036DD90   0A 5E 00 00 0C 5E 00 00  0E 5E 00 00 10 5E 00 00    ^   ^   ^   ^
Title: Re: SNES Weapon viewer
Post by: x0_000 on October 30, 2015, 06:04:55 PM
Basically in GBA ROMs, words (4 byte entries) are written in reverse endian; for example if the game referenced a value of 0x12345678, the value would be encoded in the ROM as the bytes 78 56 34 12. For the text pointers, the first text entry starts at 0x36dd64 (the value written there is 0x5df4.) So if you go 0x36dd54 + 0x5df4, that is 0x373B48, you would find the start of the first text entry, uncompressed.

For a more concrete example, the text for the Gladiator job has ID 0xe24, so the offset is located at 0x36dd64 + 4*0xe24, which is 0x3715F4. At that offset is the word 0x3dfd8, so the text for Gladiator starts at 0x36dd54 + 0x3dfd8, which is 0x3abd2c. So if you go to that offset and translate using the text table, you get Gladiator.

If you want to find the item names, there's a good chance the names are stored in the same order as the item IDs, so if you can find one name you can reverse engineer the text IDs for each item.
Title: Re: SNES Weapon viewer
Post by: Squall on November 02, 2015, 11:30:39 AM
Hehe I manage to extract the names using statistical searches, but its good to know exact steps. I will not upload this version. It will simply merge with a major update that I'm working atm - adding armor data. Currently I finished most of it, however I lack some info:
- the armor info in GBA. At 1462d0 I cant find that info and any of searches that I tired didn't work.
- Elemental Defense (+A) of gear ... It seems that info is not directly includes in these 12 bytes. Is there a separate table that handle that or it is hard-coded?
- Status Defense (+B) - same as Elemental Defense.

P.S. Does somebody knows full text translation table for GBA? The one that I have only have chars till 5C. Many times I find C2 87 or C2 8E in the text ... is that a picture, new line or ...?
Title: Re: SNES Weapon viewer
Post by: Jorgur on November 02, 2015, 07:52:49 PM
Quote
- Elemental Defense (+A) of gear ... It seems that info is not directly includes in these 12 bytes. Is there a separate table that handle that or it is hard-coded?
- Status Defense (+B) - same as Elemental Defense.
A separate table:
http://slickproductions.org/slickwiki/index.php/Jorgur:FF5_Item_data#Element_defense_definitions
Title: Re: SNES Weapon viewer
Post by: x0_000 on November 03, 2015, 12:38:56 AM
P.S. Does somebody knows full text translation table for GBA? The one that I have only have chars till 5C. Many times I find C2 87 or C2 8E in the text ... is that a picture, new line or ...?
They might be control codes for game events, like [Wait for player to press A] or [Load portrait X]. You'd basically have to make text with those codes to figure out what it does exactly.
Title: Re: SNES Weapon viewer
Post by: Squall on November 03, 2015, 01:52:28 AM
Jorgur, if I understood well the byte at +A in gear info is a simply an index into 'Element defense definitions' (D1/2580) table? Same goes for for +B but in Status table?

BTW what is the difference between:
Code: [Select]
1 [Element] evade
2 [Element] immunity
If you evade (100%) an element isnt it the same as been immune to it? Or there is a separate code that handle evasion ... in such case there should be a % to it
Title: Re: SNES Weapon viewer
Post by: Jorgur on November 03, 2015, 02:11:30 AM
Jorgur, if I understood well the byte at +A in gear info is a simply an index into 'Element defense definitions' (D1/2580) table? Same goes for for +B but in Status table?
Yes.

Quote
BTW what is the difference between:
Code: [Select]
1 [Element] evade
2 [Element] immunity
If you evade (100%) an element isnt it the same as been immune to it? Or there is a separate code that handle evasion ... in such case there should be a % to it
It's been so long since I wrote the docs, I forgot. It could be just an unused byte, or maybe there is a different functionality, I don't know.
Title: Re: SNES Weapon viewer
Post by: samurai goroh on November 03, 2015, 09:46:51 AM
Elemental Evasion is not used in this game, only Elemental Immunity is used.
Title: Re: SNES Weapon viewer
Post by: Jorgur on November 03, 2015, 07:37:25 PM
So, there is no ASM code that uses that particular byte?
Title: Re: SNES Weapon viewer
Post by: samurai goroh on November 04, 2015, 07:45:01 AM
Quote
BTW, what's the elemental evade? is it the "Can't Evade" certain type of magic or does it really exist a space for elements always hitting?

Elemental "evade" for lack of a better term isn't to my knowledge used, but I'd have to double check my notes to be 100% sure about.  The basic premise is that when you're immune, the attack still counts as a hit even if there's no damage.  The "evade" is basically the same as immune, but counts as a miss.  It's the byte between Absorb and Immunity (7E/2031).  In theory it would be used as a better form of immunity, where immunity only prevents damage and evade prevents damage and secondary effects since it's a miss.  However, I don't believe this ever ends up getting used.

I also have in my RAM notes a space between elemental Absorb and Immunity that would seem to be reserved for that, modifying it has no effect

Code: [Select]
7E0530 XX          1st Player Elemental Absorb                      1.3a
7E0531 XX          1st Player Elemental ??? (n/u?)
7E0532 XX          1st Player Elemental Immunity                    1.3a
7E0533 XX          1st Player Elemental Half                        1.3a
7E0534 XX          1st Player Elemental Weakness                    1.3a
Title: Re: SNES Weapon viewer
Post by: Squall on November 04, 2015, 10:45:45 AM
After couple of days of hard work a new version was released :)

- Since code became 2000+ lines and hard to read I reorganized it separate units. Now its really easy to focus on GBA or SNES only.
- New section: Armor
- New section: Text - you can play in converting PC (ANSI) text <-> GBA/SNES. If you use a regular copy a text could be truncated/transformed, so the safe way is hex.
- All text for Weapon, Armor, Description & Magic comes from ROM.
* In Text section there is a small neat feature - you may see GBA texts packed in the chunk starting of 36DD54. Now text is read not by offset but by index. I hope that will help to easy incorporate parsing of different GBA versions of the game.

 :lock: Please help me to locate Armor info in GBA!!!
Title: Re: FFV Gear Viewer
Post by: Jorgur on November 04, 2015, 08:55:58 PM
I like the new features, but it looks pretty bad - at least on Windows XP. You might want to use a font where all the characters have the same length, such as Courier:

                +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B
Raw Data (hex): 08 05 11 80 00 00 14 02 00 00 00 00
Raw Data (dec): 8 5 17 128 0 0 20 2 0 0 0 0

Gear Slot:   Shield
Gear Type:   Shield
Weight:        5 ($05)
P. Defense:    2 ($02)
P. Evade:     20 ($14)
M. Defense:    0 ($00)
M. Evade:      0 ($00)
Boost: Stats -
Special:     

Elemntal Def: 00 00 00 00 00
        Absorb -
        Evade  -
        Immune -
        Half   -
        Weak   -
Status Def:   00 00 00 00 00 00 00
        Auto   -
        Immune -


Also, the text is not correct when using a ROM without header.

 :edit:
Found a typo. In the pop-up field on the right for armor it says "Phisical dodge". It should be "Physical".

 :edit:
It seems you have mixed up the Gear Types "Heavy armor" and "Light armor". Those two should be swapped.

 :edit:
For Initial Status, bit 80 in "Status 0" does not give Death status. It makes the other initial statuses last forever, i.e. "Always".
Title: Re: FFV Gear Viewer
Post by: Squall on November 05, 2015, 10:05:05 AM
Thank you Jorgur for your input. I was using a font that is with fixed width 'Lucidas' because its quite narrow, but maybe not all have it so I switched to 'Courier New'. Now I hope it will be ok for you too. But because of that change, many visuals needed adjustment and I had plans to redo part of it for later on ... so it seems the time came earlier :)

I was wondering myself about 'Death' property of some items, thank you for explaining its meaning in this case. BTW that 'Always' ... does it mean that come back if you get revived in a battle?

About gear type confusion ... its how the info is recorded in the ROM. They come with byte set as $16, for example Crystal Armor is:
Code: [Select]
            +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B
Data (hex): 02 08 16 80 00 00 00 14 00 02 00 00
Data (dec): 2 8 22 128 0 0 0 20 0 2 0 0

Gear Slot:   Body
Gear Type:   Light armor
Weight:        8 ($08)
and according to this table (http://slickproductions.org/slickwiki/index.php/Jorgur:FF5_Item_data#2:_Throw_.2B_Equipment_type_value) I display 'Light Armor'. I agree that Gold armor, Diamond, Crystal ... should not be light ... and vice verse for some ninja gear ($17 Heavy Armor).

BTW a new 2.1 version is posted with changes to the visuals, parsing of status 'Always', FX for Chicken Knife :D
Title: Re: FFV Gear Viewer
Post by: Jorgur on November 05, 2015, 09:33:52 PM
Oh, that means there is an error in my docs. I'll change it right away.

Quote
I was wondering myself about 'Death' property of some items, thank you for explaining its meaning in this case. BTW that 'Always' ... does it mean that come back if you get revived in a battle?
Probably? I have never tested it.
Title: Re: FFV Gear Viewer
Post by: Squall on November 06, 2015, 01:26:59 PM
Since nobody helped me to find armor table in GBA rom, after heavy battle, today I finally manage to crack that hard nut  :laugh:

It not only starts on different address then the one @x0_000 mentioned, but the main difficulty to located it was the byte order ... its not the same as SNES or GBA Weapons. On top on that it seems that the rom I used as main (darkknight) has some difference ... so I did what usually I do when nothing helps - go as closer to the source as possible - the Japanese rom. From there after few experiment thing started to fill the puzzle.

All that I will implement in next release. I will make a post with my GBA findings (it seems you know all for SNES, so I doubt I will have a new info to write). Please advise should I do it here or different thread. It will be final release for now ... 10th is coming so in next weeks will be Fallout 4 time :)

BTW Stat Boost parsing now shows correct info in all cases. I didnt know what to do in case of '1/-1' or '5/-5'. You really should put more info what it means. Coding from description only gives result different then what it really is :) ...
Anyway, although the logic behind it is complicated, the whole routine became short and very simple. I'm sharing this because I was always wondering why Square makes such complicated logic to save a byte, yet waste many bytes with 0s ...
Title: Re: FFV Gear Viewer
Post by: Jorgur on November 06, 2015, 05:29:10 PM
I will make a post with my GBA findings (it seems you know all for SNES, so I doubt I will have a new info to write). Please advise should I do it here or different thread.
That's your choice. The forum is a good place for minor things, but the wiki might be a better option.
Title: Re: FFV Gear Viewer
Post by: LightPhoenix on November 06, 2015, 07:14:41 PM
I was wondering myself about 'Death' property of some items, thank you for explaining its meaning in this case. BTW that 'Always' ... does it mean that come back if you get revived in a battle?

Isn't that the byte bit that's set for things like Bone Mail that make you undead?
Title: Re: FFV Gear Viewer
Post by: Jorgur on November 06, 2015, 08:16:28 PM
I was wondering myself about 'Death' property of some items, thank you for explaining its meaning in this case. BTW that 'Always' ... does it mean that come back if you get revived in a battle?

Isn't that the byte bit that's set for things like Bone Mail that make you undead?
A bit that makes you undead or a bit that makes the status last forever? There is a bit under "Special properties" that makes you undead.
Title: Re: FFV Gear Viewer
Post by: x0_000 on November 08, 2015, 11:40:41 PM
Since nobody helped me to find armor table in GBA rom, after heavy battle, today I finally manage to crack that hard nut  :laugh:

It not only starts on different address then the one @x0_000 mentioned, but the main difficulty to located it was the byte order ... its not the same as SNES or GBA Weapons. On top on that it seems that the rom I used as main (darkknight) has some difference ... so I did what usually I do when nothing helps - go as closer to the source as possible - the Japanese rom. From there after few experiment thing started to fill the puzzle.

Oops, looks like I typo'd that in my notes.
Title: Re: FFV Gear Viewer
Post by: Squall on November 09, 2015, 01:50:37 AM
I was wondering myself about 'Death' property of some items, thank you for explaining its meaning in this case. BTW that 'Always' ... does it mean that come back if you get revived in a battle?

Isn't that the byte bit that's set for things like Bone Mail that make you undead?
No I was referring to the highest bit on Status 0 (http://slickproductions.org/slickwiki/index.php/Jorgur:FF5_Common_lists#Status_0_.28curable.29). It has double meaning Dead (K.O/Wonded) or Always. Initially in my info I was parsing it wrong - as 'Death' :)
Title: Re: FFV Gear Viewer
Post by: Squall on November 09, 2015, 09:28:21 AM
OK, version 2.2 is out :)

- full support for GBA (finally Armor, Element and Status Defense table are read)
- correct parse of stat boost
- export of Weapon/Armor info to CSV. For now only basic info, later on when I decide what I need for my Damage Calculator I will export pretty much all :)

P.S. If you see any incorrect info, bugs, typos let me know. Also if you have idea what to add/change to make it more usable, comment here.
Also if you think the program is useful feel free to put it on wiki. You have all the rights to use/public or whatever. I dont need/require acknowlegment :D
Title: Re: FFV Gear Viewer
Post by: Jorgur on November 09, 2015, 10:13:23 PM
Instead of asking us to put it on the wiki, why not do it yourself?  :happy:
The wiki doesn't belong to anyone, in fact, it could use some more contributing users.
Title: Re: FFV Gear Viewer
Post by: Squall on November 11, 2015, 02:09:30 AM
Because I have no clue how to add a content in wiki :)
Title: Re: FFV Gear Viewer
Post by: Jorgur on November 11, 2015, 02:36:56 AM
It's not hard. You just click on the Edit button to change things. To create a new page, type in the name of your page in the Search field and hit enter, then click on the red link that appears.
Title: Re: FFV Gear Viewer
Post by: Squall on December 04, 2015, 10:30:43 AM
Finally a version 3 is released. This is a huge update
- Added Enemy Info
- Added Enemy AI parsing
- Added a nice picture of each enemy (from PC version)
- for now works with SNES only!!!
- now raw data (in hex or dec format) is optional, you may choose not to see it :)

I did quite a work over the design itself, because there is so much info ... please comment with your opinion & suggestions to make it easy to use.
There are still things to be done:
- Drop/Steal info
- .gba parsing
- MANY unknown in AI parsing ... any info that you have will greatly increase the readability if the AI script:
* F6 in AI now display the text but I still dont know what first param mean.
* I decoded the meaning of second param of F2 (Unhide), but to get proper parsing I will need to decode Enemy Formation first and then use that info to visualize which enemies will pop-up.
Title: Re: FFV Gear Viewer
Post by: Jorgur on December 05, 2015, 09:06:36 AM
The program is ever expanding. I look forward to the day when we no longer need hex editors.  :whoa:
Have you considering implementing editing functionality? At the rate at which you work, I can definitely see this becoming a fully fledged editor/parser.

The stand-alone .exe works fine, although I don't see those monster images anywhere. However, the .exe in the .zip-archive is a mess. It gives me an error about Dark Knight Kain's ROM, and I get access violation errors all the time when using the Monster viewer. According to file info, it has version 2.2.0.0 whereas the stand-alone .exe has 3.0.0.0.

The AI viewer is pretty neat. Nothing wrong with it as far as I can tell.
Sadly, the monster names are displayed incorrectly for FF5: Ancient Cave. This is because that ROM stores the monster names in a different location (probably the same place as the Jap. version). Not much we can do about it though.
The monster indexes confuse me. One seems to be the monsters' position in the list; the other reflects the true index, except some of the monsters have the same value (e.g. Neo-Exdeath's parts).
I would like to see Weapon names in the main area of the Weapons section, Armor names in the main area in the Armor section and Monster names in the main area of the monster section. This would enable us to copy/paste the names.
Displaying header information would be useful as well.

The overall design seems good. I like how you can quickly change sections on the left side, and hide/show advanced info on the right. Resizing areas and the main window seems to cause a lot of issues, so you might want to consider disabling resizing altogether. Just a thought: You could add a separate section for program settings, such as resizing and displaying raw data.

Some issues:
- When you resize the main area of the Monster viewer the program will sometimes crash. Resizing it too small gives you a non-fatal error.
- If you open a ROM, go to the monster viewer and immediately click on the "info" buttons, you get a non-fatal error. If you instead try to resize the main area in the monster viewer, you get a different error.
- If you hide advance info in Weapons/Armor then go to the Monster editor, the main area becomes tiny.
- Trying to view the Monster info for Minotauros gives you a non-fatal access-violation error.
- The Thunder Rod has an odd glitch (see attachment).
- If you click on Info-hex followed by AI-hex, or Info-dec followed by AI-dec, the Info buttons "turn off". However the info still shows up in the main area as if they were "on".
- I see the list of monsters stops at index 368. According to the ROM map in the wiki, the monster data section has enough space for 384 monsters. This might be a problem with ROM hacks that use all of the space.
Title: Re: FFV Gear Viewer
Post by: Squall on December 07, 2015, 03:14:21 AM
Quote
Have you considering implementing editing functionality? At the rate at which you work, I can definitely see this becoming a fully fledged editor/parser.
Yes I had. The problem is that editing require to show all the things and most of all a design that will allow to tweak. On the otherside parsing is like translating specific info in more human understandable and descriptive way. I'm definitely looking forward for it.
Quote
The stand-alone .exe works fine, although I don't see those monster images anywhere. However, the .exe in the .zip-archive is a mess. It gives me an error about Dark Knight Kain's ROM, and I get access violation errors all the time when using the Monster viewer. According to file info, it has version 2.2.0.0 whereas the stand-alone .exe has 3.0.0.0.
Yeah things got messed up. To see images you need to copy folder Images to where the .exe is. In next version I will separate Images folder and the executable in two separate downloads.
Quote
The monster indexes confuse me. One seems to be the monsters' position in the list; the other reflects the true index, except some of the monsters have the same value (e.g. Neo-Exdeath's parts).
The first index is the index of the monster (starting with 1. Internally the game uses 0-based index, so I will probably change that). The second index is the name index (+1E). All 4 parts of Neo-Exdeath have the same name (index 78) but are different monsters.
Quote
I would like to see Weapon names in the main area of the Weapons section, Armor names in the main area in the Armor section and Monster names in the main area of the monster section. This would enable us to copy/paste the names.
Displaying header information would be useful as well.
I wanted to do it, but here is the dilemma: We have names that come from the ROM. On the otherhand it might be a good idea to have a common naming (regardless of the name in the ROM). So the question is - what name we should use in the info? What name we should use in the list? I'm not sure what 'header information' you refer ...?
Quote
Trying to view the Monster info for Minotauros gives you a non-fatal access-violation error.
I know about that. I need to rewrite my internal structures to be able to fix it. This will happen very soon, because I need it for drop/steal info.
Quote
I see the list of monsters stops at index 368. According to the ROM map in the wiki, the monster data section has enough space for 384 monsters. This might be a problem with ROM hacks that use all of the space
I parse 256 mobs + 112 bosses = 368. That matches the number in 'FFV editor'. I'm not sure about the missing 16 entries ... maybe they are not used?

P.S. BTW in the Neo-Exdeath battle there are 2 dummy entries (#335, #336) ... but we cant target them, neither they take dmg from 'hit-all'. Do you know why they are there?
Title: Re: FFV Gear Viewer
Post by: Jorgur on December 07, 2015, 05:06:38 AM
I wanted to do it, but here is the dilemma: We have names that come from the ROM. On the otherhand it might be a good idea to have a common naming (regardless of the name in the ROM). So the question is - what name we should use in the info? What name we should use in the list?
What I meant was simply put the name from the list on the left in the info area.
Quote
I'm not sure what 'header information' you refer ...?
Header Yes/No and header size.
Quote
P.S. BTW in the Neo-Exdeath battle there are 2 dummy entries (#335, #336) ... but we cant target them, neither they take dmg from 'hit-all'. Do you know why they are there?
I don't know, but I'm sure somebody else here knows.
Title: Re: FFV Gear Viewer
Post by: samurai goroh on December 07, 2015, 08:04:24 AM
I'm sure Exdeath's dummies (335, 336) are actually where it loads the huge image, while the four targets (363 to 366) only have the AI and no sprite
Title: Re: FFV Gear Viewer
Post by: Squall on December 07, 2015, 09:52:26 AM
Version 3.1 is out:
- Internal structures were redesigned (finally :D )
- Added Drop/Steal info.
- Now Minotauros will not give error.
- Overall stability (when re-sizing) should be ok

What do you think about removing lines with '{' & '}' and the leading hex bytes in the 'Simple AI view'? It will make the script much easier to read, but we will loose some raw info ...

Quote
I'm sure Exdeath's dummies (335, 336) are actually where it loads the huge image, while the four targets (363 to 366) only have the AI and no sprite
I dont understand why they decided to do it in so complicated way ... 2 dummies for graphic & 4 sprite (no image) for the real battle. It is far more natural just to associate a picture with the 4 targets (363-366), so when a part dies it vanish from the screen.

BTW is there an index or something that point what picture/sprite should be drawn for a given monster? Also I lack real info on AI condition '05 if in position' ... it doesnt make sense
Title: Re: FFV Gear Viewer
Post by: Squall on December 08, 2015, 09:23:35 AM
Version 3.2 is out:
- now you can see Enemy info from GBA

** There is some missing info for GBA:
- AI script for bosses (cant find it)
- Special info

One interesting thing is that GBA version uses FC the same way as FD (action group), but only when we have a group of 3 actions with 33% chance each.
What 'Mirror'/'Reverse Polarity' does?
I need more info on GBA, please share as much as you can :)

P.S. I'm moving toward formation groups so I can display proper info from F2 (Unhide). Can you give me some overview? In particular I'm interested about coordinates (my guess is battle screen is divided as grid).
Title: Re: FFV Gear Viewer
Post by: x0_000 on December 08, 2015, 05:39:32 PM
Reverse Polarity swaps the party's rows iirc.
Title: Re: FFV Gear Viewer
Post by: samurai goroh on December 09, 2015, 04:18:42 PM
Version 3.2 is out:
- now you can see Enemy info from GBA

** There is some missing info for GBA:
- AI script for bosses (cant find it)
- Special info

One interesting thing is that GBA version uses FC the same way as FD (action group), but only when we have a group of 3 actions with 33% chance each.
What 'Mirror'/'Reverse Polarity' does?
I need more info on GBA, please share as much as you can :)

P.S. I'm moving toward formation groups so I can display proper info from F2 (Unhide). Can you give me some overview? In particular I'm interested about coordinates (my guess is battle screen is divided as grid).
Have you already looked at the GBA Algorithm FAQ?
http://www.gamefaqs.com/gba/930369-final-fantasy-v-advance/faqs/51713

For memory addresses, I have a document:
http://erick.guillen.com.mx/Codes/GBA%20Final%20Fantasy%20V%20Advance.txt

Also, if you haven't got it already, there's a GBA editor for this game:
http://www.romhacking.net/utilities/898/
Title: Re: FFV Gear Viewer
Post by: Squall on December 11, 2015, 02:09:02 AM
Hey samurai goroh,

Quote
Have you already looked at the GBA Algorithm FAQ?
Yes it is a great source to check my parsing there for the gba exclusive content, but pretty much no info on what I need.

Quote
Also, if you haven't got it already, there's a GBA editor for this game
Interesting application I wish I knew about it earlier. The AI parsing there is quite ... unhelpful, but there are some addresses that might be exactly what I need (boss AI scripts)

Thank you very much!
Title: Re: FFV Gear Viewer
Post by: Jorgur on December 11, 2015, 04:24:49 AM
The text will not fit into the window:
Title: Re: FFV Gear Viewer
Post by: Squall on December 11, 2015, 05:15:51 AM
The text will not fit into the window:
Just re-size the window vertically till all the contents pops up. BTW have you seen that there is a spliter between monster Info & AI? Personally I hate when things wrap on next line :)

Jorgur Coordinates (http://slickproductions.org/slickwiki/index.php/Jorgur:FF5_Monster_data#Coordinates) are limited to 4 bits, which is 0..15. How that applies to the screen coordinates? Is the screen divided to MxN squares and coordinates in formation refer to a square?
Title: Re: FFV Gear Viewer
Post by: Jorgur on December 11, 2015, 06:07:04 AM
I haven't looked into it in detail, but my guess is that the coords refer to 8x8 pixel tiles.
Title: Re: FFV Gear Viewer
Post by: samurai goroh on December 11, 2015, 08:21:53 AM
This is what I have on my Lua script regarding the enemy's coordinates:

Code: [Select]
        Position        = memory.readbyte(0x7E4000 + enemy*(0x01)) ,
        PositionY       = bit.lshift(bit.band(memory.readbyte(0x7E4000 + enemy),0x0F),3) + 1,    -- low nibble
        PositionX       = bit.rshift(bit.band(memory.readbyte(0x7E4000 + enemy),0xF0),1) + 5,    -- high nibble
I can't remember right now, but probably the +1, +5 is just for a finer display and shouldn't be taken into account. So yea, all in all they have a separation of 8 (pixels).

Is worth to mention that when you get a back-attack, X coordinates are mirrored:
Code: [Select]
        if BackAttack == 1 then
            PositionX = 240 - PositionX
        end
Title: Re: FFV Gear Viewer
Post by: Squall on December 11, 2015, 09:25:05 AM
This is what I have on my Lua script regarding the enemy's coordinates:

Code: [Select]
        Position        = memory.readbyte(0x7E4000 + enemy*(0x01)) ,
        PositionY       = bit.lshift(bit.band(memory.readbyte(0x7E4000 + enemy),0x0F),3) + 1,    -- low nibble
        PositionX       = bit.rshift(bit.band(memory.readbyte(0x7E4000 + enemy),0xF0),1) + 5,    -- high nibble
I can't remember right now, but probably the +1, +5 is just for a finer display and shouldn't be taken into account. So yea, all in all they have a separation of 8 (pixels).

Is worth to mention that when you get a back-attack, X coordinates are mirrored:
Code: [Select]
        if BackAttack == 1 then
            PositionX = 240 - PositionX
        end

Thank you, thank you very much!!!

If you can tell me how to distinguish who is in front/back, I think I will have all pieces of the puzzle called 'Monster Info'':D

BTW I think I have Unhide decoded around 99%. I'm sure you will be pleasantly surprised of my next version of AI parsing, but first I need to finish decoding formations.
Title: Re: FFV Gear Viewer
Post by: samurai goroh on December 12, 2015, 10:21:24 AM
The problem AFAIK is that there's no flag that tells you when the enemy is in the back, it all depends in how the enemies are positioned.

For whose on the front or back Jorgur has this info:
http://slickproductions.org/slickwiki/index.php/Jorgur:FF5_Monster_data#Coordinates

The SNES algorithm FAQ has a section that mentions who is considered in the back (section 11.5) MONSTER FORMATIONS).

I have the impression of remembering the battle with the Tonberi that only the last one you dealt more physical damage (because he's the closest one). The Algorithm FAQ doesn't mention this, but I'm not sure how accurate that part is (or maybe it could be that I remember wrong...)

Title: Re: FFV Gear Viewer
Post by: Jorgur on December 13, 2015, 03:20:57 AM
I have the impression of remembering the battle with the Tonberi that only the last one you dealt more physical damage (because he's the closest one). The Algorithm FAQ doesn't mention this, but I'm not sure how accurate that part is (or maybe it could be that I remember wrong...)
I've never noticed this. Could it be GBA only?
Title: Re: FFV Gear Viewer
Post by: samurai goroh on December 13, 2015, 03:27:23 PM
Mmm, I tried this just now on the GBA and it would seem it works as normal (no back row penalty). Maybe it was just bad damage rolls I had that coincided with the row...
Title: Re: FFV Gear Viewer
Post by: LightPhoenix on December 13, 2015, 04:23:42 PM
The problem AFAIK is that there's no flag that tells you when the enemy is in the back, it all depends in how the enemies are positioned.

The high bit of 2000,X is set if a player or monster is considered in the back row.  See C2/839B for the major example (adjusts damage depending on attacker/target row).  For enemies, there must be some function that looks at positions and recalculates those flags... it would be pretty easy to find I think.
Title: Re: FFV Gear Viewer
Post by: Squall on March 28, 2016, 08:42:13 AM
It seems I spoke too soon (that I will freeze this project)  :laugh:

Well, a new version 4.0 is out. I have added a Magic tab. Now you may see properties and attributes of selected Magic. It seems that internally most of the abilities are coded as 'magic' and I need that info in order to calc the damage from various commands.

For now it works only for SNES roms. I lack the info, where to find in GBA, so please share all that you know about it. it is based on Jorgur's FF5 Common lists (http://slickproductions.org/slickwiki/index.php/Jorgur:FF5_Common_lists#Magic) and combine in one list:
- D1/0B80-D1/137F: Magic data
- D1/6AB1-D1/6DF8: Ability effect data (Animals, Mix, Terrain actions).
- ??? info on where Chakra, Pray, and some other commands that I cant see in the list

I need similar info from GBA and all data on the new things: Combine, Open Fire, Oath, Predict, Condemn ( I hope they use the same 8 byte structure).
Title: Re: FFV Gear Viewer
Post by: Jorgur on March 28, 2016, 10:13:02 AM
I found some issues.

Typo: Status effect "Pertify"
The parameters for <Dimn>Haste/Hast2 are odd. It says it adds tons of statuses and removes Haste. <Dimn>Slow/Slow2 are similar.
Title: Re: FFV Gear Viewer
Post by: Squall on March 29, 2016, 02:43:24 AM
Thank you very much Jorgur! I really appreciate all kind of mistakes, but typos are harder for me to spot :D

What ROM are you using? I'm using RPGe 1.1 as main, but tested it on 'Enhanced by Dark Knight Kain [h1]', results are:
Code: [Select]
Name:          <Dimn>Slow2
Index:         64
Attack Type:   Time
Hit%:          80
Spell Power:   0
Spell Element:
Status Effect: -(Haste ) +(Slow )
Num of hits:   1
MP cost:       9
Dmg formula:   22 ($16)
Learnable:     NO
Reflectable:   YES
Unavoidable:   NO
Pretty mush is the same is with Haste but reversed:
Status Effect: -(Slow ) +(Haste )
I checked even the Japanese roms -  (J) and (J)[h1], results were the same.

Code: [Select]
16: Reversing status infliction
Speed Drink
Slow, Haste, Slow2, Hast2, Thread
Haste Drink (mix), Vine Hell
1 Hit %
2 [Status 2] removed (inverted)
3 [Status 2] added

P.S. DO you have info for 5E, 5F dmg formulas?
In 0B Param2 mean % for status (Param3), not AtkPower. Also highest bit mean something, but I dont know what
Title: Re: FFV Gear Viewer
Post by: Jorgur on March 29, 2016, 07:25:35 AM
The error is in the side menu. Screenshot attached.

Sorry, I have no more info. Everything I know is already in the wiki.
Title: Re: FFV Gear Viewer
Post by: Squall on March 29, 2016, 09:22:40 AM
I see, the Param 2 is not inverted. Probably I have corrected it after my upload, sorry about that.
 
Soon there will be a new version where this is correct and many (probably all) formulas parsed, so you will not see '???' and hopefully some GBA parsing in it too :D

BTW some status inflicting attacks have duration. What is the measure for it?
Title: Re: FFV Gear Viewer
Post by: samurai goroh on March 29, 2016, 10:38:55 AM
P.S. DO you have info for 5E, 5F dmg formulas?
In 0B Param2 mean % for status (Param3), not AtkPower. Also highest bit mean something, but I dont know what
I have them labeled as follow:
5E = Increase stat while Singing
5F = Creature Type only Damage
Title: Re: FFV Gear Viewer
Post by: Squall on March 30, 2016, 06:34:41 AM
Thank you very much samurai goroh!

With that info a new version 4.1 is out. Now all formulas for magic should be parsed and no '???' should appear. If you see something wrong, incorrect, typos please tell me.

IMPORTANT If you know where the Magic/ability info (8 bytes) is stored in GBA, please tell me even if you are not 100% sure. Also I need hints on where to find the same info for the GBA+ content!!!
Title: Re: FFV Gear Viewer
Post by: x0_000 on March 30, 2016, 08:11:45 PM
The spells are split into two tables (one for white/black/blue/time/monster and one for gaia/mixes/animals/necromancer/a bunch of stuff). The regular spell table is at 08149E7C. Here's a reference for the entries (I forgot to mark it but the first list of spells are the spellblades, the second set of blanks are the spells the summons cast; note that this is distinct from the actual summon spell.):

Code: [Select]
03 01 01 00 00 04 00 82
03 02 02 00 00 04 00 82
03 03 04 00 00 04 00 82
03 04 08 04 00 04 00 81
04 05 00 04 00 02 00 81
04 06 00 40 00 04 00 82
04 07 01 00 00 04 00 85
04 08 02 00 00 04 00 85
04 09 04 00 00 04 00 85
05 0A 00 40 00 04 00 86
03 0B 00 40 00 04 00 88
05 0C 08 00 00 04 00 83
05 0D 01 00 00 04 00 8F
05 0E 02 00 00 04 00 8F
05 0F 04 00 00 04 00 8F
05 10 10 00 00 02 00 8A
05 11 00 80 00 04 00 9E
05 12 00 20 00 04 00 81
10 00 0F 00 B0 02 00 04 cure
1D 78 00 00 38 02 00 01 libra
19 FB FF FF 30 02 00 02 poisona
13 4B 5A 04 B8 02 00 02 silence
14 80 00 40 30 02 00 03 protect
15 5A 00 10 B8 02 00 05 mini
10 00 2D 00 B0 02 00 09 cura
1A 32 00 01 34 02 00 1D raise
13 4B 00 10 38 02 00 04 confuse
13 80 00 02 30 02 00 06 blink
14 80 00 20 30 02 00 05 shell
19 8A 0B FF 34 02 00 0A esuna
11 00 B4 00 B0 02 00 1B curaga
14 80 9A 80 30 02 00 0F reflect
13 80 A0 08 30 02 00 08 berserk
1A 63 00 10 34 02 00 32 arise
06 00 F1 10 38 02 00 14 holy
19 F7 F4 02 38 02 00 8C dispel
06 00 0F 01 B8 04 00 04 fire
06 00 0F 02 B8 04 00 04 blizzard
06 00 0F 04 B8 04 00 04 thunder
12 63 00 04 38 04 00 02 poison
13 5A 00 40 B8 04 00 03 sleep
15 50 00 20 B8 04 00 08 toad
06 00 32 01 B8 04 00 0A fira
06 00 32 02 B8 04 00 0A blizzara
06 00 32 04 B8 04 00 0A thundara
0D 4B 2D 00 38 04 00 8D drain
12 4B 00 40 38 04 00 0F break
0C 08 69 FF B8 04 00 10 bio
06 00 B9 01 B8 04 00 19 firaga
06 00 B9 02 B8 04 00 19 blizzaga
06 00 B9 04 B8 04 00 19 thundaga
08 00 FE 00 38 04 00 27 flare
17 50 00 80 38 04 00 1D death
0E 63 08 00 38 04 00 81 osmose
1E 00 00 00 00 08 00 81 speed
16 5F F7 04 38 08 00 03 slow
14 80 00 01 30 08 00 03 regen
1F 64 00 00 40 08 00 83 mute
16 80 FB 08 30 08 00 05 haste
12 80 80 08 B0 08 00 0A float
07 63 08 00 38 08 00 09 gravity
14 5A 5A 10 38 08 00 08 stop
20 64 00 00 00 08 00 8F teleport
09 00 08 00 38 08 00 87 comet
16 50 F7 04 48 08 00 09 slowga
21 64 00 00 00 08 00 81 return
07 63 0E 00 38 08 00 12 graviga
16 80 FB 08 40 08 00 0F hastega
13 5A 00 80 38 08 00 04 old
09 00 0E 00 48 08 03 AA meteor
22 64 00 00 00 08 00 CD quick
18 32 00 00 38 08 00 14 banish
00 00 00 00 28 10 00 84
00 00 00 00 28 10 00 88
00 00 00 00 28 10 00 82
00 00 00 00 48 10 00 8A
00 00 00 00 48 10 00 8C
00 00 00 00 48 10 00 8B
00 00 00 00 48 10 00 99
00 00 00 00 40 10 00 92
00 00 00 00 28 10 00 A1
00 00 00 00 40 10 00 AD
00 00 00 00 48 10 00 A0
00 00 00 00 48 10 00 B0
00 00 00 00 24 10 00 E3
00 00 00 00 48 10 00 A7
00 00 00 00 48 10 00 C2
5E 00 00 80 00 20 00 80
5E 00 00 40 00 20 00 80
14 80 00 01 40 20 00 80
5E 00 00 10 00 20 00 80
5E 00 00 08 00 20 00 80
5F 01 E1 FF 48 20 00 80 requiem
14 63 78 10 48 20 00 80 romeo ballad
13 63 00 10 48 20 00 80 alluring air
0A 64 1E 00 38 10 00 84 choco kick
1B 00 1E 00 28 10 00 88 whisperwhind
13 64 78 20 28 10 00 82 constrict
06 00 26 02 48 10 00 8A diamond dust
06 00 35 04 48 10 00 8C judgement bolt
06 00 2D 01 48 10 00 8B hellfire
2D 00 6E 20 48 10 00 99 gaia's wrath
23 63 32 00 00 10 00 92 earthen wall
12 63 00 40 28 10 00 A1 demon eye
14 80 9A 80 40 10 00 AD ruby light
06 00 A5 40 48 10 00 A0 thunderstorm
18 80 00 00 48 10 00 B0 zantetsuken
06 00 69 01 48 10 00 E3 flames of rebirth
06 00 C3 80 48 10 00 A7 tsunami
06 00 FA 00 48 10 00 C2 megaflare
0A 80 4B 00 38 10 00 84 fat chocobo
0A 80 FF 00 48 10 00 B0 gungnir
1A 80 E0 10 24 10 00 80
0D 80 2D 00 38 00 00 80 drain spear
0E 80 04 00 38 00 00 80 osmose lance
7F 00 00 00 28 10 00 80
07 63 01 00 08 20 00 80 silver harp
07 63 02 40 00 20 00 80 dream harp
07 63 03 10 00 20 00 80 lamia harp
6C 00 4B 11 00 00 00 80 apollo harp
00 00 00 00 00 00 00 80
0E 80 08 00 38 04 00 80 mystery waltz
0D 80 2D 00 38 04 00 80 jitterbug
13 80 00 10 38 02 00 80 tempting tango
14 80 00 20 30 02 00 80 magic shell
1C 01 02 00 00 00 00 00 sword dance
1C 02 01 00 00 00 00 00 ice aura
13 80 78 20 38 00 00 80 entangle
01 00 00 00 38 01 80 80 attack
02 00 00 00 38 01 80 80 special technique
29 80 1E 10 38 01 40 8A doom
17 63 00 80 3C 01 40 81 roulette
6C 00 4B 40 48 01 40 A6 aqua breath
4B 05 00 80 48 01 40 16 level 5 death
4D 04 0C 00 48 01 40 09 level 4 graviga
4C 02 00 80 48 01 40 0B level 2 old
4E 03 FE 00 48 01 40 12 level 3 flare
12 42 00 20 38 01 40 85 pond's chorus
12 42 00 10 38 01 40 85 lilliputian lyric
12 4B 00 01 48 01 40 87 flash
13 5A 00 C0 38 01 40 89 time slip
13 80 00 08 40 01 40 83 moon flute
3D 42 78 20 38 01 40 95 death claw
06 00 14 40 B8 01 40 04 aero
06 00 32 40 B8 01 40 0A aera
06 00 8C 40 B8 01 40 18 aeroga
06 00 32 01 38 01 40 85 flamethrower
50 80 03 00 38 01 40 80 goblin punch
51 42 40 00 38 01 40 1B dark spark
51 50 20 00 38 01 40 13 off guard
55 00 00 80 20 01 40 8D transfusion
58 80 50 2D 38 01 40 06 mind blast
6D 63 02 00 38 01 40 82 vampire
53 4B 08 00 38 01 40 83 might guard
27 08 00 60 40 01 40 48 self destruct
2B 00 10 80 28 01 40 81 ????
54 63 00 00 38 01 40 83 1000 needles
28 80 E8 03 38 01 40 99 white wind
5A 00 00 00 40 01 40 9C missile
07 4B 0C 00 38 01 40 87 ribbit
15 80 00 20 30 01 80 85
71 00 00 00 04 01 80 80
44 00 00 00 04 01 80 80
61 00 00 00 BC 01 00 80
62 00 00 00 BC 01 00 80
27 80 00 00 00 01 00 80
63 00 00 00 48 01 00 80
0B 00 E3 40 B8 01 00 1E delta attack
65 80 80 80 BC 01 00 80
00 00 00 00 00 01 00 80
00 00 00 00 38 00 00 80
06 00 32 40 48 01 80 80 wind slash
00 00 00 00 04 01 80 80
66 00 00 00 B8 01 00 00
19 F7 FF FF 48 01 80 0A 100Gs
27 80 00 00 04 01 80 80
2E 63 4B 80 38 01 80 80 reaper's sword
27 80 00 00 B8 01 80 80
2C 80 78 20 38 01 80 0A blaster
12 32 00 40 38 01 80 80
5C 42 00 40 38 01 80 80
12 4B 00 04 B8 01 80 80 spore
0B 08 CB 04 48 01 80 80 poison breath
5D 80 00 00 2C 01 80 80 danse macabre
5D 80 00 00 2C 01 80 80
3F 00 05 00 48 01 80 80
4F 32 00 02 3C 01 80 80
13 4B 00 10 B8 01 80 80
13 4B 78 20 38 01 80 80
57 01 7F 04 B8 01 80 80
13 4B 00 40 38 01 80 80
14 4B 5A 10 B8 01 80 00
12 63 00 C0 38 01 80 E3
2C 01 78 04 38 01 80 80
0F 63 00 00 48 01 80 80
0F 32 00 00 38 01 80 80
0F 63 00 00 28 01 80 80
0C 00 1E 78 38 01 80 80
07 63 08 10 38 01 80 80
0C 00 4B 78 38 01 80 80
0C 10 B4 78 48 01 80 B2
0C 20 0F FF 48 01 80 80
06 00 44 01 48 01 80 00
06 00 14 02 48 01 80 00
06 00 8C 02 48 01 80 80
0C 02 3C 78 48 01 80 80
06 00 14 04 38 01 80 00
2D 00 78 20 48 01 80 80
09 00 08 40 78 01 80 80
06 00 C3 80 48 01 80 80
06 00 F0 00 48 01 80 00
51 50 80 00 B8 01 80 80
16 63 F7 04 B8 01 80 80
52 63 F7 04 B8 01 80 80
2D 00 9B 20 48 01 80 80
6F 00 00 00 38 80 80 80
19 8A 03 FF B0 01 80 80
13 80 00 02 20 01 80 80
2A 40 04 00 48 01 80 80
2A 01 04 00 48 01 80 80
2A 04 04 00 48 01 80 80
2A 00 08 FF 48 01 80 80
01 00 00 00 38 01 80 80
11 00 87 00 B0 01 00 80
07 4B 08 80 28 01 80 80
08 00 FF 00 48 01 80 80
29 42 00 80 28 01 80 85
70 80 00 80 BC 01 80 80
29 63 00 80 28 01 80 80
40 63 80 00 48 01 80 80
40 63 40 00 A8 01 80 80
00 00 00 00 B8 01 00 80
0A 80 69 00 38 01 00 80
27 80 00 00 00 08 00 80
0F 63 00 00 38 01 00 80
12 63 00 40 38 01 00 80
67 00 00 00 4C 01 00 80
6A 00 00 00 00 00 00 80
60 00 00 00 04 00 00 80
68 00 00 00 BC 01 00 80
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
7E 00 0E 00 48 08 03 AA
87 00 50 00 38 01 80 8F
13 4B 7D 90 48 01 80 92
8A 10 BE 02 38 01 80 A6
88 04 BE 08 48 01 80 A6
8B 08 BE 01 A8 01 80 A6
88 40 BE 40 48 01 80 A6
89 20 BE 04 48 01 80 A6
8C 00 00 00 B8 01 80 AA
08 00 C8 00 48 01 80 B4
8D 00 FE 00 48 01 80 C2

081498DC has the data for mixes/gaia/animal spells. I don't have the table itself extracted but the order is:
Code: [Select]
00 - Mysidian Rabbit (does nothing)
01 - Squirrel
02 - Bee Storm
03 - Nightingale
04 - Flying Squirrel
05 - Falcon
06 - Skunk
07 - Wild Boar
08 - Unicorn
09 - Dud Potion
0a - Potion
0b - Lifewater
0c - X-Potion
0d - Elixir
0e - Resurrection
0f - Maiden's Kiss
10 - Ether
11 - Neutralizer
12 - Cure Blindness
13 - Dragon Power
14 - Devil's Juice
15 - Hi Potion
16 - Balm of Gilead
17 - Triple Ether
18 - Spare 1 (does nothing)
19 - Reincarnate
1a - Lilith's Kiss
1b - Resist Poison
1c - Resist Fire
1d - Dragon Shielding
1e - Dark Ether
1f - Dud Potion
20 - Mix No. 23 (500 damage?)
21 - Mix No. 24 (does nothing)
22 - Goliath Tonic
23 - Antilixir
24 - Phoenix Down
25 - Kiss of Life
26 - Lifeshield
27 - Remedy
28 - Resist Ice
29 - Resist Thunder
2a - Dragon Defense
2b - Death Potion
2c - Blessed Kiss
2d - Succubus Kiss
2e - Levisalve
2f - Lamia Kiss
30 - Dragon Kiss
31 - Toad Kiss
32 - Holy Water
33 - Bacchus' Cider
34 - Samson's Might
35 - Elemental Power
36 - Holy Breath
37 - Dud Potion (poisons)
38 - Protect Potion
39 - Turtle Soup
3a - Hastyade
3b - Dud Potion (confuses)
3c - TNT
3d - Antidote
3e - Smelling Salts
3f - Poison Breath
40 - Poison
41 - Eye Drop
42 - Dark Sigh
43 - Dark Gas
44 - Dragon Breath
45 - Dark Breath
46 - Shadowflare
47 - Spare 2 (does nothing, but hilarious animation)
48 - Spare 3
49 - Gust
4a - Earthquake
4b - Wind Slash
4c - Twister
4d - Branch Arrow
4e - Leaf Dance
4f - Branch Spear
50 - Bindweed
51 - Sandstorm
52 - Quicksand
53 - Desert Storm
54 - Heat Sand
55 - Tsunami
56 - Whirlpool
57 - Big Wave
58 - Big Wave (2x damage)
59 - Phantom
5a - Ignuus Faatus
5b - Bottomless Bog
5c - Poison Mist
5d - Waterfall
5e - Stalactite
5f - Cave-In
60 - Sonic Boom
61 - Squid
62 - Dummy
63 - Squid
64 - Dummy
65 - Squid
66 - Dummy
67 - Squid
68 - Dummy
69 - Flameshot
6a - Flameburst
6b - Flamecannon
6c - Watershot
6d - Water Burst
6e - Watercannon
6f - Spark Shot
70 - Spark Burst
71 - Spark Cannon
72 - Dark Shot
73 - Dark Burst
74 - Dark Cannon
75 - Normal Shot
76 - Normal Burst
77 - Normal Cannon
78 - Killer Shot
79 - Killer Burst
7a - Killer Cannon
7b - Slow Shot
7c - Slow Burst
7d - Slow Cannon
7e - Dragon Shot
7f - Dragon Burst
80 - Dragon Cannon
81 - Chaos Shot
82 - Chaos Burst
83 - Chaos Cannon
84 - Quake Shot
85 - Quake Burst
86 - Quake Cannon
87 - Power Shot
88 - Power Burst
89 - Power Cannon
8a - Vulner Shot
8b - Vulner Burst
8c - Vulner Cannon
8d - Silver Shot
8e - Silver Burst
8f - Silver Cannon
90 - Divine Shot
91 - Divine Burst
92 - Divine Cannon
93 - Needle Shot
94 - Needle Burst
95 - Needle Cannon
96 - Minishot
97 - Miniburst
98 - Minicannon
99 - Skeleton
9a - Rajiformes
9b - Flaremancer
9c - Zombie Dragon
9d - Cleansing
9e - Deluge
9f - Eruption
a0 - Starfall
a1 - Rockslide
a2 - Divine Judgement
a3 - Healing Wind
a4 - Blessing
a5 - Hurricane
a6 - Pestilence
a7 - Finisher!
a8 - Critical Hit
a9 - Elemental Attack!
aa - Rejuvenation
ab - Recuperation
ac - Brimstone
ad - Black Frost
ae - Judgement
af - Salientia
b0 - Doom
b1 - Still Wing

Some of the ability data is located at 081478d0, here's the map for it (the big blank in the middle are the magic abilities):

Code: [Select]
7F 00 00 00 08 00 00 00 ; Null
7F 00 00 00 08 00 00 00 ; Other
7F 00 00 00 08 00 00 00 ; Item
40 80 80 00 00 00 00 00 ; Row
7F 00 00 00 00 00 80 00 ; Defend
7F 00 00 00 38 00 00 00 ; Attack
7F 00 00 00 00 00 40 00 ; Guard
30 00 00 00 48 00 00 00 ; Kick
7F 00 00 00 38 00 00 00 ; Focus
42 80 1E FA 00 00 00 00 ; Chakra
20 64 00 00 08 00 00 00 ; Flee
43 28 00 00 2C 00 00 00 ; Steal
7F 00 00 00 28 00 00 00 ; Mug
7F 00 00 00 28 00 00 80 ; Jump
7F 00 00 00 28 00 00 00 ; Lance
20 64 00 00 40 00 00 00 ; Smoke
13 80 00 02 00 00 00 00 ; Image
45 80 00 00 28 00 00 C0 ; Throw
7F 00 00 00 38 00 00 02 ; Mineuchi
46 32 96 00 48 00 00 00 ; Zeninage
18 55 00 00 48 00 00 00 ; Iainuki
7F 00 00 00 08 00 00 00 ; Animals
7F 00 00 00 38 00 00 80 ; Aim
7F 00 00 00 08 00 00 8C ; Rapidfire
7F 00 00 00 08 00 00 00 ; Call
1D 30 00 00 28 00 00 00 ; Check
1D F8 00 00 28 00 00 00 ; Scan
47 32 1E 10 28 00 00 00 ; Calm
69 00 00 00 28 00 00 00 ; Control
48 00 00 00 28 00 00 00 ; Catch
7F 00 00 00 08 00 00 00 ; Release
7F 00 00 00 30 00 00 00 ; Mix
7F 00 00 00 08 00 00 00 ; Drink
19 8A 0B FF 44 00 00 00 ; Recover
1A 00 80 01 40 00 00 00 ; Revive
7F 00 00 00 08 00 00 00 ; Gaia
7F 00 00 00 00 00 00 00 ; Unused?
7F 00 00 00 08 00 00 00 ; Hide
7F 00 00 00 08 00 00 00 ; Reveal
7F 00 00 00 08 00 00 00 ; Unused?
7F 00 00 00 00 00 00 00 ; Sing
49 32 00 00 28 00 00 00 ; Flirt
4A 19 00 00 28 00 00 00 ; Dance
7F 00 00 00 08 00 00 00 ; Mimic
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 10 ; Focus
7F 00 00 00 08 00 10 80 ; Jump
7F 00 00 00 38 00 00 00 ; Patarillo (Dummy)
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
7F 00 00 00 08 00 00 00
84 00 00 00 28 00 00 00 ; Open Fire
85 00 00 00 48 00 00 00 ; Combine
80 00 00 00 48 00 00 00 ; Bladeblitz
81 00 00 00 28 00 00 00 ; Finisher

Note that modifying this data doesn't necessarily change the ability effects (Modifying Chakra's targeting for example does nothing), the actual effects seem to be hardcoded in other places.

I don't remember if there's supposed to be another table or not off the top of my head.
Title: Re: FFV Gear Viewer
Post by: Squall on March 31, 2016, 09:54:04 AM
BIG, BIG thank you x0_000!!!

Version 4.2 is out with GBA info. It seems that GBA dont use 'unavoidable' bit and extends DF to a whole byte. That is why there are some glitches with SNES info (reporting wrong formula, when 'unavoidable' bit is used). In extended space GBA adds new DF ($80 .. $8F) on which I have no info. On some I guessed their meaning, but for others I have no clue.

Also it seems that data I have gathered (most likely) dont have info on Predict, Oath, OpenFire. Pretty much all that you see after last Combine magic is probably random things totally not related with the associate name *rolling eyes toward x0_000*
Title: Re: FFV Gear Viewer
Post by: x0_000 on March 31, 2016, 12:21:51 PM
A few of them should be from the Necromancer (Skeleton, Rajiforme, Flaremancer, Zombie Dragon) or Oracle (Divine Judgment, Pestilence, Eruption, Starfall, etc.) abilities. I got the names by livehacking the !Gaia spells and seeing the results, although I guess it's been a while since I did that. I actually have some videos of some of the actual non-existent spells:

https://www.youtube.com/watch?v=Bbc-ruvQxWI
https://www.youtube.com/watch?v=sapvrqkjH2s

My guess is that they're on different tables (separated by a null entry or something) that just happen to be next to each other in the code.

Edit: After some code diving it looks like Oath uses the table starting at 08149E7C, and Condemn, Predict and Combine use the table at 081498DC.
Title: Re: FFV Gear Viewer
Post by: Squall on April 01, 2016, 02:23:25 AM
Names are OK, they are in order on that Text chunk. The names that you see in my app come from there, I haven't entered them manually.

The only thing I lack is the data (8 bytes) for them. 081498DC segment provide correct info for Animals, Mix, Gaia, Combine in that order. After the last Combine (Mini Cannon) and before 08149E7C there are bytes (in pair of 8) that I can not relate to any of Actions (magic/ability) that I know.
The match that I use to relate is Power which for all GBA+ content is stored in Param2. For specific power values I use Algorithm FAQ for GBA.

08149E7C contain SNES info but in the last unused slots it adds DarkArts.

So the missing data is for Oath, OpenFire, Predict. Unless they are hard-coded there should be such info.

P.S. Just out of curiosity, do you guys know what Squid/Dummy could be? It repeats 4 times and is between Gaia and Combine? They seems to use DF $82 with Param 2 - Ath Power, Param 3 - Element
Title: Re: FFV Gear Viewer
Post by: x0_000 on April 02, 2016, 12:57:02 AM
I'll try to remember to investigate this more thoroughly this summer when I inevitable get hankering for ffva hacking again.
Title: Re: FFV Viewer
Post by: Squall on May 20, 2016, 07:48:35 AM
Regardless how much I try not to, I keep developing that parser, because it helps me understand how Square did it :D

Version 5.0 is out!!!
- Big change - the name. It was about time to do it, because the more functionality I add it widens its scope.
- a new tab Ability. There are things inside that I haven't seen in any FFV editor/parser.
- a new tab Job. This is still WIP, but I know what I need and where to get, so just needs time.
- there are many, many small changes and fixes in previous parsings, thanks to increased knowledge of FFV and reading the asm code. There are still blind spots though ...
- NO GBA yet for Job/Ability.

There are national holidays and I bought a new car ... so I will take a short break :D That is the reason to release 5.0 although there is still work to be done.


P.S. How Equipment info in Job/Abilities relate to bits, representing Equipment types of gear?
It seems to me that last 5-6 bits for armor in Job/Abilities are interpreted differently in different FFV programs/documents. What should be the real meaning? More precisely: 'Common', 'Glove', 'Ring', 'Thief Gear', 'Chemist Gear' (Jorgur interpretation). samurai goroh uses 'Armlet/Wristlet' instead of ring and 'various' instead of common
Title: Re: FFV Viewer
Post by: x0_000 on May 20, 2016, 01:06:08 PM
Common, Glove, Ring, etc. are just markers used by the game to determine what items a job can equip. Common should mean that there it's available to all jobs. If you go to 08156E6C in a GBA ROM that's a table of bitflags the game uses to determine what can be equipped, the flags should be
Code: [Select]
0x00000001 - knives
0x00000002 - ninja knives
0x00000004 - swords
0x00000008 - knight swords
0x00000010 - lance
0x00000020 - axe
0x00000040 - hammer
0x00000080 - katanas
0x00000100 - rods
0x00000200 - staves
0x00000400 - flails
0x00000800 - bows
0x00001000 - harps
0x00002000 - whips
0x00004000 - bells
0x00008000 - unused? (No non-Freelancer job has this flag.)
0x00010000 - shields
0x00020000 - heavy helmets
0x00040000 - light helmets
0x00080000 - dancer helmets
0x00100000 - heavy armor
0x00200000 - light armor
0x00400000 - mage armor
0x00800000 - general armor/accessory (All jobs have this flag...?)
0x01000000 - heavy accessories/gloves
0x02000000 - diamond/power/silver/rings
0x04000000 - thief gloves/thief
0x08000000 - angel robe/chemist
0x10000000 - mage helmets/exotic
0x20000000 - unused
0x40000000 - unused
0x80000000 - unused
Title: Re: FFV Viewer
Post by: Jorgur on May 21, 2016, 04:52:43 AM
I checked out the new version, and I have not yet found any problems or typos.

There is a table that connects each 1-byte Equipment Type Value to 4 bytes of Equipment Type Flags.
Look for [Equipment type] definitions: http://slickproductions.org/slickwiki/index.php/Jorgur:FF5_Item_data#Overview
Title: Re: FFV Viewer
Post by: Squall on May 24, 2016, 01:36:33 PM
Could you quote this table here? Also if you know the location of that table in the ROM, please share the address. At one point in my Dmg Calculator I will have to limit the equipment, depending on a class/ability :)
Title: Re: FFV Viewer
Post by: x0_000 on May 24, 2016, 02:14:12 PM
The GBA Table is
Code: [Select]
0D 00 B3 01 00 00 A4 02 01 00 A4 06 11 00 B3 01
03 00 A4 02 81 00 B3 01 61 00 B3 01 01 08 A4 02
05 00 B3 01 00 06 C0 12 01 01 C0 12 01 07 C0 12
01 01 C0 12 05 01 E5 12 05 03 E4 12 01 20 A4 02
01 06 E4 1A 01 40 C0 12 01 10 C0 12 01 00 EC 12
01 01 C0 12 00 06 C0 12 05 00 E5 12 3D 08 B3 01
01 03 F7 1F FF FF FF FF
Written as a sequence of words it's
Code: [Select]
01B3000D 02A40000 06A40001 01B30011
02A40003 01B30081 01B30061 02A40801
01B30005 12C00600 12C00101 12C00701
12C00101 12E50105 12E40305 02A42001
1AE40601 12C04001 12C01001 12EC0001
12C00101 12C00600 12E50005 01B3083D
1FF70301 FFFFFFFF
Title: Re: FFV Viewer
Post by: Jorgur on May 25, 2016, 02:24:28 AM
The ROM address for the table in the SNES version is in the link I just posted.
Title: Re: FFV Viewer
Post by: Squall on May 25, 2016, 09:18:26 AM
The ROM address for the table in the SNES version is in the link I just posted.
Found it! It seems I'm still in party mood if I cant see something so obvious :D
Thank you very much, Jorgur & x0_000!

It is strange that I missed that table (& info) when I was parsing Items ...  anyway it is interesting how Square develop systems that has billions of possibilities, yet implement just a fraction of it (in this case 232 possibilities for item types, yet only 32 used).
 When they allow users to utilize it they make an awesome game - like materia system in FF7 trough it you can define huge amount of customized gear (and that is why considered the best FF). While in other cases they kind-a 'missed the mark' like FFV ... in the past I didnt think its whoah game (just good one), but now that I know it from inside I see what a great engine it has but a regular player will never touch even the surface of it ...
Title: Re: FFV Viewer
Post by: Squall on May 27, 2016, 08:17:34 AM
Version 5.1 is out!!! It should have all the info for Job/Ability.

I need to do the same for GBA version. If you have any info on where in GBA ROM to find:
Code: [Select]
Job data
D1/52C0-52E9: 1st ability pointer table      [Job]
D1/52EA-52FF: Number of abilities per job    [Job]
D1/5300-542B: Job levels                     Joblevel
D1/56B0-5707: Base [Stats]                   [Job]
D1/5708-575F: [Equipment type] compatibility [Job]
D1/5760-57B7: Native abilities               [Job]
D1/57B8-57FF: Innate abilities               [Job]
Code: [Select]
Ability data
D1/59E0-5CDF: Actions                        [Ability] (00-5F)
D1/5CE0-5D9F: ?                              [Ability] (00-51)
D1/5DA0-5DFF: Action delays                  [Ability] (00-5F)
D1/5E00-61FF: Command ability [Stat] bonuses [Ability] (00-7F)
D1/6308-638B: Support ability [Stat] bonuses [Ability] (80-A0)
D1/638C-63CD: Innate ability  effects        [Ability] (80-A0)
D1/63CE-6451: [Equipment type] compat. added [Ability] (80-A0)

please share, that would greatly speed up GBA part. Personally I have 0 knowledge on GBA asm so I use some statistical methods to search in the ROM, which may work well only if the GBA uses same data structures. As we have discussed already ... many times it doesnt (byte order,  byte padding, extra GBA content, ...) so things may get quite rough :D
Title: Re: FFV Viewer
Post by: x0_000 on May 27, 2016, 02:22:16 PM
# of abilities per job is at 0814b1fc
Base stats are at 08156e04
Native abilities are at 0815616c
Innates are at 08156138
Command ability stats are at 08155fac
Support ability stats are at 08155e10

Not sure what 1st ability pointer table, Job levels, Actions, Innate ability effects are supposed to be. Don't know where Action delays and Equipment compatibility are.
Title: Re: FFV Viewer
Post by: Squall on May 28, 2016, 06:32:55 AM
1st ability pointer table - table to 'Job Levels' (not important)

Job Levels:
Code: [Select]
Job levels: 3 bytes
0 ABP low
1 ABP high
2 [Ability]
That is a table that has ABP requirement & Ability that can be learned for different jobs

Actions:
That is one of the beauty of FFV (from dev perspective). Instead of hardcoding what to do in each situation, FFV uses actions (8 byte structure) that have parameterize couple of pre-coded possibilities. Here and in most resources on the net these possibilities are called 'Damage Formula' ... wrong name because these 'formulas' are not used just for damage, but healing and other non-dmg actions (like change row, inflicting status, ...).
If you check my FFV Viewer they are under 'Magic' tab (wrong name I know, but it started with parsing actions, inflicted by magic).
Some of the command abilities are implemented with Actions (not all). There is a table that say what action (8 byte) will be used on specific command (ability). For example, when you choose 'Row' command, there is acttion for it and instead of hardcoding, the action contain reference to 'Row' formula, which has params to swap, to make you in front, in back,.... You may observe it in my Viewer - command actions are at the end of the list (Magic).

Innate ability effects:
That is similar to Job Innates. When you set a Job, you receive jobs innates. When you add support ability you add it innate too. For example a 'Knight' comes with Cover & Dbl Grip. If you put Counter on its free slot, the knight will get Counter innate too. From dev perspective innates are just set of bits that are checked in specific situations :)
Title: Re: FFV Viewer
Post by: x0_000 on May 28, 2016, 05:14:00 PM
Job levels is at 0880E6C0
It sounds like you probably want 081478d0 for Actions

No idea for Innates right now.
Title: Re: FFV Viewer
Post by: x0_000 on May 29, 2016, 07:21:53 PM
Alright, had a look at the ROM and found two more tables:

08155F48 - Ability innates
08155EAC - Ability equipment flags
Title: Re: FFV Viewer
Post by: Squall on May 30, 2016, 06:40:09 AM
Version 5.2 is out!!! Now the new features work for GBA too!

Thank you very much x0_000 for the info!

*GBA Notes:
Ability Actions Delay table - 147CB0
Job Level table - 1554E8. It uses 4 bytes - 2 for ABP and 2 for Ability.

Pretty much data structure is word-aligned. I guess thats important for GBA as double-word for PC - there is penalty in extra processors cycles reading non-aligned memory.

P.S. I dont like very much the info layout for jobs/ability. If you have in mind something better just give an example :)
Title: Re: FFV Viewer
Post by: Squall on June 10, 2016, 09:39:52 AM
Version 5.3 is out!!!

- New Items (usable) tab. It was long time missing, that's the reason for releasing it as 5.3 instead of 6.0
- New filters added in various tabs. I plan for few more to add :)
- Exports were moved from Weapon to Text tab. They needed a separate space, but adding a new tab wasn't ok for me. Luckily the Text tab had vast empty space. Now exports have an option to be saved in a file.
- Removed '???' from unused bits.

More?
We will see. I have few details in Mobs to finish and add finally add so needed Battle Formation. Maybe adding Shops when I really have nothing else to do :D
Title: Re: FFV Viewer
Post by: Jorgur on June 11, 2016, 03:29:17 PM
Typo: Descrtiption
Typo: Can be Drinked -> Can be Drunk (or is it intended?)
Issue: The list goes to index 259 when it should end at 255
Inconsistency: I see Index and Name for usables, but not for Weapons and Armor
Title: Re: FFV Viewer
Post by: Squall on June 11, 2016, 04:54:16 PM
Quote
Inconsistency: I see Index and Name for usables, but not for Weapons and Armor
They will all have Name and Index in next version. I liked your idea to add the Name in the info. Also I need the Index in cross-references (wherever I get raw data).

Quote
Issue: The list goes to index 259 when it should end at 255
Because GBA had 4 extra items
Title: Re: FFV Viewer
Post by: Squall on June 16, 2016, 12:38:29 PM
Hey guys, I'm trying to parse all possible info about monsters. So I wonder, is there a table that has an index of the mob's pictures? (SNES & GBA)

While SNES has almost 1:1 mob index to mob picture, GBA has 700+ defined mobs and only 330 pictures. I doubt they keep different copy for each ...

 :edit:
Also I'm interested in some technical info about FFV:
- what graphic mode it use?
- what memory mode?
- was there an extra hardware in the cartridge? Does it uses SA-1 or any other extra hardware?
Title: Re: FFV Viewer
Post by: samurai goroh on June 16, 2016, 10:37:57 PM
Most graphics are 4bpp (bits per pixel). There seem to be some 3bpp, 2bpp & 1bpp... It's mentioned on the wiki which graphics are which & there's also some mention about the compression used on them.

Bits per pixel --> Number of colors
1 bpp = 2 colors
2 bpp = 4 colors
3 bpp = 8 colors
4 bpp = 16 colors

This document should help you out to understand how it works.
http://mrclick.zophar.net/TilEd/download/consolegfx.txt
Title: Re: FFV Viewer
Post by: Squall on June 17, 2016, 09:48:58 AM
Version 5.4 is out!!!

It is mainly adding missing info.
 - In 'Monsters' tab - Release data, Special data, Drop/Steal data.
 - Internal structures were rewritten so they could accommodate GBA items with index >= $100
 - Adding Name & Index in the info of all tabs (that were missing it)

I need the info that link a mob with its picture, so I can display them correctly!!! I can approximate them by hand, but thats not good (every small change may distort the order)
Title: Re: FFV Viewer
Post by: Jorgur on June 17, 2016, 01:16:54 PM
Is there any chance you will make it extract graphics from the ROM instead of relying on external images? It would be useful for examining ROM hacks with customized monsters.
Title: Re: FFV Viewer
Post by: Squall on June 17, 2016, 03:28:33 PM
Sure I can do that as far as I have all the info:
- where the tiles are stored (for monster with ID)
- pallete for it
- map of the image (which tiles in what order make the image)

I still dont know how to draw a tile, but that shouldn't be so hard. Now if things are compressed that might be a difficult task.
Title: Re: FFV Viewer
Post by: Squall on June 22, 2016, 04:36:06 AM
Hey guys, do you know how to show an image in the wiki?
Title: Re: FFV Viewer
Post by: samurai goroh on June 23, 2016, 11:23:39 PM
AFAIK, the admin needs to install tools before you can display images/videos. So currently, you can only drop a link into the wiki...
Title: Re: FFV Viewer
Post by: Jorgur on June 24, 2016, 04:32:49 AM
If you send a message to Lenophis he might do something about it.
Title: Re: FFV Viewer
Post by: Squall on June 24, 2016, 07:40:24 AM
Wooah I thought that nobody is around :D

Anyway 5.5 is out!!!
Thanks to samurai goroh explanations I can parse palette, tiles & sprites!!!
 - added Palette info for each Character-Job
 - added a Sprite picture in its own palette of Sprites for each Char-Job-Frame
 - some goodies like Sprite zoom, viewing SNES raw info for palette.
**Sprite map for each frame is hard-coded, but I found it in the ROM. Probably will be implemented in next version/fix :)

P.S. I found the Sprite map for job frames in address: D4B997 - D4B9D8. What do you guys you know about that are?
Title: Re: FFV Viewer
Post by: Squall on June 24, 2016, 08:10:42 AM
An update on my visualization of monsters:
- I found the where the tiles are stored (D50000)
- I found the palettes for it (DB8000)

but I lack Sprite-map! Check the attachment that I made with TLP. As you may see each Sprite is composed in a different way of tiles. That is why I need a Map - what tiles in what order compose the sprite of mob(n).

If you have any info on the topic, please share it!!!

Also I want to do the same for GBA:
- Are the tiles compressed? (because I cant find one in TLP)
- What format are palette colors in GBA?
Title: Re: FFV Viewer
Post by: samurai goroh on June 24, 2016, 08:06:27 PM
Graphics ARE compressed on the GBA.

Can't remember how to use "GBA Graphics Editor" properly, but you can more or less see the enemies:
Bee @1C807C (size of 5x7)
Lycaon @1C8484 (5x7)
Bat @1C866C (5x7)
Goblin @1C8E00 (4x7)
Magic Pot @ 1C9704 (4x6)
Death Claw @ 215158 (5x6)
Title: Re: FFV Viewer
Post by: Jorgur on June 25, 2016, 03:32:42 AM
Quote
D0/D004-D0/DC29: 1-2BPP: Monster shapes
Is this it?
Title: Re: FFV Viewer
Post by: Squall on June 25, 2016, 09:45:46 AM
samurai goroh, I'm not familiar with that editor. Could you share a link?
btw how did you obtain these addresses?

What do you guys know about the structures that hold the image of a mob?
Like 'Goblin @1C8E00 (4x7)' that would mean a sprite that is 4 tiles wide and 7 rows. Where is that info? Goblin pictures is 32x40 pixels which is 4x5 tiles. So if Goblin is defined 4x7 that mean that its drawn in a window of 32x56 pixels ... there must be info somewhere to to tell where in the window the sprite is drawn ...
 
Title: Re: FFV Viewer
Post by: samurai goroh on June 25, 2016, 11:53:23 AM
From this topic (http://serenesforest.net/forums/index.php?showtopic=26913):
http://dl.dropbox.com/u/341300/Graphics/GBA%20Graphics%20Editor.zip

I obtained these addresses through that program, you just let it scan and it will give you back what it believes is an image. You can then change the size and see how the image would look. (You may also need to change the palette). However, as mentioned on the Portrait Graphics (http://slickproductions.org/forum/index.php?topic=1657.30) topic, because of the encryption, you won't be able to see the images perfectly (at least not with that tool).

As for the Goblin, may the size wasn't exactly that, but setting it like that will let you see it...


Edit: This program (http://www.romhacking.net/utilities/529/) (which is from the same person as the other tool) comes with the code of the program (which while is older and less useful), it would let you poke around the code
Title: Re: FFV Viewer
Post by: Squall on June 26, 2016, 02:51:06 PM
I used the break to read a little bit about GBA hardware. It seems colors are in the same format as SNES. Tiles use only 1 bitplane (pretty much as normal bitmap).
I might be wrong but my guts tells me that FF5a uses 4bpp Sprites with 8x8 tiles (64x64 pixels) for mobs. Probably the larger mobs are constructed from couple Sprites - like Shunryu 256x256 pixels (4 sprites).

Also it seems that mobs data is compressed, but consist of header, imagebits for sprite(s) and palette, maybe more but I dont know. If you have more details please help me decipher all :)

 :edit:
samurai goroh do you know details on LZ77 header? It starts with 10 but I'm not sure whats next. It seems that by it the application from your link 'recognize' compressed chunk. No need I found it :)

I thought DB8000 is the place for mob palettes, but its not :( Do you guys know where it is? Also if you know the subroutine that draws a mob, that may helps a LOT!
Title: Re: FFV Viewer
Post by: x0_000 on June 28, 2016, 08:34:39 PM
NED's palettes (he has two parts) are at 082140d4 and 08214f10 in the GBA ROM, you can backtrace those values to figure out how they're stored for monsters in general.
Title: Re: FFV Viewer
Post by: Squall on June 29, 2016, 05:28:46 AM
Hey x0_000 long time no see :)

I will check these address when I continue with GBA. I'm trying to finish Monster graphics for SNES.

Thank to Japanese doc I manage to find mobs palette and sprite map. It seems FF5 holds more info in the map then just tile positions, so that may take some time to decipher, code and test.

On the positive side, while I was waiting to get that info I was able to implement LZSS (type 02) decompression algorithm (for SNES) so now I will be able to get even compressed parts of SNES graphics. Displaying might be more problematic, because from what I've saw in noisecross docs they use some kind of script ...

 :edit:
In meantime I was able to make a new SNES ROM map. It contain sources from here and outside, also the info from my personal findings. You may see initial version here (https://drive.google.com/file/d/0B9eDezdHI7RWZkwxanIxLXdiZnM/view?usp=sharing). I want to add 'ROM offset' column for easy raw search.
Title: Re: FFV Viewer
Post by: Squall on July 04, 2016, 08:27:05 AM
Version 5.6 is out!!!

It was a HARD battle to understand how an image of a mob is stored by FF5. I'm so proud to present the new version:
 - in Monster tab, now you may choose to see the native (in ROM) image (yeeee)
 - SNES only for now!
 - Doesn work properly with 'Compression' flag set.
 - Dont do anything special when 'Shadow' flag is set. I'm not sure what it does, but most of the images are ok.

If you know something about Shadow & Compress flag, please share with me. Shadow flag seems to be used not only for monster drawing. I saw couple of and #$40 but couldn't make anything useful out of the code.

noisecross & Light Phoenix you seem the only one experienced with SNES graphics, especially C1 bank.
Title: Re: FFV Viewer
Post by: samurai goroh on July 04, 2016, 12:36:56 PM
Nice, keep up the good work Squall :D

BTW, I noticed a bug in the Jobs tab, you can scroll past the Normal ability (there are 4 extra slots).
Also I don't remember when/if you mention it had the sprites there too, but thumbs up! I do remember you wanted to find how the game sorted them, but don't know whether or not you were able to find it...
Title: Re: FFV Viewer
Post by: Squall on July 05, 2016, 02:36:36 AM
Nice, keep up the good work Squall :D
Thank you!!!

Quote
BTW, I noticed a bug in the Jobs tab, you can scroll past the Normal ability (there are 4 extra slots).
Yeah thats because of GBA version ... it has 4 extra jobs. When I'm done with graphics I will polish it so with SNES you can see 22 jobs, and 26 for GBA :D
Title: Re: FFV Viewer
Post by: Squall on July 05, 2016, 09:55:40 AM
Version 5.6.1 is out!!!

Now you can see ALL monster's pictures!!! Yes, finally I cracked the compression flag!

This is more of a hotfix, but since the compression part took me so much time and effort its like new version to me :D

Enjoy

P.S. If you have a FF5 ROM that has modified graphics for monsters, please share it so I can test the Viewer.
Title: Re: FFV Viewer
Post by: samurai goroh on July 05, 2016, 04:56:43 PM
FF5r has new enemies, I'll try running your program against it:
http://www.romhacking.net/hacks/1408/
Title: Re: FFV Viewer
Post by: Jorgur on July 06, 2016, 05:25:13 AM
- If you minimize and restore the program while looking at a monster the graphics disappear
- There is space for 384 monsters but the list ends at 367

Can something be done about this (pic attached)? Perhaps have the program look at the ASM for displaying text to find the correct location of the text.
Title: Re: FFV Viewer
Post by: Squall on July 06, 2016, 08:55:28 AM
Quote
If you minimize and restore the program while looking at a monster the graphics disappear
Yeah, there many things that need to be polished around graphics ... When I have the time I will make it the way it should - with memory buffer, this will avoid flickering, slow redraw ,...

Quote
There is space for 384 monsters but the list ends at 367
Yes, but the other entries are not used. I think its better to show only 367 rather having huge area of blank (empty) entries :)

Quote
Can something be done about this (pic attached)? Perhaps have the program look at the ASM for displaying text to find the correct location of the text.
All the text extraction is based on RPGe translation. If a ROM uses a different engine, most likely thing will get ugly (as in your pic). If there was a kind of master table, that hold pointers to where the text is (maybe similar to GBA)  then I can rework my code, to get the text addresses accordingly. Until then I have to use static offsets.

btw do you know anything about:
Code: [Select]
D07800-D079FF : Monster encounter (fixed)
D07A00-D07FFF : Monster encounter map
D08000-D083FF : Monster encounter map (Dungeon)
D08400-D084BF : En count increase in the number of settings (field * 3) (* 1)
D084C0-D085BF : En count increase in the number of settings (sub-map * 1024) (* 1)

Quote
FF5r has new enemies
Great, any chance you know a link where patch is applied? TBH I never apply .ips because usually the emulators include them automatically :(
Title: Re: FFV Viewer
Post by: Jorgur on July 06, 2016, 11:07:14 AM
Quote
Yes, but the other entries are not used. I think its better to show only 367 rather having huge area of blank (empty) entries :)
Well, people might want to make hacks with more monsters added at the end.
Quote
btw do you know anything about:
Nope. All I know is already in the wiki.
Title: Re: FFV Viewer
Post by: samurai goroh on July 06, 2016, 05:03:20 PM
btw do you know anything about:
Code: [Select]
D07800-D079FF : Monster encounter (fixed)
D07A00-D07FFF : Monster encounter map
D08000-D083FF : Monster encounter map (Dungeon)
D08400-D084BF : En count increase in the number of settings (field * 3) (* 1)
D084C0-D085BF : En count increase in the number of settings (sub-map * 1024) (* 1)
The monster encounter map, or as I called in my editor, zone formation contains the data of which enemy group you can encounter. The outworld map has 4 groups which are: Plains, Forest, Desert/Swamp, Sea. Each one will throw you a Group formation (which you can also see on my program & in the algorithm FAQ).

Here's the code of my editor:
Code: [Select]
Private Sub LoadWorldMonsterGroup(pfile As String, w, z, x, y)
' -----------------------------------------------------------------------------
'
' -----------------------------------------------------------------------------
    Dim World As Integer, Zone As Integer, CoordX As Integer, CoordY As Integer

    ' The variable FF is equal to the next available file number
    FF = freefile
     
    Open pfile For Binary As #FF
   
        World = w * &H200
        Zone = z * &H2
        CoordX = x * &H8
        CoordY = y * &H40
   
        ' ==================================================
        ' Load the World Map Enemy Group
        ' ==================================================
        Get #FF, &H107A00 + 1 + World + Zone + CoordX + CoordY + Header, CurVal
        cbGroup.ListIndex = CurVal
   
    Close #FF

End Sub

The dungeon encounter is the group formation in all rooms, hence why it has many 0's. I used the dungeon encounter in my Lua script when TASing the game:
Code: [Select]
--------------------------------------------------------------------------------
local function battle_LUT()         -- Retrieve the LUT located @ C0/FEC0
--------------------------------------------------------------------------------
    memory.usememorydomain("CARTROM")   -- Read from ROM

    for i=0, 255 do
        battle_lut[i] = memory.read_u8( 0x00FEC0 + i)   -- Look Up Table for RNG
    end

    memory.usememorydomain("WRAM")      -- Change back to RAM
end

--------------------------------------------------------------------------------
local function predictRNGBattle()   -- Predicts random battle stuff
--------------------------------------------------------------------------------
...
    local rBattle       = memory.read_u8( 0x0B50 ) -- Random Battle index
    local rBattlesSeed  = memory.read_u8( 0x0B5F ) -- random battle seed
    local NextEncounter = (battle_lut[(rBattle+1) % 256] + rBattlesSeed ) % 256

    if NextEncounter < 90 then                      -- Common 1 (90/256)
        encounterID = 0
    elseif within( 90, NextEncounter, 179) then     -- Common 2 (90/256)
        encounterID = 1
    elseif within(180, NextEncounter, 239) then     -- Uncommon (60/256)
        encounterID = 2
    else                                            -- Rare     (16/256)
        encounterID = 3
    end

    memory.usememorydomain("CARTROM")   -- Read from ROM
    local GroupFormation = memory.read_u16_le( 0x108000 + map*2 )  -- Dungeon
    local EnemyFormation = memory.read_u16_le( 0x106800 + (8 * GroupFormation) + (2 * encounterID) )
    memory.usememorydomain("WRAM")      -- Change back to RAM

I don't know about the other 3...


Quote
FF5r has new enemies
Great, any chance you know a link where patch is applied? TBH I never apply .ips because usually the emulators include them automatically :(
You can use Lunar IPS to patch:
http://www.romhacking.net/utilities/240/

I tried it out and while some images did load, some others where garbled. And also, the program crashed too in other occasions (when it just couldn't load the image, I guess)...
Title: Re: FFV Viewer
Post by: samurai goroh on July 06, 2016, 11:50:29 PM
btw do you know anything about:
Code: [Select]
D07800-D079FF : Monster encounter (fixed)
D07A00-D07FFF : Monster encounter map
D08000-D083FF : Monster encounter map (Dungeon)
D08400-D084BF : En count increase in the number of settings (field * 3) (* 1)
D084C0-D085BF : En count increase in the number of settings (sub-map * 1024) (* 1)

BTW, that's not what it says in the wiki
Code: [Select]
D0/7800-D0/797F Data Event encounters
D0/7980-D0/79FF Data Monster-in-a-box encounters
D0/7A00-D0/7BFF Data Monster zones in World 1 (4*2 * 8*8)
D0/7C00-D0/7DFF Data Monster zones in World 2 (4*2 * 8*8)
D0/7E00-D0/7FFF Data Monster zones in World 3 (4*2 * 8*8)
D0/8000-D0/83FF Data Monster zones in dungeons (512*2)
D0/8400-D0/85FF ???? (fragmented data)

Title: Re: FFV Viewer
Post by: Squall on July 07, 2016, 02:25:54 AM
Quote
You can use Lunar IPS to patch:
Thank you. I used 'FF5r140.ips' with 'Final Fantasy V (J).smc'. It didn't ask to make a copy :((
Anyway, in my Viewer it showed just garbage. Then I used an emulator on patched file - broken, only black screen. I'm I doing something wrong?

Quote
BTW, that's not what it says in the wiki
Yeah I took them from Japanese cite and saw that Jorgur lack any info for them in 'Monster data' thats why I decided to bring it in :D

My next version will be for Formation/Encounters, so I try to comprehend all possibilities and make a plan :)
But first I will be on vacation for next 10 days, so after I come back I might do monster graphic for GBA first.

 :edit:
Quote
local NextEncounter = (battle_lut[(rBattle+1) % 256] + rBattlesSeed ) % 256
So random part is a myth :D

P.S. samurai goroh what emulator you use for Lua scripts? I have Snes9X 1.53, but I cant find LUA in menu...
Title: Re: FFV Viewer
Post by: Jorgur on July 07, 2016, 05:11:04 AM
If IPS patching fails, try adding/removing header first. You can use TUSH:
http://www.romhacking.net/utilities/608/
Title: Re: FFV Viewer
Post by: noisecross on July 07, 2016, 06:49:04 AM
BTW, that's not what it says in the wiki

Feel free to edit that. I am only certain there about the D0/7A00-D0/7BFF addresses.
You can read the explanation in the wiki entry  Treasures (http://slickproductions.org/slickwiki/index.php/Noisecross:Final_Fantasy_V_Treasures#Monster-in-a-box).
Title: Re: FFV Viewer
Post by: Squall on July 07, 2016, 03:31:56 PM
Thank you Jorgur, I used a ROM without a header and patching worked.

Interesting, reading what  samurai goroh & noisecross said that mean we have couple of tables with encounters:
 - D0/7800-D0/797F - Event encounters (I guess thats connected with the story, that triggers when you enter a specific map-tile)
 - D0/7980-D0/79BF - Monster-in-a-box encounters
 - D0/7A00-D0/7FFF - World map encounters (with zones as samurai goroh explained)
 - D0/8000-D0/83FF - Monster in dungeons encounters(512*2)
and there is something in D08400-D085BF ...

P.S. noisecross I saw that some 1bpp fonts are 8x12 pixels. How that could be visualized in SNES? I thought that only tiles could be shown (8x8 pixels).
Title: Re: FFV Viewer
Post by: samurai goroh on July 07, 2016, 05:07:24 PM
I saw that some 1bpp fonts are 8x12 pixels. How that could be visualized in SNES? I thought that only tiles could be shown (8x8 pixels).
Don't quote me but IF 1BPP is of the size of 4x4 (just a guess), then you could have one 8x8 tile + two 4x4 tiles to form a 8x12 image...

Interesting, reading what  samurai goroh & noisecross said that mean we have couple of tables with encounters:
 - D0/7800-D0/797F - Event encounters (I guess thats connected with the story, that triggers when you enter a specific map-tile)
Looking at the monster formations, it's certainly is the 1-time only battles, like bosses, etc.
Title: Re: FFV Viewer
Post by: noisecross on July 08, 2016, 06:06:20 AM
P.S. noisecross I saw that some 1bpp fonts are 8x12 pixels. How that could be visualized in SNES? I thought that only tiles could be shown (8x8 pixels).

Indeed, the 1bpp font is stored as 8x12 in the rom, but every character have a size of 16x12 (2 blocks per character)
However, the font set is not written to VRAM as a tileset and after that displayed in screen using a tilemap. Instead, there is a loop which reads the game speech and write the graphics of each character, one by one into a buffer. After that, the buffer is written to VRAM.

The loop (hacked by RPGe) transform the 8x12 rom data into 8x8 tiles and also manage the VWF effect using shifts and masks.
Title: Re: FFV Viewer
Post by: Squall on July 19, 2016, 07:43:11 AM
Hey guys, I'm back from vacation :)

Quote
However, the font set is not written to VRAM as a tileset and after that displayed in screen using a tilemap. Instead, there is a loop which reads the game speech and write the graphics of each character, one by one into a buffer. After that, the buffer is written to VRAM.

The loop (hacked by RPGe) transform the 8x12 rom data into 8x8 tiles and also manage the VWF effect using shifts and masks.
Interesting. That explain how they can use 'half tile'. So this is pretty much as 'compression' method with graphics - to save space and then rely on asm to add what is necessary. I was wonder, isn't these going to use too much tiles (since each letter will require like 2x2 tiles to be rendered) ...

Anyway, I decided to add new feature to the Viewer - Encounters. While most things are straightforward, there are couple of questions:
- Do you know what exactly Visual FX byte control? I know only about '40 Underwater' - it discard monster palette and uses one of the predefined ones with ID from encounter palette. (I stumble on this searching for 'compression' routine)
- What Music FX byte control? I understand track part, but not the first 2 bits
- What '01 Alternate death' mean?
Title: Re: FFV Viewer
Post by: Squall on July 20, 2016, 07:13:48 AM
Another question about Music Control:

Can you help me identify track names in http://www.ffextreme.com/ff5/music.html
Code: [Select]
0 Battle
1 Boss
2 Neo-Exdeath
3 Gilgamesh
4 Exdeath
5 Exdeath battle
6 Gogo
7 Exdeath destroyed

They are ordered and numbered according the OST. So far I have:
Code: [Select]
0 - CD1: 07 - The Battle
1 - CD1: 19 - The Fierce Battle OR CD2: 16 - The Decisive Battle
3 - CD2: 03 - Death Battle in the Big Bridge

P.S. noisecross, I found FF5_Table:BGM (http://slickproductions.org/slickwiki/index.php/FF5_Table:BGM) very useful in your Maps (http://slickproductions.org/slickwiki/index.php/Noisecross:Final_Fantasy_V_Maps) document. Is this only accessible trough Map doc?
Title: Re: FFV Viewer
Post by: noisecross on July 20, 2016, 01:59:16 PM
P.S. noisecross, I found FF5_Table:BGM (http://slickproductions.org/slickwiki/index.php/FF5_Table:BGM) very useful in your Maps (http://slickproductions.org/slickwiki/index.php/Noisecross:Final_Fantasy_V_Maps) document. Is this only accessible trough Map doc?

Well... it was samurai goroh who wrote that table and also the one who edited the Maps entry to link it. All the credit goes to him.
About sound I only can help you with the instruments (http://slickproductions.org/slickwiki/index.php/Noisecross:FF5_Brr_Sound#Instruments).
The section "SPC Pointer Index" of this site (http://wiki.superfamicom.org/snes/show/Final+Fantasy+5) may be also useful to you.
Title: Re: FFV Viewer
Post by: Jorgur on July 21, 2016, 01:56:00 AM
Quote
- What '01 Alternate death' mean?
I'm guessing the death for some bosses such as Byblos.
Title: Re: FFV Viewer
Post by: Squall on July 21, 2016, 04:02:31 AM
Quote
About sound I only can help you with the instruments.
The section "SPC Pointer Index" of this site may be also useful to you.
Thank you. Well I have no intention to play/parse music from a ROM, thats too much work and I lack experience in that area :)

However I 'm curious about Music FX/Control byte in formations. Do you know about the 'fanfare' part? Also some battle can change the music (like final boss). Are there structures that hold that info or its hardcoded?
Title: Re: FFV Viewer
Post by: noisecross on July 22, 2016, 05:50:22 AM
All the text extraction is based on RPGe translation. If a ROM uses a different engine, most likely thing will get ugly (as in your pic)

You can fix this loading the ingame characters tileset and displaying all the names as pictures. (Click the "Monster" label in FF5e_Text_Editor to see what I mean) Another way to fix it is adding the possibility of loading TBLs, but it can be boring and dealing with TBLs is a mess...

By the way, it would be nice if you document how you manage to transform the monster "graphic id" to an actual picture. Which data tables are involved?
Title: Re: FFV Viewer
Post by: Squall on July 22, 2016, 07:08:55 AM
Quote
All the text extraction is based on RPGe translation.
What I mean is that the addresses in the ROM from where I extract text is RPGe based ROM map. If you use not translated or any other text engine embedded, the addresses will most likely different. Even if it is the same, there is the problem of translating to ANSI (TBLs). All in all its not a trivial task and I have no time for even considering it :)

GBA on the other hand uses .. lets call it Master Text Table. ALL the text you will ever need is there as index in that table, regardless if it is a name or Menu item or speech. You may see it if you open a gba rom in my Viewer under Text tab, there is lonely '5' text standing... actually it is an index in that table, trough which you may see all the texts in GBA.

Indexing is great because from asm/developers stand point let say id 20 is always the name of the monster 'Goblin'. You may rename it, you may translate it in other language - it doesn't matter, if I want to display the logical name Goblin, I will always use id 20. In SNES with addresses (actually offsets) monster named Goblin may be at address C00000 in original rom, E00000 in RPGe or whatever, but I have no master table to know, how to calc the relocated address.

Ok ... I dont know did I explain the difference of working with Master Table and static address but as developer thats the difference between constant and variable :D

Quote
By the way, it would be nice if you document how you manage to transform the monster "graphic id" to an actual picture. Which data tables are involved?
Yes I plan to make 'tutorial' like doc in Wiki on how to display monster image, including the addresses and structures that hold that info. If you need fast answer atm, what do you refer by graphic ID - the whole info that describe how to render an image or just the tiles?
Title: Re: FFV Viewer
Post by: Squall on July 22, 2016, 10:28:09 AM
Version 6.0 is out!!!

That is another major update:
- Added Encounters section
- You may SEE the actual battle formations
- You may even HEAR the music from the battle
- Predefined Monster Groups encounter
- Interactive World Map encounter selection

*In order to full experience the features you must download and unzip in the program folder the Maps & Music!!!

This is still WIP because I want to add Monster-in-a-box, Dungeon & Event encounters. They are connected with parsing info from maps, so I haven't decided their layout. Event Encounters are still with unknown format to me, so if you know something, share it please!
Title: Re: FFV Viewer
Post by: Squall on July 27, 2016, 01:52:37 AM
Version 6.1 is out!!!

- Added all encounter types (that I know): Monster-in-abox-, Dungeons, Events
- A routine that calc who is in front/back row.

Brainstorming:
- What do you think about sliders as a way to choose unnamed objects (that have only an index) vs ListBox filled with numbers?
- What do you think about battle formation pictures? To add or not a background from the game?

With that update I will stop adding new features until there is a request. For now I plan only to go back and add missing GBA functionality.
Title: Re: FFV Viewer
Post by: Dark Knight on July 28, 2016, 07:59:39 AM
Thank you for creating this editor. I have two requests for you, the first would be a shop editor. The second would be a job editor; the ability to change innate abilities, learnable abilities, and the expansion of learnable abilities. To make myself clearer, I would like to make the Monk learn Kick, but all its slots are filled up (7 slots is the maximum). So, I would just need to replace one of its abilities with Kick. For this example, I'll replace the Monk's HP +10% with Kick. Now, since I don't want to permanently remove HP +10% from the game and I would like to learn HP +10% on another job. Let's say Berserker. Berserker only learns 2 slots used out of 7, so adding a third ability on Berserker would be feasible since its not at the maximum (7). So, having all jobs be able to equip up to 7 learnable abilities would be what I am getting at. The reason I'm mentioning this is that there is another FFV editor that allowed the user to change abilities, but not expand it. Berserker had 2 slots editable, so the user could only change these 2 slots and not add a third or a fourth ability, etc. Anyways, keep up the good work and best of luck in your future endeavors.
Title: Re: FFV Viewer
Post by: Jorgur on July 28, 2016, 08:11:55 PM
Quote
- What do you think about battle formation pictures? To add or not a background from the game?
I would like it if monster graphics and backgrounds were extracted from the ROM. You could add an option to select the displayed background image.
Title: Re: FFV Viewer
Post by: Squall on July 29, 2016, 02:41:30 AM
Quote
You could add an option to select the displayed background image.
That's exactly what I was wanting to make. I was thinking to put arrows on sided so you can change backgrounds from the game. Unfortunately I don't know how to render a background from ROM. Even the PC version uses couple of layers and it will be hard for me to compose the final image.

Quote
Thank you for creating this editor ... anyways, keep up the good work and best of luck in your future endeavors.
Thank you for the kind words Dark Knight. Probably there is a confusion because this project is a Viewer (as the name states) and unfortunately it was not designed to edit :(

Code: [Select]
I have two requests for you, the first would be a shop editor.Thats funny, because adding Shops was what I planned to add next. TBH I like things to be interactive and as close to the game as possible. That's why shops will come more natural when seen on a map - noisecross Map Editor. But since there is request I will do it :)

Code: [Select]
the ability to change innate abilities Changing innates is a very, very hard task.

Quote
To make myself clearer, I would like to make the Monk learn Kick, but all its slots are filled up (7 slots is the maximum). So, I would just need to replace one of its abilities with Kick. For this example, I'll replace the Monk's HP +10% with Kick. Now, since I don't want to permanently remove HP +10% from the game and I would like to learn HP +10% on another job. Let's say Berserker. Berserker only learns 2 slots used out of 7, so adding a third ability on Berserker would be feasible since its not at the maximum (7). So, having all jobs be able to equip up to 7 learnable abilities would be what I am getting at.
Ahh Kick, the trademark of a monk :D It is interesting idea, although Kick itself sux on SNES. If you play PC version thats where Kick shines.
Anyway you can easily do that by using samurai goroh's FF5 Editor
Title: Re: FFV Viewer
Post by: Jorgur on July 29, 2016, 03:03:14 PM
Quote
Unfortunately I don't know how to render a background from ROM. Even the PC version uses couple of layers and it will be hard for me to compose the final image.
How about monster graphics? That shouldn't be too hard since the monster viewer already does that.
Title: Re: FFV Viewer
Post by: LightPhoenix on July 31, 2016, 05:59:27 PM
The second would be a job editor; the ability to change innate abilities, learnable abilities, and the expansion of learnable abilities.

In general, I think this would be cool as well.

Quote
Let's say Berserker. Berserker only learns 2 slots used out of 7, so adding a third ability on Berserker would be feasible since its not at the maximum (7). So, having all jobs be able to equip up to 7 learnable abilities would be what I am getting at. The reason I'm mentioning this is that there is another FFV editor that allowed the user to change abilities, but not expand it. Berserker had 2 slots editable, so the user could only change these 2 slots and not add a third or a fourth ability, etc. Anyways, keep up the good work and best of luck in your future endeavors.

However, this is not how job levels and abilities work at all.  If you're looking to do complex changes, you should work with ASM.

All of this data is basically in a bunch of linked tables.  There is a table for Levels/Job, another table with ABP and learned ability, and so forth.  There's nothing inherent about seven levels; Berserker only has two levels.  You could (in theory) have ten levels, or sixteen, or one.  Because of this, making an editor that changes things any more than superficially (ie, adding job levels, or jobs, or abilities) is a much bigger undertaking than just changing what ability to learn (a one byte change).  That's not to say it couldn't be done - but it's a lot of work and not easy.  Furthermore, messing it up ends up corrupting your ROM and save games.  I don't think that's in the scope of this project yet.

Working with abilities run the gamut from difficult to very difficult.  There is stuff you can do with just table editing, but most of it requires assembly.  Passives in particular are almost entirely hard-coded.
Title: Re: FFV Viewer
Post by: Squall on August 01, 2016, 10:12:47 AM
LightPhoenix, do you have any info on how battle backgrounds were rendered, what structures they use?
Title: Re: FFV Viewer
Post by: Squall on August 05, 2016, 01:52:09 AM
Hey x0_000, so far I have discovered the following on displaying GBA monster graphic:
- The graphic part of the info start at 1C7E54
- The data contain compressed part (Standart for GBA LZ77) + 32bytes Palette info
- compressed part is Header + Tiles
- Palette is 16 color

Please, help me to find the master table: MonsterID -> Graphic Data!
If that will help, next monster graphics start immediately after the first at 1C807C
Title: Re: FFV Viewer
Post by: x0_000 on August 05, 2016, 09:53:33 PM
I'm 90% certain the palette and graphics are in a table with two word pointers and that it's ordered by monster ID by comparing the data near Neo Exdeath's graphics (which are at 08131a00 and 08131a08) with the Monster Editor, and I also notice that the palette pointers might have a header or something?
Title: Re: FFV Viewer
Post by: LightPhoenix on August 06, 2016, 05:34:00 PM
LightPhoenix, do you have any info on how battle backgrounds were rendered, what structures they use?

Sorry, never looked much into that.
Title: Re: FFV Viewer
Post by: Squall on August 08, 2016, 01:44:48 AM
Quote
... and I also notice that the palette pointers might have a header or something?
No there is no header for palette. The palette part is exactly 32 bytes, which is the exactly how 16 color palette need.

Quote
Sorry, never looked much into that.
Too bad, you usually have deep knowledge on a subject and that would have been tremendous help :(

 :edit: I was able to display Goblin correctly from GBA ROM!!!  :cycle:
But I used constant addresses, now only the master table is left, so I can take the the addresses dynamically.
Title: Re: FFV Viewer
Post by: Squall on August 11, 2016, 01:35:57 AM
Finally I was able to crack Battle Backgrounds for GBA  :cycle:

x0_000 since GBA screen is 240 wide, but backgrounds are 256, do you know why there are extra 16 pixels (2 tiles/row)?
Title: Re: FFV Viewer
Post by: x0_000 on August 11, 2016, 01:36:11 PM
256 is a power of 2, 240 isn't. It makes it easier for the hardware to reference specific tiles in memory.
Title: Re: FFV Viewer
Post by: Squall on August 11, 2016, 06:10:53 PM
Interesting. So the player will never see this 16 pixels strip ...

Well I hopped it will be used for scroll effects. PC version always do some sort of parallax scroll when battle starts. It uses 3 layers for that effect, two of which glued together are as GBA version, but 3rd is unique to PC. Also in some battles you may see horizontal scroll of clouds or something.

BTW GBA graphics is much easier to me, maybe because it uses data structures close to what you normally do on PC :D

x0_000 in background graphic Map/Pattern/Form part has 12 bytes of header.  First 8 are standard, but do you know what last 4 are for?
Title: Re: FFV Viewer
Post by: Squall on August 12, 2016, 09:14:29 AM
Version 7.0 is out!!!

It became tradition each Friday a new version to come out :D

Although this is a major version, all changes are GBA only:
- New Background tab - now you can see battle backgrounds, even animate some of them :)
- New LZ77  (aka LZ10) decompression, heavily used by GBA games
- Updated monster graphics with GBA
- Updated encounters for GBA. Event and Dungeon ones are still missing.

Short term plans:
- I will add SNES battle backgrounds if somebody help me / teach me how render it. SNES ones are quite ugly so that will be my lowest priority task
- Battle preview with background of our choice (need to decide on the layout)
- Two new docs/tutorials for Wiki - Rendering GBA monster graphic and battle background
Title: Re: FFV Viewer
Post by: Jorgur on August 12, 2016, 10:29:01 AM
So far what I see still missing is:
- Character data
- Equipment types/elemental properties/status properties
- SNES backgrounds (I hope you will do this at some point)
I also feel the encounter viewer needs a bit of work. I would like to see monster graphics (and if possible backgrounds) displayed as in the ROM.

Great work as usual, keep it up!
Title: Re: FFV Viewer
Post by: Squall on August 12, 2016, 02:45:58 PM
Quote
Great work as usual, keep it up!
Thank you very much for the kind words!

Quote
So far what I see still missing is:
- Character data
- Equipment types/elemental properties/status properties
I was thinking about Character as a next big step.
Since 'Equipment types/elemental properties/status properties' are already shown when needed I suspect you are talking about the underlying tables, since these are just indexes in tables. I would love to add it, because I feel its quite neglected in all Editors that I have seen. The thing is they are very short with short info ... so not worth dedicating a whole tab. I was thinking maybe to do as you Jorgur with 'Common Lists' - to combine many different ones in one dedicated tab. What do you think?

Quote
I also feel the encounter viewer needs a bit of work
I volunteer to do the work, just tell me in details what you have in mind :D
Title: Re: FFV Viewer
Post by: x0_000 on August 12, 2016, 06:43:35 PM
x0_000 in background graphic Map/Pattern/Form part has 12 bytes of header.  First 8 are standard, but do you know what last 4 are for?
I don't know what you're talking about, is this a header in the graphics data itself or a table header?
Title: Re: FFV Viewer
Post by: Jorgur on August 13, 2016, 07:34:58 AM
I was thinking maybe to do as you Jorgur with 'Common Lists' - to combine many different ones in one dedicated tab. What do you think?
Yes, I do mean the tables. I would put them under "Items" since they are all related to items.

Quote
I also feel the encounter viewer needs a bit of work
I volunteer to do the work, just tell me in details what you have in mind :D
Not much, really. The background is still white but I'm sure you are working on that. The monster graphics are not extracted from ROM which means if a ROM uses custom monsters they will display incorrectly in the encounter viewer.
Title: Re: FFV Viewer
Post by: Squall on August 14, 2016, 05:29:05 PM
x0_000 in background graphic Map/Pattern/Form part has 12 bytes of header.  First 8 are standard, but do you know what last 4 are for?
I don't know what you're talking about, is this a header in the graphics data itself or a table header?
The Master Table for Battle Backgrounds contain 3 pointers - Tiles, Palettes & Tile Map (others may call it form, pattern...)
The TileMap points to a 12 bytes of header followed by the map itself ... First four is a number (constant), second is the number of Map entries.

So my  questions is - do you know what is the meaning of the last 4 bytes. Just open my Viewer they are under 'Extra'
Title: Re: FFV Viewer
Post by: x0_000 on August 15, 2016, 02:35:12 AM
Oh, I have no clue.
Title: Re: FFV Viewer
Post by: Squall on September 09, 2016, 02:34:38 AM
FINAL FANTASY V - VIEWER

This viewer can reveal most of the secrets Final Fantasy V holds. It is applicable to following:
The Viewer has so many options that will take forever to describe here. Let me just mention some of the neat features, that at least I have never seen in any other utilities for FFV:

Screenshots: 01 (http://www.bwass.org/bucket/FFV_Viewer - Screen1.png)  02 (http://www.bwass.org/bucket/FFV_Viewer - Screen2.png)  03 (http://www.bwass.org/bucket/FFV_Viewer - Screen1.png)   04 (http://www.bwass.org/bucket/FFV_Viewer - Screen4.png)
Title: Re: FFV Viewer
Post by: Squall on September 09, 2016, 02:53:00 AM
Hey guys, I decided to post the Viewer in RHND. Previous post is how its going to be described. What do you think?
Title: Re: FFV Viewer
Post by: Squall on September 10, 2016, 02:51:51 AM
OK, RHND post is up (after waiting couple of days ... so boring): http://www.romhacking.net/utilities/1230/

I will appreciate your efforts if you take some time and write a review there  :laugh:
Title: Re: FFV Viewer
Post by: samurai goroh on September 10, 2016, 09:29:20 AM
That sounds great, congrats Squall :)

I already left some comments there ;)
Title: Re: FFV Viewer
Post by: Squall on September 10, 2016, 06:58:57 PM
Thank you very much, samurai goroh!

BTW What are you doing this summer? Any interesting thing with FF5?:)
Title: Re: FFV Viewer
Post by: samurai goroh on September 11, 2016, 10:02:07 AM
The only activity related to FF5 I'd done recently was playing the Four Job Fiesta (Berserker), but that was a month or two ago.

I need to fix some RetroAchievements for the GBA version (http://retroachievements.org/Game/764), but still have no clue why that triggers when it really shouldn't...
Title: Re: FFV Viewer
Post by: Squall on September 11, 2016, 03:19:11 PM
Interesting, is RetroAchievements like achievements on Steam?
I have 93/96 there, somehow I missed a mob and didnt get AllTreasure achievement. I need these 2 to get the grand achievement: "FINAL FANTASY V Master"  :laugh:

BTW what is 'Final Fantasy V (J2E) (SNES)'? I think I have seen J2E somewhere else but I dont know what is it.
Title: Re: FFV Viewer
Post by: samurai goroh on September 14, 2016, 05:26:23 PM
In a way it is. In RetroAchievements (RA for short), you track the memory addresses and when all the conditions met, then the achievement will trigger.

As for what is J2E, is probably just an acronym for "Japanese to English", which means that the ROM needs a patch that translate the game to English. Also, I think it was the name of one of the teams that developed translations patches, but can't remember right now...
Title: Re: FFV Viewer
Post by: Squall on September 15, 2016, 07:27:07 AM
I see. Did you get Master on Steam?
Title: Re: FFV Viewer
Post by: samurai goroh on September 16, 2016, 05:57:40 PM
Nope, for some reason I seemed to have missed a treasure, so I couldn't get the last 2 achievements. Haven't had the willing to play it just for that, but some day I may...
Title: Re: FFV Viewer
Post by: Squall on January 12, 2018, 09:32:27 AM
Hey guys,

its been a while a have done something for the Viewer. Recently I stumbled on info about FF5a font format. So here is my preliminary work:
(http://www.bwass.org/bucket/Clipboard04.png)

It seems GBA uses 3 fonts, all vwf and that is the reason to have gray columns. I wonder if it was you, what feature you would like to see done in the Viewer? Currently I plan to:
- show all 3 fonts,
- show some info about their metrics,
- maybe text experiment - you can type a sentence and it will be rendered with selected font
Title: Re: FFV Viewer
Post by: Squall on January 28, 2018, 12:48:25 AM
Here is preview of the new feature (tab). You may see all 3 fonts, you may see their metric. You can experiment to see how a text is rendered in the game - ANSI or native for GBA. You can click on the font to see it character metric and also preview it in the native part.
(http://www.bwass.org/bucket/FFV_Viewer - Fonts.png)

P.S. If you have any suggestions please don't hesitate to share!
Title: Re: FFV Viewer
Post by: Squall on February 12, 2018, 03:12:25 AM
I have added the new version 7.2 for download on the first page!

Currently I'm working on number of things that are mainly for the GBA versions:
- Portraits - I need all the info - tiles, palettes, reference tables
- Job Sprites - I have found tiles & palettes. I need info on tile-maps and the Master table containing the indexes in the 3 tables.

To keep things synchronized I would like to expose Fonts of SNES version similar to GBA. If you guys know anything about RPGe implementation of VWF please share it.
Title: Re: FFV Viewer
Post by: x0_000 on February 23, 2018, 11:29:31 PM
The only info I have for portraits is that they are located near 081446a8, you should try using GBA graphics viewer (https://www.romhacking.net/utilities/529/) to narrow it down more. The simplest way to find tables is to search for pointer references, i.e. if something in a table is located at 08XXYYZZ do a hex search for ZZ YY XX 08 (or worst case YY XX 08 if the code offsets it by some fixed amount.)
Title: Re: FFV Viewer
Post by: Squall on February 24, 2018, 08:22:50 AM
Sorry slick was down for so long ... Actually I found almost all in EU version:
Code: [Select]
Portrait Table: $1465A0, 24 bytes per entries
  Portrait 1 tiles - 4 bytes (absolute memory address), LZ10 compressed, 4B aligned, shape 4x5
  Portrait 2 tiles - (same as above)
  Portrait 3 tiles - (same as above)
  Portrait 1 Palette - 4 bytes (absolute memory address). 40 bytes. 8byte header (4B type(03) + 4B PalNums)+ 32 bytes PalEntries
  Portrait 2 Palette - (same as above)
  Portrait 3 Palette - (same as above)
* Physically data is stored in the same order: Portrait1, Portrait2, Portrait3, Pal1, Pal2, Pal3

Some questions were left:
I don't know what the 3 portrait are used and which pal is applied. Pal1 is 16 color. Pal2 is 16 shades of blue. Pal3 is 16 shades of gray.
Title: Re: FFV Viewer
Post by: Squall on February 28, 2018, 02:47:08 PM
OK I made a screenshot from my new tool: Visual SAK

FF5a store 3 tilesets and 3 palettes for each person. If we apply the pal1 to tileset1, pal2 to tileset2, pal 3 to tileset 3 will result to a picture that I have attached. It seems to me that tileset1 is the main, tileset2 is darker version and tileset3 is an inverse (negative). If you check palettes, Pal1 - normal colors, Pal2 - grayscale, Pal3 is monochrome blue.

So the question stays - have you seen these 3 variations and do you know when/for what each is used?
Title: Re: FFV Viewer
Post by: Xardas on February 28, 2018, 05:39:32 PM
So the question stays - have you seen these 3 variations and do you know when/for what each is used?
I have never seen any other version than the first one.
BUT I have an answer for you, which might be just right (disclaimer: I don't know it, I just use my commonsense/thoughts)
Tileset 1 is the normal version used for dialogue. We all agree on that.
I suppose Tileset 2 and 3 were never made for dialogue - but for the main menu! Let me elaborate:
Tileset 2 is not a "slightly darker version" imho. Look closely - it's a black and white version. It was probably created to display a petrified character.
And Tileset 3 was most likely created to display a KO/dead character.

I am pretty sure because a b/w tileset and an invert tileset were both actually used on FFIV Advance to distinguish petrified and dead characters on the main menu respectively. Since the remake style of the 3 Advance releases (IV, V and VI) are very similar (window color, font, title screen, bestiary/music player, post-game content...), I think it's not far-fetched to say that "petrified" and "dead" menu portrait tilesets were prepared for FFV Advance as well, after being used for FFIV Advance.

While being appropriate for the FFIV menu, it got dummied out for FFV. I suppose the developers dicided to stick with the sprites since it's much faster recognizing which job the characters are using. If the portraits were used on the main menu, you would have to read out the jobs - which wouldn't be too bad, but still imho taking more time than recognizing 4 job sprites within a single blink of your eye.
Title: Re: FFV Viewer
Post by: Squall on February 28, 2018, 06:19:34 PM
Good, I was afraid I'm the only one missing second and third portrait in the game :D

Your explanation make sense. Unfortunately I'm not familiar with FFIVa to observe described behavior, but as you said there are plenty of similarities between both (for GBA), while FFVI is quite different ...

Quote
Tileset 2 is not a "slightly darker version" imho. Look closely - it's a black and white version. It was probably created to display a petrified character.
Hehe you made me laugh so much, more then most comedy do :D
Anyway, I know its black and white (actually its gray-scale) since I already said that in the previous post. What I mean is that if I use Pal1 on Tileset2 we will get a darker version.
Title: Re: FFV Viewer
Post by: Xardas on March 01, 2018, 02:37:34 AM
Hehe you made me laugh so much, more then most comedy do :D
Anyway, I know its black and white (actually its gray-scale) since I already said that in the previous post. What I mean is that if I use Pal1 on Tileset2 we will get a darker version.
lol, now I see it, must have overlooked the last part of that sentence haha.
Anyway, just for confirmation I attached 2 screencaps where you can compare the petrified and dead portraits to the normal one.
Title: Re: FFV Viewer
Post by: Squall on March 01, 2018, 02:49:16 AM
Thank you Xardas!
I can't believe I hadn't play FFIVa. There was a time when I tried different console version as an excuse to replay a FF title.
Porom looks so cute that make me want to try it right now :D
Title: Re: FFV Viewer
Post by: 13375K31C43R on March 02, 2018, 12:03:29 PM
First of all, great work on this!

Second, you know what I would absolutely love this to have? An event script editing mode. I know there's still some R&D to be done in the area of event scripts, and I have some important school stuff to get out of the way before I help with that, but please make it happen! :childish: :cookie:
Title: Re: FFV Viewer
Post by: Squall on March 02, 2018, 01:23:52 PM
First of all, great work on this!
Thank you!

Second, you know what I would absolutely love this to have? An event script editing mode. I know there's still some R&D to be done in the area of event scripts, and I have some important school stuff to get out of the way before I help with that, but please make it happen! :childish: :cookie:
With great pleasure! There is one condition though - you guys make the R(research), I will do the D(development)  :laugh:
13375K31C43R Do you think you can deep dive in the topic? LightPhoenix had made an extensive research in the past and his documents are the only thing we have on the subject.
Title: Re: FFV Viewer
Post by: 13375K31C43R on March 02, 2018, 09:28:01 PM
First of all, great work on this!
Thank you!

Have a cookie! :cookie:

13375K31C43R Do you think you can deep dive in the topic? LightPhoenix had made an extensive research in the past and his documents are the only thing we have on the subject.

I did make some contributions (over a year ago) to LightPhoenix's list of event script IDs, which I put on Google Drive - check it out here (https://docs.google.com/document/d/1wX10LWyX3Y09d0LAxsY6sRGJ4kGQF9TpLufK3kLhraI/edit?usp=sharing). I would absolutely love to get back to that when I have a little more time. I would also like to improve on his reference of event commands. Those two things will be most useful to you.
Title: Re: FFV Viewer
Post by: Squall on March 03, 2018, 06:32:53 AM
Have a cookie! :cookie:
Mmm yummy, may I have another one?  :laugh:

I did make some contributions (over a year ago) to LightPhoenix's list of event script IDs, which I put on Google Drive - check it out here (https://docs.google.com/document/d/1wX10LWyX3Y09d0LAxsY6sRGJ4kGQF9TpLufK3kLhraI/edit?usp=sharing). I would absolutely love to get back to that when I have a little more time.
Great! I didn't know you are working on them. I'm curious, did you do 'de-compile' a script to its commands and then, maybe put some notes there (similar to what LightPhoenix has done to few scripts), or you when trough the script, understood what it does and added a description?

Quote
I would also like to improve on his reference of event commands. Those two things will be most useful to you.
Indeed! A deeper event command research is a must! LightPhoenix  has done outstanding job, but there are some blind spots. Also possibilities for error is huge until more people do the digging and then more people use it for decompile/edit.
Title: Re: FFV Viewer
Post by: 13375K31C43R on March 03, 2018, 12:30:17 PM
I'm curious, did you do 'de-compile' a script to its commands and then, maybe put some notes there (similar to what LightPhoenix has done to few scripts), or you when trough the script, understood what it does and added a description?

A combination of the latter plus debugging.
Title: Re: FFV Viewer
Post by: 13375K31C43R on March 03, 2018, 12:36:44 PM
By the way, I'm getting an error when trying to run this: "S:\2564 - Final Fantasy V Advance (U)(Independent).gba not found."
Title: Re: FFV Viewer
Post by: Squall on March 04, 2018, 08:02:32 AM
By the way, I'm getting an error when trying to run this: "S:\2564 - Final Fantasy V Advance (U)(Independent).gba not found."
That's left over from debugging process. Just close it and it will continue.
Title: Re: FFV Viewer
Post by: Xardas on March 04, 2018, 08:18:01 AM
Speaking of errors, I always forget reporting this:
when trying to view the battle background for a SNES ROM, "Not valid LZ77 Stream" and "Access violation at address 00497911 in module "FFV_viewer.exe" read of address 00000004" pop up. So the backgrounds are not shown.
However, for GBA ROMs, everything is fine. Backgrounds are shown, and no error occours.
Title: Re: FFV Viewer
Post by: Squall on March 04, 2018, 11:08:54 AM
Code: [Select]
7.0 Added Background tab (GBA only!) Added LZ77 GBA compression. Added Monster Graphics (GBA)
Unfortunately that is still true, this feature is GBA only! I have no enough info to do the SNES part :(

If you guys have any info, please share it here!