+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  Can i use Golden sun 's decompression with FFV?
Pages: [1]
Author Topic: Can i use Golden sun 's decompression with FFV?  (Read 929 times)
kenghot
Guest
« on: November 12, 2006, 10:54:29 am »

After i spend a week to hack ffv japan (this is my first time to hack GBA) . I've found that ffv is a compression rom (LZ77). and i found document by LabMaster about decompress method for golden sun . http://www.romhacking.net/docs/golden_sun_text.txt , that's a good idea to replace decompress routine with normal text routine . so i'd like to know that , can i use this method with ffv ? and how can i know where the offset of decompress routine in ROM?

best regards,
Kenghot

ps. I need to translate ffv from japan version. because my language (Thai) has more than 256 fonts.
Ryusui
Guest
« Reply #1 on: November 12, 2006, 02:16:19 pm »

GBA compression is handled one of two ways.

1. Hardware decompression, using the GBA's own built-in LZ decompressor.

2. Software decompression, using an ad-hoc proprietary method.

Option 1 is naturally the easy way, since the GBA's compression methods are probably all well-documented. The actual decompression part might take a little effort to find, though: it loads certain registers with the necessary values and then makes an SWI call.

Option 2 is a little harder, since you'll need some basic programming knowledge to figure out how the compression does what it does.

Whichever method you choose, you will have to deal with the compression somehow to get at the original script. Writing a decompressor is easy once you have the ASM equivalent in your hand. Writing a recompressor, however, is hard. I mean, anyone can make a sausage machine, but it's some trick to make one where you can turn the sausage back into the pig afterwards. ^_^;

Your best weapon for GBA hacking, IMHO, is VBA-SDL-H. It's a GBA emu with crappy sound and a killer debugger. Problem is, the debugger is command-line based, so you might have problems if you're uncomfortable working with a DOS prompt or the like. You can use VBA-SDL-H to watch when the game loads compressed data from the ROM, and trace it to see what the game does to the data afterwards. That's how you hunt down your decompression routine. (Of course, you'll need to know where the compressed data is stored in the ROM, which is its own special sidequest...^_^;)
KaioShin
Guest
« Reply #2 on: November 12, 2006, 02:31:14 pm »

Quote from: Ryusui on November 12, 2006, 02:16:19 pm

Your best weapon for GBA hacking, IMHO, is VBA-SDL-H.

no$GBA FTW! It's unbeatable in terms of comfort and usability. But it's not free, so it's not an option for most  Roll Eyes
kenghot
Guest
« Reply #3 on: November 13, 2006, 11:58:47 pm »

Ok, Now i strat to debug ffv . Now i use Tracer-vgba to trace command in gba and i got some trace.log. Could some body tell me what is the command of arm7 that perform which button that user press? and how do i know that's 'A' button.
MegaManJuno
Guest
« Reply #4 on: November 14, 2006, 03:02:39 am »

Just thought I'd note that there's quite a few GBA docs here that might help you track it down, in case you haven't been there yet.
kenghot
Guest
« Reply #5 on: November 14, 2006, 05:32:25 am »

i've read read and read. But still struck . I'll keep trying.
Now, i've relized that knowlage from nds hacking doen't help me to hack gba anymore .  Cry
« Last Edit: November 14, 2006, 05:42:43 am by kenghot »
KaioShin
Guest
« Reply #6 on: November 14, 2006, 06:45:13 am »

Quote from: kenghot on November 14, 2006, 05:32:25 am
i've read read and read. But still struck . I'll keep trying.
Now, i've relized that knowlage from nds hacking doen't help me to hack gba anymore .  Cry

There is no command which handles button presses. You have to look for information on interrupts and special function registers. Maybe you should try a general ASM tutorial before you get into GBA specifics. I'm sure there must be something in your native language, that will help you a lot.
kenghot
Guest
« Reply #7 on: November 18, 2006, 08:44:10 am »

after i read documents, i found that gba has bios function to decompress data for LZ77, the command is "swi $11" . so i use program "Visualboy Advance Tracer" to keep log of asm command. but when i search in log file (it's about 100,00 lines) i just found only one line of "swi $11". Did i do something wrong?

another question, Can i dump vram or wram and then search for dialog text such as "Hell" in dump file.

Thanks
Gemini
Guest
« Reply #8 on: November 18, 2006, 09:27:39 am »

The only thing compressed in FF5 Advance is graphics from what I can remember. Main dialogues should be uncompressed, like in any previous FF Advance title.
kenghot
Guest
« Reply #9 on: November 18, 2006, 09:35:28 am »

Quote from: Gemini on November 18, 2006, 09:27:39 am
The only thing compressed in FF5 Advance is graphics from what I can remember. Main dialogues should be uncompressed, like in any previous FF Advance title.
Really ? so , can i use hex editor to search text or dialogues in this file?
Gemini
Guest
« Reply #10 on: November 18, 2006, 09:46:35 am »

Quote from: kenghot on November 18, 2006, 09:35:28 am
so , can i use hex editor to search text or dialogues in this file?
You can do that even when dialogues are compressed.
kenghot
Guest
« Reply #11 on: November 18, 2006, 10:01:06 am »

Quote from: Gemini on November 18, 2006, 09:46:35 am
Quote from: kenghot on November 18, 2006, 09:35:28 am
so , can i use hex editor to search text or dialogues in this file?
You can do that even when dialogues are compressed.
How can i seach dialogues when it was compressed?
RedComet
Guest
« Reply #12 on: November 19, 2006, 02:15:21 pm »

Quote from: KaioShin on November 12, 2006, 02:31:14 pm
Quote from: Ryusui on November 12, 2006, 02:16:19 pm

Your best weapon for GBA hacking, IMHO, is VBA-SDL-H.

no$GBA FTW! It's unbeatable in terms of comfort and usability. But it's not free, so it's not an option for most  Roll Eyes

Which version do you have? I'm considering purchasing a copy for some future GBA projects since VBA-SDL-H annoys me.
KaioShin
Guest
« Reply #13 on: November 19, 2006, 02:21:54 pm »

Quote from: RedComet on November 19, 2006, 02:15:21 pm
Quote from: KaioShin on November 12, 2006, 02:31:14 pm
Quote from: Ryusui on November 12, 2006, 02:16:19 pm

Your best weapon for GBA hacking, IMHO, is VBA-SDL-H.

no$GBA FTW! It's unbeatable in terms of comfort and usability. But it's not free, so it's not an option for most  Roll Eyes

Which version do you have? I'm considering purchasing a copy for some future GBA projects since VBA-SDL-H annoys me.

You can download the latest version any time for one year. You don't have to buy further upgrades for every new version which is very nice. The GBA part is pretty much bug free anyway, recent upgrades were all for DS emulation.
Pages: [1]  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC