+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  Fonts compressed? (SNES Silva saga 2 and GD Leen)
Pages: [1] 2
Author Topic: Fonts compressed? (SNES Silva saga 2 and GD Leen)  (Read 2 times)
aishsha
Guest
« on: September 07, 2008, 03:53:43 am »

Well, that's my first try to look at SNES games after some NES translations and already stuck Smiley
Has anybody looked onto those two games listed above? I just can't find the fonts stored there in any formats. For Silva Saga 2 I do see some PARTS of gliphs but not sure whether they are actually complete...
Gideon Zhi
Guest
« Reply #1 on: September 07, 2008, 07:11:22 am »

Pretty much everything in GDLeen is compressed.
Bongo`
Guest
« Reply #2 on: September 07, 2008, 09:42:13 am »

  Yeah they are pretty much compressed.  Silva Saga 2 is pretty nasty to work with. Also compressed. GDleen, as I remember, as being worked on by the above gent but I am not sure anymore. I may still source code and ASM notes to both of those games...
aishsha
Guest
« Reply #3 on: September 07, 2008, 11:38:40 am »

Thanks for clarifying... Pretty lame though - I was hoping to finish all Seta games...
A ain't THAT good in ASM to decompress them at this stage but if anyone of you wants to continue those 2 projects - I'd be glad to help - my Silva Saga for NES is 99% done and Minelvaton project is on the move so I know the lexics, style and system of those games pretty well.
« Last Edit: September 07, 2008, 11:46:22 am by aishsha »
RedComet
Guest
« Reply #4 on: September 07, 2008, 05:33:49 pm »

Quote from: aishsha on September 07, 2008, 11:38:40 am
A ain't THAT good in ASM to decompress them at this stage

Cracking a compression scheme (unless it's completely batshit) isn't really that difficult to do. I don't see why people think cracking compression is something that only the gods and Gideon are capable of doing. Seriously, give it a shot. You'll probably surprise yourself. Smiley
Ryusui
Guest
« Reply #5 on: September 07, 2008, 06:01:02 pm »

Quote from: RedComet on September 07, 2008, 05:33:49 pm
Quote from: aishsha on September 07, 2008, 11:38:40 am
A ain't THAT good in ASM to decompress them at this stage

Cracking a compression scheme (unless it's completely batshit) isn't really that difficult to do. I don't see why people think cracking compression is something that only the gods and Gideon are capable of doing. Seriously, give it a shot. You'll probably surprise yourself. Smiley

Does that make me a god? XD

Seriously, though: as long as you have some basic hardware knowledge and enough ASM knowledge (or intuition) to grasp what's going on, decompression is a snap. Just find where the uncompressed data is being written to (make a savestate and load it in VSNES), set a breakpoint for that location and you'll snag the decompressor by its tail end. Then trace through, maybe get some disassembly to see the bigger picture, and reproduce the routine in your favorite programming language. Then you have two options: either create an equivalent recompressor (this part is hard, since unlike decompression, the game is under no obligation to provide you with convenient blueprints), or as Gideon would say, break the compression's knees with some ASM hacking (you can do this with maybe five or so lines of code) and reinsert the data uncompressed.
« Last Edit: September 07, 2008, 06:06:58 pm by Ryusui »
aishsha
Guest
« Reply #6 on: September 07, 2008, 06:13:03 pm »

Thanks for the advices, guys - I'm sure I'll try, 'cause I do not usually drop projects on half a way - but I ain't that of a programmer so things like that go in a pretty err... retarded way for me Smiley So I hoped not to discover this kinda stop in the first SNES game I've ever looked into Smiley
But again, thanks for the help - at least I know where and with what to look Wink
RedComet
Guest
« Reply #7 on: September 07, 2008, 06:14:20 pm »

Ugh. Writing a recompressor is evil work. Only Satan can do it and produce a program that actually compresses instead of inflating the size of the data.
Bongo`
Guest
« Reply #8 on: September 07, 2008, 06:18:18 pm »

