Zophar's Message Domain

Go Back   Zophar's Message Domain > Emulation Talk > Rom Hack

Reply
 
Thread Tools Display Modes
Old 11-28-2004, 03:50 AM   #1
Ugly Joe
Senior Member
 
Ugly Joe's Avatar
 
Join Date: Dec 2003
Posts: 1,461
Default Relative Searching / Compression in GBA Roms

Okay, I've hacked a few NES roms for translation. It's easy, since I can just relative search and make a table, yada yada yada. GBA roms, I haven't had any luck with relative searching. I'm figuring this is because the font isn't as simple as in NES roms (big and small kana, actual characters for dakuon and handakuon, etc). So, I figure I have to find the actual font in the rom and then use that to relative search. This I have done. Sorta. I found where the font graphics are located in the rom, but I can't seem to make sense of it no matter how I view it in Tile Molester. If I erase some of the graphics there and then load up the rom, characters are missing from the dialog (just blank spaces between characters). I tried swi logging but couldn't find any LZ77UnCompWram or LZ77UnCompVram calls that were relevant (just LZ77UnCompWram calls for the background images).

So, that's what I have. I know where the font is in the rom, but I can't find a way to view in order to proceed with relative searching. Any suggestions?

<P ID="signature"></P>
__________________
Ugly Joe is offline   Reply With Quote
Old 11-28-2004, 06:03 AM   #2
Gideon Zhi
Senior Member
 
Join Date: Jul 1999
Posts: 499
Default Re: Relative Searching / Compression in GBA Roms

I'll admit, some of the terms you've used have already gone way over my head, but there are a few GBA games I'm interested in digging my claws into. Any chance you could provide some links to relevant literature for my perusal?

<P ID="signature"><hr><center>http://agtp.romhack.net<img src=http://agtp.romhack.net/linkage.gif></a>
Aeon Genesis ~ Aiyah! Thank you for the always and always.</center></P>
Gideon Zhi is offline   Reply With Quote
Old 11-28-2004, 06:14 AM   #3
Ugly Joe
Senior Member
 
Ugly Joe's Avatar
 
Join Date: Dec 2003
Posts: 1,461
Default Re: Relative Searching / Compression in GBA Roms

> I'll admit, some of the terms you've used have already gone
> way over my head, but there are a few GBA games I'm
> interested in digging my claws into. Any chance you could
> provide some links to relevant literature for my perusal?

I've had a hard time finding practical GBA rom hacking stuffs. There's a bunch of stuff for developing GBA games, so you can look over that and sorta work backwards. Also, try browsing through romhacking.com's forums.

About the "over your head" terms...did you mean the LZ77 stuff? If you did, the GBA has some built in functions (or something along those lines) to do LZ77 decompression. You can log the activity of the rom in VisualBoyAdvance and look for calls to those functions. When it works, it works great, since it gets passed the starting location of the compressed graphics, making it really easy to find out exactly where in the rom the graphics are located. There are probably tools to decompress the graphics from that point (or you could just write your own).

<P ID="signature"></P>
__________________
Ugly Joe is offline   Reply With Quote
Old 11-28-2004, 06:18 AM   #4
Gideon Zhi
Senior Member
 
Join Date: Jul 1999
Posts: 499
Default Re: Relative Searching / Compression in GBA Roms

> You can log the activity of the rom in VisualBoyAdvance and look for calls to those functions.

This is exactly what I was looking for Time to take a whack at a couple of these, let's hope Enix and Sting are playing nice!

<P ID="signature"><hr><center>http://agtp.romhack.net<img src=http://agtp.romhack.net/linkage.gif></a>
Aeon Genesis ~ Aiyah! Thank you for the always and always.</center></P>
Gideon Zhi is offline   Reply With Quote
Old 11-28-2004, 06:31 AM   #5
Ugly Joe
Senior Member
 
Ugly Joe's Avatar
 
Join Date: Dec 2003
Posts: 1,461
Default Re: Relative Searching / Compression in GBA Roms

> This is exactly what I was looking for Time to take a
> whack at a couple of these, let's hope Enix and Sting are
> playing nice!

Make sure you get the Developers version. The logging doesn't work on the regular version (even though the option is still there).

<P ID="signature"></P>
__________________
Ugly Joe is offline   Reply With Quote
Old 11-28-2004, 06:43 AM   #6
Gideon Zhi
Senior Member
 
Join Date: Jul 1999
Posts: 499
Default Re: Relative Searching / Compression in GBA Roms

> Make sure you get the Developers version. The logging
> doesn't work on the regular version (even though the option
> is still there).

Bloody hell, I was WONDERING why it wasn't doing anything! Hahah, thanks! *grin*

<P ID="signature"><hr><center>http://agtp.romhack.net<img src=http://agtp.romhack.net/linkage.gif></a>
Aeon Genesis ~ Aiyah! Thank you for the always and always.</center></P>
Gideon Zhi is offline   Reply With Quote
Old 11-30-2004, 06:13 AM   #7
Ugly Joe
Senior Member
 
Ugly Joe's Avatar
 
Join Date: Dec 2003
Posts: 1,461
Default Re: Relative Searching / Compression in GBA Roms

> So, that's what I have. I know where the font is in the
> rom, but I can't find a way to view in order to proceed with
> relative searching. Any suggestions?

Yes. Persistence!

The font wasn't compressed at all, just stored in a weird way (16x13, which, afaik, no tile editor handles at all). I managed to decipher a letter, look it up in a hex editor, and figure it out from there. I got Feidian to dump it the text out to a bitmap, and now I can relative search (with some success).

What's cool (though it threw me off for a while) is that the font is stored as 1bpp, and there's some routine in the rom that makes it into 4bpp.

If I can manage to make a table out of this, I might make a small tutorial (since the GBA hacking documents seem to be oddly missing).

<P ID="signature"></P>
__________________
Ugly Joe is offline   Reply With Quote
Old 11-30-2004, 06:53 AM   #8
Gideon Zhi
Senior Member
 
Join Date: Jul 1999
Posts: 499
Default Re: Relative Searching / Compression in GBA Roms

Might I ask what you're working on? I've had good success with one of the games I'm working on, turns out the font's just in some crazyass order, but I'm having very little with the other. Heh, now if I can find someone to translate a couple of these strings, I can take some screenshots and parade 'em around the 'net ;D

<P ID="signature"><hr><center>http://agtp.romhack.net<img src=http://agtp.romhack.net/linkage.gif></a>
Aeon Genesis ~ Aiyah! Thank you for the always and always.</center></P>
Gideon Zhi is offline   Reply With Quote
Old 11-30-2004, 12:15 PM   #9
CROcOp
Senior Member
 
Join Date: Sep 2004
Posts: 196
Default Re: Relative Searching / Compression in GBA Roms


I always use relative search and it works for GBA games, too.
But I did not try it on japanese gba games...

<P ID="signature"></P><P ID="edit"><FONT class="small">Edited by CROcOp on 11/30/04 07:16 AM.</FONT></P>
CROcOp is offline   Reply With Quote
Old 11-30-2004, 06:59 PM   #10
Ugly Joe
Senior Member
 
Ugly Joe's Avatar
 
Join Date: Dec 2003
Posts: 1,461
Default Re: Relative Searching / Compression in GBA Roms

Wow. It was Shift-JIS the whole time. The script itself is encoded in Shift-JIS. I can just open parts of the rom in FireFox and view the script. I wonder how many Japanese GBA games do this?

<P ID="signature"></P>
__________________
Ugly Joe is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:47 AM.

Contact Us - Zophar's Domain - Archive - Top

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.