• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
October 27, 2020, 10:48:01 am

News:

Please use .png instead of .bmp when uploading unfinished sprites to the forum!


Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - nitwit

1
I'm posting this here on the chance that someone else is working on getting all the data tables and disassembled routines on the wiki into a form which can be assembled. Right now it's just copies of most of the disassembled routines for the files straight from the wiki.  Attached is a zipped folder with text files containing the disassembled routines.

It's more tedious than difficult, but with current circumstances being what they are I have more free time than usual. If you want to have the disassembled routines in a convenient off-line form, this would be it. If you have additional information not found in these files or one the wiki, please share or update the wiki.

Goals
  • Rip the disassembled routines from the files I haven't done yet from the wiki into the appropriate text files.
  • Add the missing routines into these text files.
  • Add data tables to the text files.
  • Make a duplicate set of files named with the *.asm extension instead of the *.txt extension, for assembling.
  • Replace all the routine calls in *.asm with labels.
  • Replace operands with labels where appropriate in *.asm; will require a bit of thought or maybe pseudo-opcodes.
  • Put data tables in the *.asm files in a form which my assembler will recognize, ideally using labels so they can be resized and altered at will.
  • Put compressed text tables, uncompressed text tables where they exist, and metadata/pointers for media assets into the files or devise some way to automate their creation given a set of inputs.
  • Do whatever else I currently don't know to get the *.asm files to assemble.
  • Apply all the essential and definitive bug-fixes, optimizations, and extensions to the *.asm files.
  • Improve comments in both *.txt and *asm files.
  • Discuss, plan, and implement new optimizations and extensions.
  • Port the codebase and assets to a platform that allows more resources for improving and expanding the codebase, data, and assets, such as the PS2 or PSP. Please note that the PSP version is hardly a real port.

It wouldn't be a bad idea to upload these files to a source host that allows incremental revision such as Github. I make no claims of copyright to any of these files.

I use the assembler ARMIPS.

This thread may be useful if it isn't already incorporated in the wiki.

As of the last edit of this post I have grabbed all the wiki entries on equip.out and require.out; they are in the zip file below. I'm going with the smallest files first. They are missing quite a few disassembled routines which weren't in or disappeared from the wiki, and the comments are sparse compared to SCUS and the battle.out file.

Let me know if you have any issues with these files.
2
... to navigate to files and load them?
3
PSX FFT Hacking / RetDec, a retargetable decompiler
March 02, 2018, 05:18:54 pm
https://github.com/avast-tl/retdec
QuoteRetDec is a retargetable machine-code decompiler based on LLVM.

The decompiler is not limited to any particular target architecture, operating system, or executable file format:

* Supported file formats: ELF, PE, Mach-O, COFF, AR (archive), Intel HEX, and raw machine code.
* Supported architectures (32b only): Intel x86, ARM, MIPS, PIC32, and PowerPC.

Features:

* Static analysis of executable files with detailed information.
* Compiler and packer detection.
* Loading and instruction decoding.
* Signature-based removal of statically linked library code.
* Extraction and utilization of debugging information (DWARF, PDB).
* Reconstruction of instruction idioms.
* Detection and reconstruction of C++ class hierarchies (RTTI, vtables).
* Demangling of symbols from C++ binaries (GCC, MSVC, Borland).
* Reconstruction of functions, types, and high-level constructs.
* Integrated disassembler.
* Output in two high-level languages: C and a Python-like language.
* Generation of call graphs, control-flow graphs, and various statistics.

You can try all of these features by using our online decompilation service.


It can only handle files smaller than 10 megabytes, but I wonder what it would output from BATTLE.BIN or the SCUS?
4
Help! / Tools to improve hacking workflow?
July 29, 2017, 06:04:11 am
I was thinking earlier about how much effort it would take to actually rewrite a set of routines, like reactions or forumulas.  Most of the difficulty even for an expert assembly programmer isn't in the programming itself, it's in managing all the information.  Everything you need to know is spread across hundreds of pages on the wiki, so first you need to manually copy and paste all those pages into a bunch of text files and come up with a system to document them and how they all fit together.  When you're done with that you must develop a build cycle so you can compile all these things, put them in the right place, and then get them into a disc image and test them.

This is suboptimal.  It's like trying to develop using build methods and techniques from the 1950s.  It's insane that we still do this in an era of free online source hosting with automated build tools.

Please note that I intend this thread as a discussion on the nature of these problems, and potential best practices and solutions.  I will present my opinion in replies to this.  I encourage everyone - hacker or not - to do the same.  My goal is to create a system where we can do the best hacking and programming with the least effort.  Do not be afraid to comment!