Quote from: Ryusui on September 07, 2008, 06:01:02 pm
Quote from: RedComet on September 07, 2008, 05:33:49 pm
Quote from: aishsha on September 07, 2008, 11:38:40 am
A ain't THAT good in ASM to decompress them at this stage

Cracking a compression scheme (unless it's completely batshit) isn't really that difficult to do. I don't see why people think cracking compression is something that only the gods and Gideon are capable of doing. Seriously, give it a shot. You'll probably surprise yourself. Smiley

Does that make me a god? XD

Seriously, though: as long as you have some basic hardware knowledge and enough ASM knowledge (or intuition) to grasp what's going on, decompression is a snap. Just find where the uncompressed data is being written to (make a savestate and load it in VSNES), set a breakpoint for that location and you'll snag the decompressor by its tail end. Then trace through, maybe get some disassembly to see the bigger picture, and reproduce the routine in your favorite programming language. Then you have two options: either create an equivalent recompressor (this part is hard, since unlike decompression, the game is under no obligation to provide you with convenient blueprints), or as Gideon would say, break the compression's knees with some ASM hacking (you can do this with maybe five or so lines of code) and reinsert the data uncompressed.


  Compression is easy... Well, it can be once you know the basics. If you can learn ASM you will have
an easier time firguring out the procedures. For example, I have decompressed / recompressed over 60+ games
and they all are just about similar in code. So it's not a great task. You just have to be willing to learn enough.
Bongo`
Guest
« Reply #9 on: September 07, 2008, 06:21:58 pm »

Quote from: RedComet on September 07, 2008, 06:14:20 pm
Ugh. Writing a recompressor is evil work. Only Satan can do it and produce a program that actually compresses instead of inflating the size of the data.


 I'm not satan!!! I've actually wrote utils that recompressed the same data BETTER! I thought is was
broken code until I decompresed what I recompressed both in game and my util. Smiley
Ryusui
Guest
« Reply #10 on: September 07, 2008, 06:33:30 pm »

It's random. Sometimes it seems you need some black magic to get that damn data to cram back down to its original size, but then you turn around and another chunk of data using the same routine compresses even better.

It pays to find a working compression routine and retool it into something compatible, which is easier than it sounds. LZ is the lingua franca of compression routines; you'll rarely see the same routine used twice (unless it's a BIOS function), but they all do basically the same thing in similar ways.
aishsha
Guest
« Reply #11 on: September 07, 2008, 06:37:04 pm »

I AM among the demons... :'(
BTW, a little question - if I am able to decompress, will I be able actually to insert my own font instead of the existing one and in what way?
« Last Edit: September 07, 2008, 06:43:33 pm by aishsha »
Bongo`
Guest
« Reply #12 on: September 07, 2008, 06:50:10 pm »

Quote from: aishsha on September 07, 2008, 06:37:04 pm
I AM among the demons... :'(
BTW, a little question - if I am able to decompress, will I be able actually to insert my own font instead of the existing one and in what way?

  Yes you will be able to insert whatever data you want as long as it can fit in the space used by the original
data. Sometimes you can redirect the code to a new location with more space. I have no problem with those who code a routine to "avoid" reusing the compression but I don't like to store uncompressed data and use trickery. That feels a little "botch" to me.  Embarrassed
Ryusui
Guest
« Reply #13 on: September 07, 2008, 06:52:22 pm »

I already told you. You have two options.

1. Rig up an equivalent recompressor. This is harder than decompression, since the game doesn't provide a recompressor for you to plagiarize as you see fit, but it's not impossible. It helps if you start with someone else's working compression code and tweak it to suit your needs.

2. Break the compression's kneecaps. Just replace the compression routine with a simple loop that reads uncompressed data from the ROM.

#2 is easier but assumes you have room in the ROM where you can insert the uncompressed data. In either event, either you compress your new font and insert it into the ROM in place of the old one, or you insert the uncompressed font into the ROM and have your new routine load it straight.
aishsha
Guest
« Reply #14 on: September 07, 2008, 07:00:04 pm »

Quote
Yes you will be able to insert whatever data you want as long as it can fit in the space used by the original
data.
Question omitted - Ryusui already told what I wanted to hear Smiley
Pages: [1] 2  


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