Golden Sun Hacking Community
April 22, 2019, 06:46:41 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
  Home   Forum   DC Wiki Help Search Calendar Downloads Login Register  
Pages: 1 [2]   Go Down
  Print  
Author Topic: Compression Formats  (Read 8079 times)
0 Members and 1 Guest are viewing this topic.
Fox
Fox McCloud, the Hacking Doctor
Mercury Clan

Prodigy
*

Coins: 0
Offline Offline

I am: certainly not a Gallant!
Clan Position: Head Gallant
Posts: 2444

« Reply #15 on: November 16, 2015, 02:49:45 AM »

Well, it didn't fully support Text Compression, as Atrius's editor never rewrote the Char tables... It also didn't decompress battle backgrounds... etc. But the point was that it did support decompressoin/compression for some things...

I think most images are in three/four sections.
1.) The sprites tble: (0x08300000 in GS2)
2.) The Master File Table.. (0x08320000 in GS1, 0x08680000 in GS2; Yep, I have both of them memorized.)
3.) One of the code files has compressed icons.
4.) Oh, and there might be some things compressed in another code file files. (Like the palette menu graphics, I think..) but other than that, I think most graphics in those files are uncompressed(?) - Not many uncompressed images, though... but the red crystal grpahic (for convos), and that pink/purple conical selection thing used to select an enemy maybe.. some |> arrows used in debug menus....  etc. That kind of thing.)
« Last Edit: November 16, 2015, 03:01:22 AM by Fox » Logged

Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Remember kids! Before you go on that interview, remember to wash your hands in teawater! *Coughs on hand* (Excuse me, I just coughed up a little teawater, so they're still clean!) You wouldn't want that hiring manager to be unimpressed.

May the force be with you!
Shoo! Why does it smell in here?
Maybe that's the wrong kind of force. *smirk*
View Profile
approxies
Guest
« Reply #16 on: November 16, 2015, 06:39:09 PM »

OK, thanks for getting me inputs, I will investigate further. I guess, pointer for the chunk of graphics, I'm going to translate (GO and 1st match glyphs in arena) is hardcoded.
Logged
approxies
Guest
« Reply #17 on: February 11, 2016, 05:06:33 PM »

An update for my set of compression tools of Golden Sun.
Now it supports decoding/encoding for text, and two LZSS schemes for graphics, described in OP post.
Logged

Novice Member
*

Coins: 0
Offline Offline

Posts: 13

« Reply #18 on: March 10, 2016, 12:51:56 PM »

Hi approxies, Fox and Lord Squirtle, I am currently looking for a way to encode my Polish translation of The Lost Age in a different way than using Atrius' Editor, as it makes the output file much bigger and is now incompatible with The Balance Age  Sweat Drop
Needles to say that this thread caught my interest. Approxies, would you mind making a little tutorial to your compression tools for a non-programmer? I've played around with the tools a little bit, but can't really get them to work.
The haskell one returns "Could not find module 'Data.Bitstream.Lazy' (I just installed the GHC compiler).
Recommended translation scheme from the earlier version with .bat files works fine until the encoding (-e) part, where it shows "trees: Patch size is larger than specified. Aborted." I guess it is because my translation is larger than the original file (duh), so do I need to specify a new treeSize, Offset? How do I calculate this? :)
Here is the script, if you want to take a look.
Logged
View Profile

I need saves to test encounters in GS Reloaded!

Excellent Member
****

Coins: 0
Offline Offline

Gender: Male
Posts: 832

« Reply #19 on: March 10, 2016, 01:16:28 PM »

I'm not sure about it, but i think you can tweak gstlatoolkit itself and make it store the script later into the rom . that way you'd also gain back the compatibility with my patch.
Logged
View Profile

Novice Member
*

Coins: 0
Offline Offline

Posts: 13

« Reply #20 on: March 10, 2016, 04:42:51 PM »

I don't really know how to do that. I mean, I know where to look, but I don't know the right values to use. The patching file in gstlatoolkit looks like this:

Spoiler for Hidden:
Quote
echo Expanding ROM
patch x tla_patched.gba $01800000

echo Assembling decompress.asm
goldroad asm\decompress.asm

echo Assembling setArgumentsTLA.asm
goldroad asm\setArgumentsTLA.asm

echo Inserting decompress.asm
patch i tla_patched.gba asm\decompress.gba $0003843C

echo Inserting setArgumentsTLA.asm
patch i tla_patched.gba asm\setArgumentsTLA.gba $00038580

echo Inserting string offset table
patch i tla_patched.gba bin\offsets.bin $00FA0000

echo Inserting strings
patch i tla_patched.gba bin\strings.bin $00FAC300
Logged
View Profile
Fox
Fox McCloud, the Hacking Doctor
Mercury Clan

Prodigy
*

Coins: 0
Offline Offline

I am: certainly not a Gallant!
Clan Position: Head Gallant
Posts: 2444

« Reply #21 on: March 10, 2016, 06:00:56 PM »

Whether you choose to compress or not is up to you... Frankly, I don't think it matters unless you need the space. (Probably don't.)

I did not look at how Approxies puts the data back into the ROM... But my compressor compresses it to 0x00FA0000.... and it looks the addresses in your spoiler (gstlatoolkit) places it there too... Soo...

Quote
echo Inserting string offset table
patch i tla_patched.gba bin\offsets.bin $00FA0000

echo Inserting strings
patch i tla_patched.gba bin\strings.bin $00FAC300

