News:

The forum has been updated to SMF (2.1.3)!
Please be patient as we work to polish up the place and update features as we can.

Main Menu

Making text editor.

Started by Lord Wolfram, 25, June, 2014, 01:34:18 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pablitox

Quote from: Fox on 06, December, 2017, 09:37:27 PM
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.)


That'll be most helpful! thanks fox

Meanwhile I'll keep working on the graphic task.

Daddy Poi's Oily Gorillas

Alright.. I have a tiny bit of info...


Quote"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.

0316 EXPR TEXT
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?
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...

Sometimes I like to compare apples to oranges. (Figuratively) ... They are both fruits, but which one would you eat more? (If taken literally, I'd probably choose apples.)
Maybe it is over-analyzing, but it doesn't mean the information is useless.


The only GS Discord servers with significance are:
Golden Sun Hacking Community
GS Speedrunning
/r/Golden Sun
GS United Nations
Temple of Kraden

Can you believe how small the Golden Sun Community is?

2+2=5 Don't believe me? Those are rounded decimal numbers. Take that, flat earth theorists! :)

pablitox

Quote from: Fox on 10, December, 2017, 08:35:39 PM
Alright.. I have a tiny bit of info...


Quote"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.

0316 EXPR TEXT
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?


I think it does make sense for this control code.

It's not like there is much text in that opcode format as earth said. I think we can leave it like that. What do you say?

pablitox

I'm gonna addsome functions to the drive you made, these ones were identified by normmatt:

ROM:08003BC0 ; unsigned int __fastcall DrawCharacter(int src, int dest, int src_offset, int bg_color)
ROM:08003BC0 DrawCharacter
ROM:08003EB8 ; unsigned int __fastcall DrawCharacter_0(int src, int dest, int src_offset, int bg_color)
ROM:08003EB8 DrawCharacter_0
ROM:08001F14 DrawString
ROM:0800348C GetCharacterAddressInFont

One of the drawcharacter is for the normal font, while the other is for the big characters font (no clue which one's which)

Daddy Poi's Oily Gorillas

#144
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...
Quote08001D0C = 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...
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...

Sometimes I like to compare apples to oranges. (Figuratively) ... They are both fruits, but which one would you eat more? (If taken literally, I'd probably choose apples.)
Maybe it is over-analyzing, but it doesn't mean the information is useless.


The only GS Discord servers with significance are:
Golden Sun Hacking Community
GS Speedrunning
/r/Golden Sun
GS United Nations
Temple of Kraden

Can you believe how small the Golden Sun Community is?

2+2=5 Don't believe me? Those are rounded decimal numbers. Take that, flat earth theorists! :)

pablitox

Quote from: Fox on 13, December, 2017, 11:14:51 PM
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...
Quote08001D0C = 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...

Glad it was useful!! One question about your first statement, how you differentiatie between ARM and THUMB functions? I though THUMB was just a subset of ARM, just with 16bits instructions.

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.

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)

Daddy Poi's Oily Gorillas

#146
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...)

QuoteSo 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.

QuoteAs 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)
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...

Sometimes I like to compare apples to oranges. (Figuratively) ... They are both fruits, but which one would you eat more? (If taken literally, I'd probably choose apples.)
Maybe it is over-analyzing, but it doesn't mean the information is useless.


The only GS Discord servers with significance are:
Golden Sun Hacking Community
GS Speedrunning
/r/Golden Sun
GS United Nations
Temple of Kraden

Can you believe how small the Golden Sun Community is?

2+2=5 Don't believe me? Those are rounded decimal numbers. Take that, flat earth theorists! :)

pablitox

Quote from: Fox on 14, December, 2017, 01: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...)

QuoteSo 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.

QuoteAs 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)


I see, thanks for the explanation! Glad it's not as hard to read as other functions! That's a slight relief :P

pablitox

Good news!

The person that made the script format (earthdarkness) is back, so I'll share this infor with him, he'll find it really useful:).

Btw, about the big text, which function is the one that draws it on the screen????  How does it work?

I'm asking because we wanted to change it from 2byte reading to 1byte per char reading as it had been done with the normal text.

Daddy Poi's Oily Gorillas

So like... something like this? (Incomplete, there's a lot of stuff that I haven't studied.)
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...

Sometimes I like to compare apples to oranges. (Figuratively) ... They are both fruits, but which one would you eat more? (If taken literally, I'd probably choose apples.)
Maybe it is over-analyzing, but it doesn't mean the information is useless.


The only GS Discord servers with significance are:
Golden Sun Hacking Community
GS Speedrunning
/r/Golden Sun
GS United Nations
Temple of Kraden

Can you believe how small the Golden Sun Community is?

2+2=5 Don't believe me? Those are rounded decimal numbers. Take that, flat earth theorists! :)

pablitox

Quote from: Fox on 19, January, 2018, 06:44:33 PM
So like... something like this? (Incomplete, there's a lot of stuff that I haven't studied.)

Sorry the lack of reply, I was kind of busy.

I'll send it to earth to see if that's what he wanted. Thanks a lot!!!

gvans

Quote from: pablitox on 25, January, 2018, 10:32:15 AM
Quote from: Fox on 19, January, 2018, 06:44:33 PM
So like... something like this? (Incomplete, there's a lot of stuff that I haven't studied.)

Sorry the lack of reply, I was kind of busy.

I'll send it to earth to see if that's what he wanted. Thanks a lot!!!


Hi guys. i had to make an account here so i could just say this.

i am truly amazed. i think i have been reading so many forums with so many post over so many years. all about this game.
this has truly been an amazing read. (took me like 2 to 3 hours mostly skipping stuff but getting the jist of it)

now that i have reached the last post i noticed its early this year. Jesus. many many years have past XD
anyhow i am still looking baffled at you guys and the commitments i have been seeing.

just wondering if this is still being continued (seeing its 22-07-2018 now)

you guys are amazing. hope to hear from you guys.

Greatest regards. gvans.

(PS i hope you can excuse any grammar errors i have made here. I'm from the netherlands. try my best though).