Golden Sun Hacking Community

Golden Sun Resources => Misc. GS Hacking => Topic started by: Daddy Poi's Oily Gorillas on 01, April, 2012, 05:10:30 AM

Title: GS: Dark Dawn (U) Data List (WIP)
Post by: Daddy Poi's Oily Gorillas on 01, April, 2012, 05:10:30 AM
I'm in the middle of hacking Golden Sun: Dark Dawn to learn a bit about its data, so I guess I can post what I know in a very brief manner.

The addresses are in RAM. (Since this data is compressed in the ROM.) The format of its compression is one that Bowser's Inside Story also uses. (Though, BIS has at least 2 compression formats... I only know one that Dark Dawn uses right now.)


We'll start off with ROM locations, most of the data is compressed.

00004000 = Boot Data (The compression probably starts at 00008000?): There should be a very large compression block with many databases in it: (All of the following should be compressed)
00042BF0 = Item data (Estimate location)


Now for RAM locations!

02000000 = The boot data should be placed here and decompressed.  It's very large, so it should end somewhere pass 02064A4C for sure.

02001158, ~0200146C = Calculate keypad info from 04000130, and place at 020791C8. (?)

02003FBC = get pc/enemy ram address (0-7 for pc, 80+ for enemy; 8 and 9 might be Isaac and Garet during tut battle, but I do not know.)

02005D9C = Recalculate stats

02010820 = Address to keypad info

02017628 = Check keypad 0x40, 0x80, 0x1
0201778C = Address to keypad info

0201A7E4 = Address to keypad info

02023B40 = Address to keypad info (For check on 0x100, 0x200)

02026BB4 = Address to keypad info (For check on 0x40)

0202BE34 = Address to keypad info

02149DDC = Address to keypad info (This is in thumb code.)

02061898 = Everything before here should be code....

02064A4C = Item Data!
02064A68 = ? (Long Sword)
02064A6A = Price
02064A6C = Icon
02064A6E = Type (0=Item; 1=Weapon; 2=Armor; 3=Shield; 4=Head; 5=Boots; 6=Ring; 7=Other)
02064A6F = Flags
(01=Curses when equipped;
  02=Can't be removed;
  04=A rare item?;
  08=An important item;
  10=Carry up to 30.)
02064A70 = Equipped by?
02064A72 = Attack
02064A74 = Defense
02064A75 =
02064A76 = Use
02064A78 =
02064A7A = Number of unleashes.
02064A7C = Unleashes offset.



02077658 = Party Data! (This can be found compressed with other data at around 0004C8BB in the

ROM.)
02077658 = HP Growth
02077664 = PP Growth
02077670 = Attack Growth
0207767C = Defense Growth
02077688 = Agility Growth
02077694 = Luck Growth (8-bit)
0207769A = Elemental Levels (8-bit) (Ex: 54, 3, 1, 2)
0207769E = Level
020776A0 = Items (x8?)
020776B0 = Unknown (*9 of xFF, *1 of 00)
020776BA = Innate Psynergy (x8?)
020776CA = Level/Experience required? (I have a feeling this is in percentages of 20, 25, and 30.)

---

020791C8 = Keypad info

Now for the PC data that is used for in-game play.

0207B16C = This is Matthew in 16-bit ASCII.

0207B194 = Level

0207B1BA = Max HP
0207B1BC = Max PP
0207B1BE = Current HP
0207B1C0 = Current PP
0207B1C2 = Attack
0207B1C4 = Defense
0207B1C6 = Agility
0207B1C8 = Luck
0207B1CA = 0001
0207B1CC = 0000
0207B1CE = Venus Power
0207B1D0 = Venus Resist
0207B1D2 = Mercury Power
0207B1D4 = Mercury Resist
0207B1D6 = Mars Power
0207B1D8 = Mars Resist
0207B1DA = Jupiter Power
0207B1DC = Jupiter Resist
0207B1DE = Psynergy (8000 = Class Psynergy (Non-innate) ; ...)

