Golden Sun Hacking Community
October 23, 2017, 10:01:03 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 4320 times)
0 Members and 1 Guest are viewing this topic.
Fox
Fox McCloud, the Hacking Doctor
Mercury Clan

Prodigy
*

Coins: 28
Offline Offline

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

« 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...
*Cross my fingers and hope we have Big Brother All-Stars next year... with Paulie & Cody Califorie(sp?)... and Vanessa & Tiffany Rousso.... Would be fun? :P Especially if one of the boys got evicted early since there's usually some all-guy alliance in there, right?
View Profile

Novice Member
*

Coins: 0
Offline Offline

Posts: 15

« 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
View Profile

Novice Member
*

Coins: 0
Offline Offline

Posts: 15

« 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
View Profile

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!

Great Member
***

Coins: 13
Offline Offline

Gender: Male
Posts: 704

« 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: 28
Offline Offline

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

« 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...
*Cross my fingers and hope we have Big Brother All-Stars next year... with Paulie & Cody Califorie(sp?)... and Vanessa & Tiffany Rousso.... Would be fun? :P Especially if one of the boys got evicted early since there's usually some all-guy alliance in there, right?
View Profile

I need saves to test encounters in GS Reloaded!

Great Member
***

Coins: 13
Offline Offline

Gender: Male
Posts: 704

« 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
October 16, 2017, 09:57:26 AM
AZVRE: Im pretty okay, what about you?
October 16, 2017, 01:17:14 AM
Fox: I think the nine is doing a cirno on me, though... Anyway, how is everyone doing today?
October 16, 2017, 01:12:20 AM
Fox: onesixtwo*
October 16, 2017, 01:12:00 AM
Fox: Okay... Meanwhile... ah... 162 being a number that has made itself known to me.... I look at the relationships of the numbers.... 162  1+6+2 = 9 ; onesizetwo = alphabetical order = 9 characters ; Distance apart analysis: os = 4 = 1[6][2] , st = 1 = [1]6[2] , ot = 5 = [1][6]2 ; ost = original sound track?
October 15, 2017, 06:31:17 PM
AZVRE: ah okay :D i thought i caused some trouble
October 14, 2017, 07:49:16 AM
Fox: Oh i know... You were messing with yours, and the description says mine. It's kind of a funny bug. :P
October 13, 2017, 08:18:31 PM
AZVRE: I did not edit your profile tho. Just to erase that confusion ^^"
October 12, 2017, 04:49:56 AM
Fox: e.g. this art = http://forum.goldensunhacking.net/Themes/Jupiter/images/catbg.gif (etc.)
October 12, 2017, 04:48:58 AM
Fox: I have a question: Where did the art for the headers come from? (Like the backgrounds to each of these things... "Affiliates", etc... Asking just incase it inspires me to do something... but if Charon made it, then that's cool too.
October 11, 2017, 04:23:02 AM
FoxWas thinking about having something for the editor anniversary, but I believe I had to change my mind....
October 10, 2017, 12:58:36 PM
Fox: That's alright. ;       @AZVRE's profile: "Current Activity:  Editing the profile of Fox." ...Eh... That looks weird.
October 07, 2017, 11:45:16 PM
Atrius: Sorry about that, the auto bot detection is still working, but it also requires an admin to visit the site regularly.
October 04, 2017, 04:17:40 AM
Fox: Yeah, it does bring a small amount of activity. Not good quality activity, but it's still activity, nonetheless.  Now if we can get them to randomly post pictures and vdeios!
October 04, 2017, 02:10:48 AM
Majora: If nothing else, I like how they're copying the content of real posts at random. Interesting to see how they adapt to seem more authentic
October 03, 2017, 08:29:38 PM
Fox: medico6601 = Most likely another bot. :(
September 26, 2017, 03:32:24 PM
Fox: by ten* Excuse me.
September 26, 2017, 03:32:12 PM
Fox: Oh yes... Also multiply all levels by two. (So actually, an adept will have levels of 54, 3, 2, and 1, rather than 5, 0, 0, 0.... if going by those.)
September 26, 2017, 03:29:07 PM
Fox: ...I mean the theory also saves space on the Status Screen.
September 26, 2017, 03:26:11 PM
Fox: Random/fun concept theory: What if we got rid of ePow/eRest, and just made eLevel do everything. :P (A process of cleaning stuff up... Though, could make things less versatile. - Like, if a Djinni add 1 eLevel = Okay, that's understood... by why specifically +5 on the ePow/eRes (Rhetorical))
September 23, 2017, 04:42:08 AM
Fox: Oh nevermind, it does... but I swear I saw that a minute ago.

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.063 seconds with 22 queries.