With the game open in VisualBoyAdvance, you can go to Tools>Memory Viewer... in the address field... The Rom section goes from 0x08000000-0x09FFFFFF, it should match what you see when you open the file in a hex editor. So you just put 0x08FA0000 in the address field, press Go... scroll down until you find what looks like 00 data... That is unused/free data... and is the address you want to put in. (And +0xC300 for the next address.) (Assuming you're editing a hack, I recommend overwriting the text data that has already been pointed in the area if it is there. It should be easy to notice in The Balance Age since the text should be uncompressed, but I didn't check that for myself, if anything unlikely should go wrong.)

You might need to edit the same addresses in the asm files as well. (So that the game knows that the data moved.)


^^ Wrote this without checking.... but I did look into gstoolkit a long time ago, so....
« Last Edit: March 10, 2016, 06:17:31 PM by Fox » Logged

Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Remember kids! Before you go on that interview, remember to wash your hands in teawater! *Coughs on hand* (Excuse me, I just coughed up a little teawater, so they're still clean!) You wouldn't want that hiring manager to be unimpressed.

May the force be with you!
Shoo! Why does it smell in here?
Maybe that's the wrong kind of force. *smirk*
View Profile

I need saves to test encounters in GS Reloaded!

Excellent Member
****

Coins: 0
Offline Offline

Gender: Male
Posts: 832

« Reply #22 on: March 10, 2016, 06:24:58 PM »

Try this: open go_TLA.bat with a txt editor and change "$00FA0000" to "$01000000" and "$00FAC300" to "$0100C300" then go into the asm folder, open setArgumentsTLA.asm in the same txt editor, and change at lines 57 and 58:
"r2,=0x08FA0000" to "r2,=0x09000000" and
"r3,=0x08FAC300" to "r3,=0x0900C300"

Save both edited files and paste your translation on a clean ROM (clean as in "not already patched with gstlatoolkit).

This way you save the uncompressed text at 01000000, which is where the original ROM ends. Basically, this way the toolkit can't overlap with anything and it'd be compatible with literally every patch you can find on this forum.

EDIT: @Fox actually in my patches the text is still compressed, I made all the changes with the editor.
« Last Edit: March 11, 2016, 07:03:53 PM by Caledor » Logged
View Profile

Novice Member
*

Coins: 0
Offline Offline

Posts: 13

« Reply #23 on: March 11, 2016, 09:01:16 PM »

Thanks guys, looks like saving the text at 01000000 gets rid of all compatibility problems  Happy
Logged
View Profile
Pages: 1 [2]   Go Up
  Print  
 
Jump to:  

Cbox
April 18, 2019, 01:18:08 AM
Fox: Thinking.... meme topics.....    Isaac: Stop calling me a sack! Also, don't call me sick either!
April 03, 2019, 08:24:45 PM
Fox: Really don't see the point in the Crystal or even the crown conversation, but whatever... (I mean, if you want to do it, then just do it. - Doesn't need to be at GSHC, because there are no longer clan leaders at GSHC.)
April 03, 2019, 03:59:33 AM
squizzy44: We all need to band together to take down Crystal.
April 02, 2019, 12:00:09 AM
Fox: Your clan?  You can't edit it manually, so you have to tell an admin so they can do it. There's actually a topic for when you pick a clan... but uhh... I've no idea if an admin will see it via that, though. (Kain will certainly see id you ping him on GSHC Discord.)
April 01, 2019, 05:28:42 PM
squizzy44: How do I change my position on my profile? I haven't used the site in nearly 10 years...
March 31, 2019, 10:10:15 PM
Fox: I still wonder if a Tret glitch for speedrunning exists... I don't think I looked into if the PC was on one of the other layers. (Which basically the second layer edits @-0x200 instead of @-0x100... in the event you are going up (y-axis) out of bounds.) Hm.
March 31, 2019, 06:18:43 PM
Fox: Not me.
March 31, 2019, 02:59:38 PM
Salanewt: I don't know of any, although if there were then we'd have to send it as a patch file. I think someone is working on it at least!
March 29, 2019, 07:51:48 PM
MaxiPower: no such thing exists
March 26, 2019, 03:38:42 AM
reeZ931: I would really appreciate it 
March 26, 2019, 02:39:38 AM
reeZ931: Anyone have a golden sun rom where you can play as saturos and menardi properly? 
March 25, 2019, 09:31:15 PM
Fox: It would explain why everyone leaves so quickly after taking our bananas.
March 24, 2019, 10:36:10 PM
Fox: Wouldn't bananas increase agility the more you have? Like... Diddy Kong Racing reference.
March 22, 2019, 11:19:11 PM
Average Wind Seer: Banana: Restores 50PP to user. Restores 40PP to Isaac if Jenna uses this item.
March 22, 2019, 09:57:53 PM
Salanewt: Lol. I mean, I am thinking of adding a banana item to GS so...
March 22, 2019, 09:48:42 PM
Fox: Ooh! Sala's back!  I think he wants a banana.  All this banana talk must have attracted him.
March 22, 2019, 08:56:52 PM
Fox: :O I just notice I have no Coins to buy bananas with! (You know, the coins feature this forum has.)
March 04, 2019, 08:45:44 PM
Fox: Aw.  I kind of want to suggest dressing up in a banana costume.  No wait, that's a bad idea.
March 04, 2019, 04:24:10 AM
Average Wind Seer: *angry gorilla noises that roughly translates to "Stay the [redacted] off my island and don't touch my [redacted] bananas"*
March 04, 2019, 03:06:07 AM
Fox: Gosh. This is like playing whack-a-mole! What's taking you so long with the bananas?! :D

Affiliates
Temple of Kraden Golden Sunrise
Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.107 seconds with 23 queries.