1. What is the ideal build cycle for an average assembly hacker?

2. What is the ideal build cycle for someone who wants to rewrite and optimize large portions of the game mechanics?

3. What is your current build cycle?

4. What tools exist to improve our build cycles?

5. What is the gap between the tools that exist and what would be ideal?

6. What tools, techniques, and protocols would lower the entrance barrier for assembly hacking?

7. What non-coding obstacles prevent you from setting up your ideal build environment?

8. Why did previous attempts at rewrites fail?
5
The Lounge / FFH image assets?
July 17, 2017, 02:24:32 am
Where can I find the image assets from the previous incarnations of FFH?  Specifically the one where the area outside of posts replicated the FFT formation menu?
6
The Lounge / Synthwave
January 01, 2017, 09:44:51 pm
Found something great for programming and lifting.  I've never heard anything like this music.



















7
http://ffhacktics.com/wiki/1F_Dmg_%28%28100-CasF%29*%28100-TarF%29*%28MA%2BY%29*MA/2%29#Hit.28Rdm.281.2CX.29.29

This gets some very weird results (72000 damage) when I feed it 70 faith for both parties and 5 MA.

...

Should be divided by 10,000 (or 100, twice), since the (100 - caster faith) and (100 - target faith) are actually percentages.

8
If I change a specific knife to a sword-type in FFTPatcher would the formula it uses change as well?  Or are the formulas hardcoded to the specific item slots?

I'm pretty sure that only the equipped-in-body-slot is hardcoded (you can't turn a hat/helmet/ribbon into an armor/clothing/robe).
9
Help! / Wiki Attention Thread
September 22, 2016, 11:18:17 am
I'm doing a bit of work since I have free time due to insomnia.  I'm adding links to every documented subroutine call (jal 0x????????) where it is called.

I do this by going to any formula or routine, ctrl + f jal, finding the address it jumps and links to, and then ctrl + f that address on the Routine Locations wiki page:
http://ffhacktics.com/wiki/Routine_Locations

Generally a good idea to include on every subroutine what jal's to that page, but that's less important since you can use the Special Page "What Links Here" on the left sidebar under the tools menu to find the same information.

If you see anything that needs attention in the wiki make a post.

Question for asm hackers and wiki admins - why does the Return Locations section in those subroutines that are jal'd to contain the start of that routine as the address listed, instead of the address to which it would return after that routine?

http://ffhacktics.com/wiki/Current_Action_Data_Nulling
The above page jumps and links to the below page 3 times:
http://ffhacktics.com/wiki/Data_Nullifying

Data Nullifying displays the addresses to which the jal subroutine calls in Current Action Data Nulling return.  Other wiki pages instead display the first address of the routine from which they are called, and not the addresses to which they return on completion.  Which should I use?

Something else, I've found several duplicate pages, with different titles and different comments on the disassembly.  I assume that these are parameterized, but shouldn't these duplicate pages acknowledge one another?
10
Help! / Allowing FFTPatcher to edit unknown bytes?
September 10, 2016, 01:43:19 pm
http://ffhacktics.com/wiki/Data/Table_Locations

While scrolling through this page in the wiki, I noticed that there are a few unused/unknown bytes in several data tables.

80062eb8 - Item Data Start (12 bytes each)
0x00 - Palette
0x01 - Sprite ID
0x02 - Required Level (for random generation)
0x03: Type Flags
0x80 - Weapon
0x40 - Shield
0x20 - Headgear
0x10 - Armor
0x08 - Accessory
0x04 -
0x02 - Rare
0x01 -
0x04 - Second Table ID
0x05: Item Type
01 - Knife
02 - Ninja Blade
03 - Sword
04 - Knight Sword
05 - Katana
06 - Axe
07 - Rod
08 - Staff
09 - Flail
0a - Gun
0b - Crossbow
0c - Bow
0d - Instrument
0e - Book
0f - Polearm
10 - Pole
11 - Bag
12 - Cloth
13 - Shield
14 - Helmet
15 - Hat
16 - Hair Adornment
17 - Armor
18 - Clothing
19 - Robe
1a - Shoes
1b - Armguard
1c - Ring
1d - Armlet
1e - Cloak
1f - Perfume
20 - Throwing
21 - Bomb
22 - Item
0x06 -                         //unknown/unused
0x07 - Item Attributes
0x08 - Price
0x0a - Shop Availability
0x0b -                         //unknown/unused


