• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
June 19, 2025, 01:56:22 pm

Intro to FFT ASM Hacking?

Started by Darkholme, March 27, 2011, 05:13:07 pm

Darkholme

Hey; I'm new to the community, only been here a couple days, and I've never done ASM hacking before (Though I've written ASM and compiled it before - and had those apps work) - Is there an intro tutorial floating around somewhere for a bit of a hand getting started?

I've been hearing that everyone writes their ASM additions overriding the existing contents of the files (commonly the kanji tables). I'm wondering: Why can't you just append your ASM to the end of the file?
Replace the previous final line with a goto instruction that pushes them to wherever you extended the file to for your new functions, and put your new functions in the section between those? Is there a reason the file needs to stay the same size?

Xifanie

March 27, 2011, 05:19:25 pm #1 Last Edit: March 27, 2011, 05:21:50 pm by Xifanie
Yes, because files are constantly being loaded.... for example BATTLE.BIN is loaded for battles, REQUIRE.OUT at the end of battles, then WORLD.BIN when you return to the world map. They pretty much overlap the same addresses. This isn't a N64 Game. There is no space at the end of the file for you to use. The only file permanently loaded is the EXE; i.e. SCUS_942.21 or whatever. And you can absolutely no add anything at the end of that file before the next sector which the other files load at.

Also, this is my tutorial to ASM Hacking... http://ffhacktics.com/tutorials.php?id=11
It's not perfect as the resulting hack is a failure (since I didn't know how formulas worked), but it proved to be a viable introduction.
  • Modding version: PSX
Love what you're seeing? https://supportus.ffhacktics.com/ 💜 it's really appreciated

Anything is possible as long as it is within the hardware's limits. (ie. disc space, RAM, Video RAM, processor, etc.)
<R999> My target market is not FFT mod players
<Raijinili> remember that? it was awful

Darkholme

March 27, 2011, 05:23:39 pm #2 Last Edit: March 27, 2011, 05:29:32 pm by Darkholme
Okay I get that it's loading the different files; not quite so clear on why you can't append another 100kb or whatever to the end of BATTLE.BIN; for example.

As to the first part of my question: Is there an intro hacking tutorial? I don't need it to teach me ASM, just the FFT and Hacking portions of things.

[Edit] You added a tutorial while I was writing this. :P

Ah. There we go. How much of this applies with the PSP version of the game? Do any of those tools besides FFTPatcher work with WotL?

Xifanie

March 27, 2011, 05:33:34 pm #3 Last Edit: March 27, 2011, 05:34:03 pm by Xifanie
let's say BATTLE.BIN is loaded at 0x80067000 and the map data at 0x80138000.
BATTLE.BIN would originally take 0xD1000 bytes. Meaning if you add 100kb, that part would be crushed by the map data when it is loaded. EVEN if the map data were to be loaded before, all you'd get would be a nice emulator crash. Space in memory is allocated in a very specific way. Changing that would require Reverse-engineering the game, or getting our hands on the source code. Either simply won't happen. I wish though.

I have no knowlegde about PSP hacking.
  • Modding version: PSX
Love what you're seeing? https://supportus.ffhacktics.com/ 💜 it's really appreciated

Anything is possible as long as it is within the hardware's limits. (ie. disc space, RAM, Video RAM, processor, etc.)
<R999> My target market is not FFT mod players
<Raijinili> remember that? it was awful

Darkholme

Ah. it loads the entire file into memory at once. Or loads multiple entire files into memory at once. I had figured it would load a small chunk and then scroll through the file as needed.
Okay; that makes sense.

Clearly I'm used to higher level languages handling my memory allocation for me. heh.

Hacking the PSP version isn't done the same way then (with slightly differing addresses) I take it.

Thanks for the info. :)