• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
March 28, 2024, 03:11:43 pm

News:

Don't be hasty to start your own mod; all our FFT modding projects are greatly understaffed! Find out how you can help in the Recruitment section or our Discord!


How does the game access auxilary files?

Started by Choto, February 03, 2012, 05:43:29 pm

Choto

This is one topic I haven't been able to find any kind of info about.

Battle.bin and SCUS are accessed during battle right? How does the game load or initialize other files like effect files? The graphics for the battle menus, status effects, etc. are contained in Frame.bin, so wouldn't they have to be accessed as well? Do these files hold addresses in RAM like SCUS and Battle.bin?


Glain

SCUS, yes, that's the main program and always loaded. I'm actually not sure how it loads/unloads the other files. The big one is swapping BATTLE.BIN and WORLD.BIN and I can't find text strings of either one of those filenames in SCUS (so how does it know the filename of which one to load?)
  • Modding version: Other/Unknown

RandMuadDib

since files can't take up the exact same physical space on the disc, they have to be in a certain order, right? perhaps the game knows exactly where each file is supposed to start and just looks for that position on the disc instead of a filename?
I will show you the power of SARDIIIIINES!!!!

Pickle Girl Fanboy

Are there a bunch of pointers at the beginning of battle.bin and world.bin, which point to different areas of their respective files?

I ask because maybe scus doesn't call those files themselves, but instead references parts of those files according to whatever those parts are called in their own file.

Like, if the part of battle.bin that holds formulas in battle.bin is called foo1 within battle.bin, then maybe scus just looks for foo1 (this assumes that there is nothing else called foo1 inside any other file).  And then when it needs another part of battle.bin, then it looks for foo2, or foo3, or foo78, or whatever.

Bosola

The PSOne doesn't use filenames to access file resources. Any filenames in an ISO are artefacts of the compilation process - in fact, later PSOne games typically strip the filenames out completely. FFIX, for instance, turns all data into a single binary blob and flags it as a directory. No filenames there.

No, the PSOne seeks data with raw LBA+Size values. The LBA is usually stored in little-endian format (so LBA 0x123456 will be stored as 0x56 0x34 0x12). You should be able to grab the LBAs of your files easily with a tool like CDMage.

Bear in mind that if any component of the executable is compressed (I don't know the FFT binary), you may need to uncompress those sections to find the lookups. In FFVII, compressed segments are just subject to typical Gzip compression, so I'd expect something similar for Final Fantasy Tactics.

Pickle Girl Fanboy

Left: Just standing here, watching the forum, hitting F5.
Right: See the name Bosola.


See the name yojimbo_beta:

Bosola

Yes, it is I. FFVII and Rebirth aren't the only things I work on!