80063ab8 - Weapon Secondary Data
0x00 - Range
0x01 - Attack Flags
0x80 - Striking
0x40 - Lunging
0x20 - Direct
0x10 - Arc
0x08 - 2 Swords
0x04 - 2 Hands
0x02 - Throwable
0x01 - Forced 2 Hands
0x02 - Formula
0x03 -                         //unknown/unused
0x04 - Weapon Power
0x05 - Evade
0x06: Element
0x80 - Fire
0x40 - Lightning
0x20 - Ice
0x10 - Wind
0x08 - Earth
0x04 - Water
0x02 - Holy
0x01 - Dark
0x07 - Inflict Status/Cast Spell
11
I saw them somewhere, but I don't recall where.

I need something that will calculate stats at level 1, 99, and somewhere in between for given raw stats and class growths and multipliers.  If I can then select an ability or a formula and the x/y values for it and have the damage at various levels that would be cool too.

http://www.gamefaqs.com/ps/197339-final-fantasy-tactics/faqs/3876

statBonus at any given level = [currentRawStat / (Growth + Level)]

I know there's some math function - probably related to either sequences or series - that deals with this sort of thing, but I can't remember it.  I could easily write a loop to figure this out, or even a recursive function... if only I had paid attention in discrete math 2!

EDIT

Screw it, I can make a command line program to do the calculations for me.

http://ffhacktics.com/wiki/Data/Table_Locations

RAM -> File
-0x67000 -> WLDCORE.bin
-0x67000 -> Battle.bin
-0xE0000 -> World.bin
-0xF800 -> SCUS

800610b8 - 0x518B8 - Job Data

0x00 - Skillset
0x01 - Innate Ability 1
0x03 - Innate Ability 2
0x05 - Innate Ability 3
0x07 - Innate Ability 4
0x09 - Equippable Items 1
0x0a - Equippable Items 2
0x0b - Equippable Items 3
0x0c - Equippable Items 4
0x0d - HP Growth
0x0e - HP Multiplier
0x0f - MP Growth
0x10 - MP Multiplier
0x11 - Speed Growth
0x12 - Speed Multiplier
0x13 - PA Growth
0x14 - PA Multiplier
0x15 - MA Growth
0x16 - MA Multiplier
0x17 - Move
0x18 - Jump
0x19 - C-EV
0x1a - Innate Statuses 1
0x1b - Innate Statuses 2
0x1c - Innate Statuses 3
0x1d - Innate Statuses 4
0x1e - Innate Statuses 5
0x1f - Status Immunity 1
0x20 - Status Immunity 2
0x21 - Status Immunity 3
0x22 - Status Immunity 4
0x23 - Status Imminity 5
0x24 - Starting Statuses 1
0x25 - Starting Statuses 2
0x26 - Starting Statuses 3
0x27 - Starting Statuses 4
0x28 - Starting Statuses 5
0x29 - Absorbed Elements
0x2a - Nullified Elements
0x2b - Halved Elements
0x2c - Elemental Weakness
0x2d - Monster Portrait
0x2e - Monster Palette
0x2f - Monster Graphic[\code]




8005fbf0 - 0x503F0 - Ability Data 2

0x00 - Range
0x01 - Effect Area
0x02 - Vertical
0x03: Flags 1
0x04: Flags 2
0x05: Flags 3
0x06: Flags 4
0x07 - Element
0x08 - Formula
0x09 - X
0x0a - Y
0x0b - Inflict Status
0x0c - CT
0x0d - MP Cost


8005e90c - 0x4F10C - Base Data (12 bytes each, 4 total)
   Order: 0 = Male, 1 = Female, 2 = Ramza, 3 = Monster

0x00 - HP (these * 16384 = Min Raw)
0x01 - MP
0x02 - SP
0x03 - PA
0x04 - MA
0x05 - Helmet
0x06 - Armor
0x07 - Accessory
0x08 - RH Weapon
0x09 - RH Shield
0x0a - LH Weapon
0x0b - LH Shield


rawStats.csv (4 entries - male, female, ramza, monster)
hp, mp, sp, pa, ma

jobs.csv (0x9a entries - squire 0x00 to 0x9a ultima demon)
hpc,hpm,mpc,mpm,spc,spm,pac,pam,mac,mam

0x0d - HP Growth
0x0e - HP Multiplier
0x0f - MP Growth
0x10 - MP Multiplier
0x11 - Speed Growth
0x12 - Speed Multiplier
0x13 - PA Growth
0x14 - PA Multiplier
0x15 - MA Growth
0x16 - MA Multiplier

abilities.csv (0x001 cure to 0x164 parasite)
formula,x,y

