Golden Sun Hacking Community
October 18, 2018, 12:33:47 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  Home Forum DC Wiki Help Search Calendar Downloads Login Register  
  Show Posts
Pages: 1 2 [3] 4 5 ... 153
31  General Hacking / General Editor / Re: Making text editor. on: December 14, 2017, 06:00:30 PM
Well, yes.... That is basically it. THUMB is cut-down ARM. However, I usually say ARM for 32-bit instructions, and THUMB for 16-bit instructions. (Kind of how it is labeled in VBA's Tools>Disassemble...)

So that area is where the functions are stored is that right? As in, each call in the control codes refer to the functions in that place you pointed out.
Well, kind of indirectly. I guess you can kind of think of it like a tree, but the root/parent functions for the control codes/commands aren't in this area. (However, they may call some of these functions, may need to check into that.)
In what I posted, I was going through the code to list what looked like functions that can be called. (Generally.) Usually they're easy to tell because most functions (not all) are nested in push and pop instructions.

As normmatt explained us, at least one DrawCharacter is called to draw normal text, while the other is called when the text box contains BIG characters (if you play the game, just the first text to show up will have a bigger font and be displayed in the middle of the screen)
Maybe. What I read from a quick read of the code /seemed/ to contradict your statement (at least at first)... But until I have figured out where everything is. I can't say whether I've misread or not... While Summon Night's code seems easy to read (compared to some games), I do make mistakes....

08001F14 calls
- 08003BC0
- 08003EB8

080020A8 calls
- 0800348C then 080041C8
- 080043E4 (at end)
32  General Hacking / General Editor / Re: Making text editor. on: December 14, 2017, 04:14:51 AM
Are there only like ~two ARM functions in this game (and the rest is THUMB.) or am I missing something?

@What do you say?
Sure, I guess.


@Next post: Thanks! I've added them, but I need to figure out those others in the area...
08001D0C = Stores table addresses to RAM.
 03002970 | 08BDA40C 098C8D9C 09718FFC 094D446C 09E2261C
08001D3C = File look up(table number, index of file) ; Returns address
08001D5C = File look up(table number, index of file) ; Returns size
08001D78 = File look up(table address, index of file) ; Returns address
08001D88 = File look up(table address, index of file) ; Returns size

08001D94 =
08001D98 =
08001DC4 =
08001DE8 =
08001E14 =
08001E38 =
08001E4C =
08001E64 =
08001E70 =
08001EA0 =
08001ED4 =
08001EE4 =
08001EFC =
08001F14 = DrawString(dest, textAddr, , src_offset (16-bit), bg_color)
080020A8 = (Text related)
080022B4 = (Text related) - Alternates between calling 08003B9C and 08003BA8 for each text character. No idea if it was meant to clear character.
08002388 =
080026CC =
08002A64 =
08002CB4 =
080031E8 =
0800348C = GetCharacterAddressInFont(text character id)
0800350C =
08003620 =
08003664 =
080036C4 =
080036F8 = (Text related) Draw string? (dest?,srcText,?)
0800379C = “
08003840 =
0800393C =
08003A20 =
08003B9C =
08003BA8 =
08003BC0 = DrawCharacter(src, dest, src_offset, bg_color)
08003EB8 = DrawCharacter_0(src, dest, src_offset, bg_color)
080041C8 =
080043E4 =

080044B0 = -- From here on down - I/O stuff (Indirectly)

Those two: DrawCharacter and DrawCharacter_0... Seem like each are called alternatingly... (Every other character using one, the other "every other character" using the other? Hmm.... But as with what I have in the quote, there's clearly more stuff to look into... so...
33  General Hacking / General Editor / Re: Making text editor. on: December 11, 2017, 01:35:39 AM
Alright.. I have a tiny bit of info...

"in this case the opcode is: 16 03 01 00 18 01 00 00 83 C1 00 00 The text in this opcode is 83 C1 which is translated to your partner name. Soon after this opcode we have a 0B 03 (big text) with 83 C1 81 49 81 49 that is: (Partner name) + "!!" But when testing I only saw the :(Partner name) + "!!", when the character summons him/her. I didn't see the summon name by it self as the 16 03 opcode is sugesting. That opcode is kinda weird, maybe this opcode will need some brute force search. t's not like there is much text in that opcode format. About all of it is or user created names and or '!' and or '?'. The only thing we need to take a look is that player name + 'Da'(japanese) + '!'. I think its the only of those 16 03 opcodes we might need to change. Do you have any clue to why a japanse would put a 'Da' after a name? (maybe something we need to translate)
When I looked at the code on this, it looked like this command (0316) is for getting the number of characters in the text string.

EXPR = Refers to where in memory to set the number of characters in text to.
TEXT = The text to check (Using CX83 will read from the text variables)

Does that make any sense?
34  General Hacking / General Editor / Re: Making text editor. on: December 07, 2017, 02:37:27 AM
You are welcome. Still got to document the other commands, though. = Hopefully I can get at least half of those in this month. (?)

Sounds good. I also have it in my Hacking Docs folder. (Misc. Docs link in my signature.)
35  General Hacking / General Editor / Re: Making text editor. on: December 07, 2017, 01:05:44 AM
Yeah, sounds like a good way to go... Especially if we ever want those tools to be used for more than just translating...
As for the script table? I am not sure exactly what that refers to, but I don't imagine it to be a problem? (Re-pointing is easy if you got the space. Right?)
(A bit random, but I kind of hate Python when it comes to file management. C# does a pretty good job, though.)

I've already started documenting. The document is at
It it is to list most of the functions in the game. (Functions being the code blocks that were intended to be called.)

This is just the start, and there's a long way to go. But it's nice seeing the first section (0000+) only has a small number of commands.

0000 = Unused (Pointer is 00000000)
0001 xxxx xxxx EXPR = Set var to EXPR (xxxx=Type (2/3) , xxxx (2nd) =Index)
0002 xxxx EXPR = Conditional jump (in script) if EXPR=0.
0003 xxxx = Simple Jump
0004 = Related to ending script?
0005 EXPR = Loads PSI3 file. (Index being EXPR) Current position is not saved.
0006 EXPR = Loads/calls PSI3 file. (Index being EXPR) Current position is saved.
0007 xxxx = Function call (For same 0x1C byte entry)
0008 = Return from sub-function. (Does nothing if in main function?)
0009 xxxx = Function call? (Another 0x1C byte entry?)
000A EXPR = Sets slot EXPR (0-7) to type 0x9.
000B EXPR = Gets the on flags for the engine block EXPR (0/1)
000C = Nothing (Just returns 0 to continue script.)
000D = Sets PSI3 file id(Not sure?) to 0000, but doesn't load it? (Unknown purpose.)
000E = Unused (Pointer is 00000000)
000F = Unused (Pointer is 00000000)

In the code, these ^ are pretty much separated into two groups, interesting enough. 0001,0004-0009 in the first group, 0002,0003,000A-000D in the other group.
36  General Hacking / General Editor / Re: Making text editor. on: December 03, 2017, 08:37:01 PM
Oh no, you're fine. It's no problem.... This'll be very useful during research.
Was more or less saying that going forward, I will be trying to use this other way. (I might include the arguments too. though I left those out of my example.)
37  General Hacking / General Editor / Re: Making text editor. on: December 03, 2017, 06:49:48 PM
Oh cool. That's nice.

One thing, though.  It looks a bit unorganized and rushed.

I'd prefer the commands written the 16-bit way (That is the way they are written, right?).... and for them to be in order by their number... So like....

Something like below, but I'll have to work quite a bit on it....


General / Control Flow?
0002 = conditional jump, test player's gender
0003 = simple jump
0004 = End of script
0007 = function call

(Not sure if there are categories for 0100+ and 0200+)

0307 = Set variable
0308 = Normal Text box
0309 = for text that spans 3 lines
030B = Text box with large letters
030C = for one line
030D = options
030E = End
0311 =  Box with Title (Where will you go?)
0312 = Box without Title (just a text box)
0313 = default option (no option chose)
0314 = option (Deikle Village)
0315 = end of menu
0317 = popup message: This are special text boxes that are really small and appear in the middle of the screen
0318 = wait for key press on pop up text box??

0363 = set actual place in the game's menu

037D = set name sprite
037E = set visible or invisible (portrait) Invisible are for NPC which doesn't have any portraits

0478 = sets portrait.
0479 = sets eye expression and mouth expression.
047D = adds extra sprites if the portrait is wider.
38  General Hacking / General Editor / Re: Making text editor. on: December 01, 2017, 01:08:23 AM
Okay. Thanks! Wow. A lot to take in.

And that sounds nice. I kind of wish there was a key. (Hex values that represent each control code.) I'll probably get them as I document the game code. (Depending on how much time I devote to it.) ; (Though, I guess you're working on that... if going by your posts.)

@rip/uncompress = If it is compressed in the ROM, another option is to just dig it out of the game's RAM where it is decompressed?
39  General Hacking / General Editor / Re: Making text editor. on: November 30, 2017, 11:17:13 PM
Well, any work to bring the translation project 1 step closer to finishing is good work.... (Even if it's minor.)

Sounds good. Where might I find the most updated English script, anyway?  Not too familiar with PSI3 files, but I'll look at them. I think before I was studying system related text (Uncompressed)... But all that is nice to know.

Thinking about it a little more, should we not fully do 8-bits... (If 16-bits are easier.)... we can still do the GS Compression, and still do 8-bits in the char tables (Since I just realized 16-bits there would be clumsy regardless/Would have made sense for normal Huffman, though.), but have those values look up the 16-bit codes. Hm! (That'd be a max 0x200 byte table (Likely less) + whatever code to make it work.) Each 16-bit would represent a single character, though... So double characters should be avoided... to do variable length characters) -- But of course, I'd like to do a bit of research on Summon Night's code, so a lot of this could just be empty thoughts.
40  General Hacking / General Editor / Re: Making text editor. on: November 30, 2017, 06:46:08 AM
I should probably look into this again.

Would be fun if I could find a way to make it use Golden Sun's text compression!

Just remember, I make *no promises*, though.... Esp. since that last time I looked at it (years ago),.... it turned out I didn't make much progress...  I forget if we documented any of the code or not. So I'll need to find those addresses again. - It'll likely be a complex task...

@Script = So do we have it in a text document? One line per index? (If the game does it by index? Forget. Edit: Oh yes, you have it one per file by address... went to the link in the earlier post.) I know that lines can have funny stuff going on in them, though. But I'll need to think what's actually needed in the event /all/ the text is being compressed at the same time. (And with the possibility of modifying the code.)

For now, I will just look... then decide if I'll do anything a bit later.

I think I'll document the functions.... There's likely going to be a lot of code editing(?) if this goes through?
And with the compression format theory, you don't really have to go to 8-bit char... could keep it 16-bit. (Maybe, at least with a slightly modified version of the compression format.) ... Since that's what would be in the char trees... where-as, the text data would be variable bits. (In theory.) ; But I think I'm interested in making it 8-bits when it is in the char trees... should I ever have a decent enough plan....
41  The Editor / Golden Sun Hacking / Re: Looking for some help getting the Balance Age to work on: November 26, 2017, 05:52:26 AM
File-size requirements? = I was thinking you could upload it on youtube, and link it here. [ youtube ] url [/ youtube ] Assuming any file-size requirement on youtube is okay.

CamStudio ( is one option for recording video. Not sure if it is the best or not.... as I rarely ever have a need to record my screen. (But I do often do screen shots. ... Like of memory viewer... but that only requires using the "print screen" button on the keyboard. (With or without Alt held. Since Alt is for window only.), and maybe a paint program like Paint.NET for editing.) - I have yet to know of any video editing software I'd use, unfortunately.... I can maybe try to look later.

As for video content, hoping it's enough information that I can do exactly what you do and see what happens. (If I don't spot any problems first.)
Once I can produce the error, I can then work on a solution. , provided that one needs to be worked on.

(Another thought:  Maybe show the directories of where the files used are located as well (And all the files in the directory, so I guess you could technically move these files to a separate folder independent of everything else.)... in case such things like having spaces in a file path conflicts with anything (unlikely?)/ but pretty much anything unexpected as such.... It probably doesn't matter, but it's part of increasing the chance I could reproduce the problem.)

Another thought 2: If worse comes to worse, I'm also not sure if it should be shown that GS1 is working via the same means.

Should you want to verify your files aren't corrupt, you can use this: (So we can compare checksums... to help narrow down every potential possibility.)
Up to three times, depending on which you do:  Fresh ROM, Patch, Patched ROM.
42  The Editor / Golden Sun Hacking / Re: Looking for some help getting the Balance Age to work on: November 25, 2017, 07:25:31 PM
Naw... That's not the problem.... OP says TBS worked fine, and that TLA has problem.

"GOLDEN_SUN_BAGFE" clearly says he's using GS2/TLA (U) version ROM.

And GSTLA Reloaded v1.63.ips is for GS2/TLA.

The question is whether he's applying it correctly or not..... A video could verify that. ...
I want to assume he is, but just to be sure.
Anyway, for unsolved cases, a video is usually recommended anyway, so....
Sometimes there can be one small detail that is left out that is essentially to solving a case, and since we're not physically at your computer, we may never see it. Which is the point of a video.
I'd go so far as to say to have the downloading of both the ROM and the patch also in the video, but it depends.... = Though this site definitely doesn't allow links to ROMs, I am not sure what the policy was on videos beyond leaving the url/site name out. (Should the fact that the site was even visited also be left out, or would that be OK as long as the url/name isn't shown?) , so it's probably best to leave any details on ROM sites to a minimum.
43  The Editor / Golden Sun Hacking / Re: Looking for some help getting the Balance Age to work on: November 22, 2017, 08:35:47 AM
And that's cool... About the string, since it's more me just making sure you got the right version. Instead of accidentally getting a different localization or something.

Well, yeah.... I doubted that was the problem, but I was simply curious. = I'm thinking people are more likely to get that ROM than the authentic clean ROM. Which is fine, but it is also worth keeping it in mind. (Just in case.)
And by "it not having any bootleg stuff"... it's mainly assuming others have not altered it by any other means. (I have yet to notice.)

I kind of want to see a video of you patching/trying it... Because I'm not sure exactly what's going on... (I could look for obvious things I would not normally think of such as VBA's auto-patching being accidentally used where not intended/etc... but that's just one simple example (not necessarily the answer) of something that might go amiss unless watching.) What patching program were you using? I tried Lunar IPS, and I think it works fine.
Main point is it can be hard to do anything unless I see the error for myself. :( Etc.

Almost want to ask to run a checksum of both the ROM and the Patch. In case something got corrupted during downloading... I doubt it, though. (e.g. Do you have a slow connection? Or is an anti-virus messing with it?/etc.)

Or funny mistakes I might make sometimes, where you do something to one ROM, and you open a different one while not realizing it. (Again, another example... I've done this type of thing plenty of times in my past, it's almost embarrassing.)

Or maybe there's an emulator that doesn't support something. (Who knows! So this could be asking for the version of the emulator.)

Basically enough examples to prove how a video could be quite useful, even when there's little to show.

And I'm also assuming the unpatched TLA ROM boots?
44  The Editor / Golden Sun Hacking / Re: Looking for some help getting the Balance Age to work on: November 22, 2017, 12:33:15 AM
GSTLA Reloaded v1.63.ips =;sa=view;down=87
GSTLA The Balance Age v1.34r.ips =;sa=view;down=71

I have not experienced any problems with them when I just tried.
But anyway, if you open Tools/Memory Viewer, what is the string at 080000A0? Mine was: GOLDEN_SUN_BAGFE

We might need more information.
In the end, I am confident we'll somehow be able to help. Since I know too much about the game data/how to get around....

There's one quick thing I'd like you to tell me... When you go to Tools>Memory Viewer... and put in the address "08000468" ... what is the 32-bit you see at that address?
If it is 08F9EE50, then the ROM ripper included some bootleg stuff. (You can see it by holding L+R and booting the game.) I doubt this is your problem, since the version I tested has that.
If it is 0801319D, then there shouldn't be any bootleg stuff. (What the original value should be.)

And second, sometimes using Atrius's editor can reposition some things causing the game to read it incorrectly. (Since if you're reading 16-bits, it needs to be at a 16-bit aligned address... and same with 32-bits needing to be 32-bit aligned.)
This can happen with innate psynergies, which can cause a boot crash... (This might not be your problem, but if I haven't reproduced your problem yet, then who knows.)
45  The Community / Introductions / Re: Hello... on: November 19, 2017, 09:19:22 PM
Sure. I'll stare at the sun, until i absorb it power one day.
The sun has the power to make you go blind should you disrespect it, so be careful! Although, it does like to be looked at in all its glory. (Kind of like bowing to a King or Queen.)

A rough list is something like this.
-VBA's Tools (Memory Viewer/etc.)
-Could get a hex editor like hxd, though it is optional if you choose to save the ROM section in VBA's memory viewer and do it that way.)
-GBATEK (For documentation of the handheld.)
-A debugger such as SDL-H or no$gba debugger (The no$ one may require BIOS files to properly work at times.)
-My Docs (So we don't have to learn what's already known.)
-Some assembly knowledge strongly recommended if wanting to maximize your hacking potential. (GBATEK has info on the assembly instructions, but it's really best if you use it next to a debugger, since it'll likely be more confusing for a novice otherwise. My opinion.)
Pages: 1 2 [3] 4 5 ... 153
October 13, 2018, 03:23:06 AM
Salanewt: Updated it to provide more info that I forgot to mention.
October 13, 2018, 03:16:48 AM
Salanewt: I'm still trying to iron out IQ 2 but I'm pretty sure it's entirely random targeting.
October 13, 2018, 03:16:29 AM
Salanewt: Oh yeah, I posted some more info about enemy IQ.
October 12, 2018, 09:51:27 PM
FoxThe HTML5 project is too small to count
October 12, 2018, 06:19:48 AM
Luna_blade: there is jjppof's html5 project...
October 12, 2018, 06:19:17 AM
Luna_blade: Though Momo rings a bell it seems I came here after you left
October 11, 2018, 12:49:41 AM
Fox: (If that makes sense.)
October 11, 2018, 12:48:33 AM
Fox: Yeah, I guess so.  More just saying that's a good place to get answers to GS related questions at the moment.
October 11, 2018, 12:42:28 AM
Crystal Sonata: I did before, but I guess I could try it again
October 11, 2018, 12:41:32 AM
Fox: Not much at the moment. This forum seems pretty quiet. Perhaps you'd be interested in joining the Discord for GSHC that seems to have more activity?
October 10, 2018, 11:16:53 PM
Crystal Sonata: Any projects going on? I need a distraction from the daily grind and I'm interested in hacking GS again.
October 10, 2018, 10:02:53 PM
Fox: Thanks, and good to see you too!
October 10, 2018, 10:02:10 PM
Fox: A few people I'm sure... Most likely the regulars of the past. Such as Atrius, Charon, Role, Salanewt....
October 10, 2018, 03:11:17 AM
Crystal Sonata: I find myself wondering who still remembers me here. Obvs you do (Good to see ya Tea)
October 10, 2018, 12:46:11 AM
Fox: On second thought, it might be because you haven't posted much as Crystal Sonata.
October 10, 2018, 12:41:12 AM
Fox: And your intro isn't that bad. - I imagine most people would say the same about theirs?
October 10, 2018, 12:39:39 AM
Fox: :O - You've been gone so long, I think I forgot you were Momo.  Interesting.
October 09, 2018, 10:23:39 PM
Crystal Sonata: I just revisited my dark past on here and ouch. Someone delete that introduction thread please, the cringe.
October 09, 2018, 08:26:11 AM
Crystal Sonata: Aaaaand, she re-appears yet again. My life keeps dragging me away from the internet sadly.
October 01, 2018, 01:27:50 PM
Luna_blade: haha oof.

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.183 seconds with 20 queries.