0207B21E = Items (F800 = # ; 0400 = Red X on icon. ; 0200 = Equipped ; 01FF = Item)

0207B2C8 = Karis
0207B424 = Tyrell
0207B580 = Rief
0207B6DC = Amiti
0207B838 = Sveta
0207B994 = Eoleo
0207BAF0 = Himi


02220B80 = Text bank (Pointers.)
0223B2E8 = Last text string.

0223C310 = Text bank 2. (Starts with battle-related text, but later may include other text?)
0225F922

0225F948 = Text bank 3. (Place names.)
022602CA
Title: Re: GS: Dark Dawn Data List (WIP)
Post by: Crystal Sonata on 01, April, 2012, 05:15:10 AM
Epic xD. Maybe with this, we can begin merging Dark Dawn into the editor (Or at least a separate version since the formats are probably a lot different). I can just imagine Mercury making their hack based on dark dawn xD
Title: Re: GS: Dark Dawn Data List (WIP)
Post by: Aile~♥ on 01, April, 2012, 05:22:38 AM
That could be fun. Problem is, you then have to worry about what happens when a character doesn't have the right animation set. Like, what happens if Himi tries to use a bow? Does she use one of her other animation sets? Does she just t-stance? Does the game freeze? And there are a lot of questions like that for other things than just that. What happens if enemies try to use unleashes, or PCs try to use enemy-only skills, like, for example, Chaos Upheaval?
Title: Re: GS: Dark Dawn Data List (WIP)
Post by: Crystal Sonata on 01, April, 2012, 05:24:22 AM
Sheesh...It does sound like trouble. We would have to add extra animation sets, which I know would not be easy.
Title: Re: GS: Dark Dawn Data List (WIP)
Post by: Aile~♥ on 01, April, 2012, 05:30:18 AM
And also, can moves work with the wrong weapon type? Like, would Matthew be able to use Barrage with a light blade? What happens if you try to use Triple Burst while wielding a sword? That can't go over well, unless the character randomly decides to default to the stabbing animation.
Title: Re: GS: Dark Dawn (U) Data List (WIP)
Post by: Salanewt on 01, April, 2012, 01:03:46 PM
I don't know for sure, but I remember forcing Matthew to equip a set of claws by editing RAM, and he seemed to hold and use them correctly.

Also, nice list you've got there!
Title: Re: GS: Dark Dawn (U) Data List (WIP)
Post by: Aile~♥ on 01, April, 2012, 01:10:23 PM
So everyone has access to all animations? Or everyone has animations for all weapons just because?
Title: Re: GS: Dark Dawn (U) Data List (WIP)
Post by: Salanewt on 01, April, 2012, 01:14:39 PM
I don't know, I was just randomly trying it because I was checking out the Djinn for someone, so I accidentally stumbled upon it while searching for that data. However, my guess is that the PC modelss are able to recognize where the hand polygons are supposed to be, and each weapon model just positions them or something. Teawater might know though.
Title: Re: GS: Dark Dawn (U) Data List (WIP)
Post by: Atrius on 01, April, 2012, 02:05:13 PM
Theoretically, from what little I know of DS data formats, each character should have their own animation sets.
Title: Re: GS: Dark Dawn (U) Data List (WIP)
Post by: Aile~♥ on 01, April, 2012, 02:55:15 PM
Actually, I expect that the models have "hold" bones assigned, Sala.
Title: Re: GS: Dark Dawn (U) Data List (WIP)
Post by: Amylolz on 01, April, 2012, 05:59:33 PM
So, like, how did you do this again? Also, have you found any unused stuff yet?
Title: Re: GS: Dark Dawn (U) Data List (WIP)
Post by: Daddy Poi's Oily Gorillas on 01, April, 2012, 06:15:31 PM
Well, looking for action replay codes was my very first step. (To save time from finding that data with RAM Search.) All this data would be in the PC in-game database..

Then, I simply did a RAM Search of the database address. 0207b16c, where it starts with the chars for Matthew.

I opened up No$ debugger that I found on the internet once. (Well actually someone told me about it.) (I know it doesn't really work.. but some of the code that loads into RAM was there.. so..) Here, I scan the code at the addresses found via RAM Search looking for pointers and stuff. Eventually this gives me the Party Data... so I do the same RAM Search/code scan with the address of the Party Data, eventually finding the Item Data. If I remember correctly.
Title: Re: GS: Dark Dawn (U) Data List (WIP)
Post by: Salanewt on 01, April, 2012, 06:23:26 PM
I think the very last ability is something called Massive Swing, which is x0269, and a non-elemental spell just as an "e" for its icon.

But otherwise, you can use ram watch/search if you know a bit about what you are looking for, or you can use codes if you don't know. There are other ways, but it depends on how much you want to learn them.
Title: Re: GS: Dark Dawn (U) Data List (WIP)
Post by: Kide on 02, April, 2012, 06:16:28 PM
Quote02064A7A = Number of unleashes.
02064A7C = Unleashes offset.

Hm... this means that weapons don't have a slot (or 4 slots, in DD's case) for unleashes like the GBA games, and unleashes are set in a pre-established list or something like that, right?

If so, I wonder how the chance of each unleash activating works. Probably each unleash has the same chance of happening after all, given that their quantity are written in the data.
Title: Re: GS: Dark Dawn (U) Data List (WIP)
Post by: Rolina on 02, April, 2012, 06:23:02 PM
Would be interesting to see how the unleash system works in DD, as it did have some potential.
Title: Re: GS: Dark Dawn (U) Data List (WIP)
Post by: Daddy Poi's Oily Gorillas on 02, April, 2012, 06:32:21 PM
QuoteProbably each unleash has the same chance of happening after all, given that their quantity are written in the data.
It is perfectly possible that it is with the unleashes themselves. I have not did any research into this, though. But I am assuming the Unleash offset/index just looks in another database for all the unleash-related data.
Title: Re: GS: Dark Dawn (U) Data List (WIP)
Post by: Kide on 02, April, 2012, 06:56:34 PM
With unleashes themselves? But what would have happened in the case one weapon has unleash 'x' and another one has unleashes 'x' and 'y'? The first one wouldn't add 100%, right? Or would it be ... er... normalized?

Although, I don't know how the mechanics work for this subject. I mean, if it's one check for any unleash then another check for the specified one, or a single check for everything. So this is all pure speculation.
Title: Re: GS: Dark Dawn (U) Data List (WIP)
Post by: Daddy Poi's Oily Gorillas on 02, April, 2012, 08:09:59 PM
When I was looking on the day I made this topic. I believe none of the offsets and # of unleashes overlapped...

So for example. In the unleashes database... you could have.

Item name (Number of unleashes ; Unleash offset)

Note: I messed up.. HOLD ON!

0001 - Long Sword (0002 ; 0000)    - Critical Strike
                                     Spin Strike
0002 - (0002 ; 0002)

0003 - (0002 ; 0004)

0004 - (0002 ; 0006)

0005 - Great Sword (0003 ; 0008)   - Critical Strike
                                     Spin Strike
                                     Fearless Attack
0006 - Shamshir    (0003 ; 000B)   - Power Charge
                                     Fearless Attack
                                     Acid Bath

I mean, this is practically the same as putting this data with the items themselves. Just think of this as a method of compression. So we don't have a lot of blank spots for unleashes in the Items database.  In other words, I'm saying that you may not have to change anything about how unleashes work in the current GS2 Items Editor.

Oh yeah, and it is probably recommended to keep the limit at 4 unleashes per item. (I think there are graphical issues if you have more?)

Title: Re: GS: Dark Dawn (U) Data List (WIP)
Post by: Rolina on 02, April, 2012, 09:01:45 PM
Wait, so theoretically, you could have more?  You'd just have to create a new gui/menu system to account for it?
Title: Re: GS: Dark Dawn (U) Data List (WIP)
Post by: Daddy Poi's Oily Gorillas on 02, April, 2012, 11:05:54 PM
(http://i900.photobucket.com/albums/ac208/charleysdrpepper/gs3sixuex.png)

I changed the number of unleashes to 6 in this image.  If this implies yes, then I guess so.  As you can see, 5+ go outside the box.

Edit: Oh yeah, ignore the fact that I'm using version 0.9.6, thank you.
Title: Re: GS: Dark Dawn (U) Data List (WIP)
Post by: Kide on 02, April, 2012, 11:29:43 PM
Oh, I've just done the same thing right now! With critical strike appearing thrice too!

However, wouldn't the weapon skill meter over there be messed up with that many unleashes?

QuoteI believe none of the offsets and # of unleashes overlapped...
Yeah, they didn't. The thing is, I don't know if I understood you correctly at first when you said that "with the unleashes themselves" thing. I thought you meant that each unleash had it's own rate, instead of the weapon having it. So, if this is true, that would make the Great Sword unleash rate automatically higher than the Long Sword's. Unless there's some sort of normalization.
Title: Re: GS: Dark Dawn (U) Data List (WIP)
Post by: Rolina on 03, April, 2012, 12:57:40 AM
Interesting.  This intrigues me...  I wonder if we could tweak it somehow so that at a certain weapon skill level, certain unleashes override previous ones, kinda like EPA upgrades at class up?  If we could do that as well, imagine the possibilities we could do...

I think the easiest way to expand the gui is to have a multi-page list, kinda like psynergy.  Once it expands past four, press L or R to toggle pages.
Title: Re: GS: Dark Dawn (U) Data List (WIP)
Post by: Kide on 03, April, 2012, 09:06:29 PM
The last 4 bytes in the item data seem to be related to weapon skill level. Maybe it has something to do with a weapon's starting level?

Title: Re: GS: Dark Dawn (U) Data List (WIP)
Post by: Rolina on 14, May, 2017, 08:16:30 PM
So, think we can have a general update on what we've found over the last half decade?  I know there's the link in your signature, but not all of us really understand how much of that is relevant info and how much of that isn't yet understood.
Title: Re: GS: Dark Dawn (U) Data List (WIP)
Post by: Daddy Poi's Oily Gorillas on 17, May, 2017, 11:14:07 PM
It would be pretty difficult to go over everything if I'm not keeping track of when I learned about each thing. But let's see here....

@Half decade = Before this year... not much.

However, this year does come with much more research:

I guess I can start with talking about overlay files first:
-Overlay files:
0x0 = General field stuff.
0x1-0x134 -ish... are map code files. (Not sure if that's true for all of those... but usually loaded to 0x021EE000 in (U) version.)- Learned that the ARM code portion seems to set up address locations for events (reminds me of the GBA games.) ... However, events in Dark Dawn are done differently then the GBA games... as they use a Command and Args system. (Well, the GBA games may have a command and args system to a small degree, but I think it was strictly limited to object script, such as movement and stuff. Where-as, for Dark Dawn, you have them to do warps, start battles, adding/removing PCs to your party, etc. - Both command/args systems tend to stick to using 32-bits, which does make it somewhat simple.)
0x14C = Shop code (Including tables for items sold in shops/etc.)
I'm assuming there are other Overlay files (e.g.  some before 0x14C, and up to 0x14F) that may have functionality similar to the Shop, but not Shop related. (A number of them are loaded at the same RAM address, anyway.) Maybe mini-games? I have not checked if this game has mini-games, but I shall...
0x151 = General battle stuff (Includes enemy table, enemy groups, damage formula stuff, etc.)
-The rest of them (Up to 0x16D) are currently unknown... but it wouldn't surprise me if one or more of them were for Ability Animations in battle. (Since those were hard-coded in the GBA games.... )

And ofcourse, the ARM9 boot file seems to have all the general stuff needed in both Field and Battle. It seems? (Party Data, Class Data, Items, Psynergy/Abilities,  Djinn, Summons, etc.) However, it also has the Room Table, and the table that assigns the room's music and the room's name....


---
Oh yes, while I may have spotted some debug and e3 related content... (Just from simply looking at rooms. And I did find the single/double/triple djinn battles as mentioned on the Discord....) ... I still have yet to access any debug menus like Warp or Flag.... No idea if this game has it, but I'm sure hoping so.