0x08 - Formula
0x09 - X
0x0a - Y
12
Help! / How are exit tiles chosen in the Deep Dungeon?
September 06, 2016, 12:57:47 am
The png maps of the Deep Dungeon by jekoln at GameFAQs indicate that each map has 1 exit tile out of 5 possible tiles.  Is this a table, and has anyone located it?  Also what does the event scripting of the DD differ from other maps?
13
The Lounge / How do I use hexchat?
July 23, 2016, 08:51:27 pm
I hate using firefox to access the web client.
14
If possible, I'd like the code tag to not expand horizontally, but i would like it to expand vertically.  By expand, I mean it will not use a scrollbar and will instead take up enough of the webpage as is needed to fit the tagged text.

Because this is really dumb:
http://ffhacktics.com/smf/index.php?topic=11425

Does anyone have an account to ask here:
http://www.simplemachines.org/community/index.php
15
PSX FFT Hacking / this is crap
July 23, 2016, 08:44:23 pm
delete me
16
Help! / Linux alternatives to CD Mage or cdprog?
July 05, 2016, 08:55:14 am
They won't work with every version of wine I installed, and I can't get wine to compile.
18
Also what are the various ways that PS1 games load files into memory?  Is there are built-in function that does that automagically or does it need to know which sector a file is in?

If I move files around in a disc image, will the game still work?

If this is true, then the best way to deal with most games would be to dissect the disc image into files, modify those files, and then reassemble the files into a disc image.
19
I must make a project of my own, and I think I should make either a Steam game or an Android app.  I'd like to make a tactical RPG, but I'm one person and there's only so much I can do.  I'm thinking that procedural generation could be a very good mechanic to reduce the amount of work involved, but I'm not sure what sort of mechanics should be involved.  What tactical RPGs do you recommend I study to find interesting mechanics that are suited to procedural generation?  What are the most basic mechanics a tactical RPG should have?
20
The Lounge / Galaxy Mage, a tactical RPG
June 04, 2016, 08:04:30 pm
http://pygame.org/project-GalaxyMage-163-324.html

GalaxyMage is a free, open-source tactical/strategic RPG for Windows, Linux, and Macintosh, with online multiplayer support. A tactical RPG is a type of role-playing game where turn-based battles are fought on a 3D map. Examples of commercial tactical RPGs include Final Fantasy Tactics, Vandal Hearts, and Disgaea: Hour of Darkness. Our goal is to make GalaxyMage a game that is relatively simple to pick up and play -- you can dive right in without getting bogged down in the details of the battle mechanics -- but to also allow for a lot of character development and customization. We also intend to create a unique, advanced AI system that allows enemy units to work together as a team and employ a wide variety of strategies.

http://pygame.org/shots/163.png
21
Hacking/Patching Tools / Looking for bugs
February 01, 2016, 05:44:05 pm
I and my group mates need to fix bugs for a class.  Are there any programs that have bugs?  Where is the latest source code hosted?
23
PSX FFT Hacking / disassembly of FFT files with labels?
December 11, 2015, 08:56:31 am
There's plenty of good material on the wiki, but it's hard to keep track of it all because it's split across so many pages and there is no use of labels.  Has anyone tried to make a single definitive disassembly of each file, while changing address references to labels?  It could make things much easier to modify in the future.
24
Recruitment / Available for application programming
November 26, 2015, 09:02:06 pm
I wouldn't mind writing a small application for my portfolio.  I'm most proficient with Java, but I've taken classes on C and Python, though I don't remember much of Python and I didn't go very in depth with C.  If anyone is interested please tell me exactly what behavior you want in your application, provide a sketch or image of the GUI if it is a GUI application, and provide any specifications and information about the data you want it to process.
25
I'm curious about how FFTPatcher directly patches a disc image, specifically how it updates the error detection and correction areas when data in a sector is altered.  Does anyone have any technical information on this?

https://github.com/Glain/FFTPatcher/blob/master/PatcherLib/ISOPatching/IsoPatch.cs

This seems useful.  I'm not familiar with C# though so I can't follow it that well.
26
What is known about item attribute data?  I know it can be repointed, but last I checked there were still issues with menus and item previews.  Have new routines related to this been documented?

EDIT

http://ffhacktics.com/wiki/Equipment_Attribute_Setting

0005c67c: 00000000 nop
0005c680: 34420008 ori r2,r2,0x0008 Enable Sword
0005c684: a2220184 sb r2,0x0184(r17) Store new Equipped Flags?
0005c688: 30a300ff andi r3,r5,0x00ff
0005c68c: 340200ff ori r2,r0,0x00ff r2 = ff
0005c690: 10620062 beq r3,r2,0x 0005c81c Branch if nothing is equipped
0005c694: 00031040 sll r2,r3,0x01 ID * 2
0005c698: 00803021 addu r6,r4,r0 r6 = Unit's Data Pointer (Bonus Stats)
0005c69c: 00431021 addu r2,r2,r3 ID * 3
0005c6a0: 00021080 sll r2,r2,0x02 ID * 12
0005c6a4: 3c038006 lui r3,0x8006
0005c6a8: 24632eb8 addiu r3,r3,0x2eb8
0005c6ac: 00434821 addu r9,r2,r3
0005c6b0: 91230007 lbu r3,0x0007(r9) Load Equipment's Item Attributes
0005c6b4: 24880003 addiu r8,r4,0x0003 r8 = Unit's Data Pointer (PA)
0005c6b8: 00031040 sll r2,r3,0x01 ID * 2
0005c6bc: 00431021 addu r2,r2,r3 ID * 3
0005c6c0: 000210c0 sll r2,r2,0x03 ID * 24
0005c6c4: 00431021 addu r2,r2,r3 ID * 25
0005c6c8: 3c038006 lui r3,0x8006
0005c6cc: 246342c4 addiu r3,r3,0x42c4
0005c6d0: 00433821 addu r7,r2,r3 r7 = Item Attribute's Data Location
0005c6d4: 00e02821 addu r5,r7,r0 r5 = Item Attribute's Data Location
0005c6d8: 90a20000 lbu r2,0x0000(r5) Load Item Attribute's Stat
0005c6dc: 90c30000 lbu r3,0x0000(r6) Load Unit's Bonus Stat
0005c6e0: 00000000 nop
0005c6e4: 00431821 addu r3,r2,r3 Bonus Stat + Item Attribute's Stat
0005c6e8: 2c620100 sltiu r2,r3,0x0100
0005c6ec: 14400002 bne r2,r0,0x 0005c6f8 Branch if new Stat < 256
0005c6f0: 24a50001 addiu r5,r5,0x0001 Item Attribute's Data Pointer += 1
0005c6f4: 340300ff ori r3,r0,0x00ff Stat = 255
0005c6f8: a0c30000 sb r3,0x0000(r6) Store new Bonus Stat
0005c6fc: 24c60001 addiu r6,r6,0x0001 Unit's Bonus Stat Pointer += 1
0005c700: 00c8102a slt r2,r6,r8
0005c704: 1440fff4 bne r2,r0,0x 0005c6d8 Branch if all Bonus Stats haven't been checked
27
I've heard they're similar, but I only have experience with Java.
28
I want to study it.
29
FFTA/FFTA2 Hacking / Possible to skip events?
September 22, 2014, 11:30:38 am
I would play this game more if it weren't so slow.  The interstitial scenes - loading battles, changing rounds - are annoying, as are unskippable events and the 35 minute intro.  The slow movement rate and AI decision-making is too.
30
New Project Ideas / Blue Mage Base Patch
September 20, 2014, 05:50:00 am
The goal of this patch is to realign monster PA and MA closer to that of humans.  This requires that I also change the X and Y values of monster abilities to get the damage output of the abilities the modified monsters use to match that of vanilla monsters.

When this is done anyone can add any monster ability to any human job and expect roughly the same amount of damage.

This patch is being built on the base patch found here:
http://ffhacktics.com/smf/index.php?topic=6450
Specifically "StatusItem2.fftpatch".

To calculate damage output of vanilla monster abilities I'm adding a new sheet to Raven's Utilities workbook:
http://ffhacktics.com/smf/index.php?topic=9143

I will attach this sheet with each update I make.

I want this patch because I want to change the minimum and maximum values for SP, PA, and MA to something more reasonable than 1 (min for all three), 50 (max for SP), and 99 (max for PA and MA).  A min of 4 for PA/MA and 6 for SP makes stat breaks less overpowered.  A max of 16 for SP and 21 for PA and MA makes stat boosting abilities less overpowered.  Of course this requires that everyone have higher starting stats and lower growths overall but that is what I intend to do with my own rebalancing patch.  I decided to make a blue mage base patch first using vanilla first because I can reuse it for other patches and because other people may find it useful.

Edit 9/20/2014 5:55 AM

This is more tedious than expected.

Just finished Lvl 10 damage/hit outputs for Chocobo monsters.  Took me about half an hour.  See attached spreadsheet.

When it's done you should be able to change X/Y values for abilities and multiplier/growths for monsters and get the most basic damage/hit previews, assuming I make no mistakes anywhere.