Golden Sun Hacking Community
October 19, 2019, 12:32:30 PM *
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 ... 6 7 [8]   Go Down
  Print  
Author Topic: Making text editor.  (Read 55543 times)
0 Members and 1 Guest are viewing this topic.

Regular Member
**

Coins: 0
Offline Offline

Posts: 64

« Reply #140 on: December 10, 2017, 05:04:06 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.)


That'll be most helpful! thanks fox

Meanwhile I'll keep working on the graphic task.
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: 2450

« Reply #141 on: December 11, 2017, 01:35:39 AM »

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?
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

Regular Member
**

Coins: 0
Offline Offline

Posts: 64

« Reply #142 on: December 11, 2017, 01:47:08 AM »

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?
Logged

View Profile

Regular Member
**

Coins: 0
Offline Offline

Posts: 64

« Reply #143 on: December 13, 2017, 04:13:06 PM »

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)
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: 2450

« Reply #144 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...
Quote
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...
« Last Edit: December 14, 2017, 04:16: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

Regular Member
**

Coins: 0
Offline Offline

Posts: 64

« Reply #145 on: December 14, 2017, 02:14:35 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...
Quote
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...

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)
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: 2450

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

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

Quote
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)
« Last Edit: December 14, 2017, 06:13:21 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

Regular Member
**

Coins: 0
Offline Offline

Posts: 64

« Reply #147 on: December 18, 2017, 06:04:24 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...)

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

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


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

View Profile

Regular Member
**

Coins: 0
Offline Offline

Posts: 64

« Reply #148 on: January 16, 2018, 02:25:51 PM »

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.
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: 2450

« Reply #149 on: January 19, 2018, 11:44:33 PM »

So like... something like this? (Incomplete, there's a lot of stuff that I haven't studied.)


* summon night 030B.png (115.08 KB, 2000x2000 - viewed 426 times.)
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

Regular Member
**

Coins: 0
Offline Offline

Posts: 64

« Reply #150 on: January 25, 2018, 03:32:15 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!!!
Logged

View Profile

New User


Coins: 0
Offline Offline

Posts: 1

« Reply #151 on: July 22, 2018, 12:59:37 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).
Logged
View Profile
Pages: 1 ... 6 7 [8]   Go Up
  Print  
 
Jump to:  

Cbox
October 13, 2019, 04:51:53 PM
Salanewt: Oh, lol nice. :P
October 13, 2019, 04:44:28 PM
Fox: Maxi's already joined the server, he just never pops in.
October 13, 2019, 04:30:42 PM
Salanewt: I'll state up front that gsmagic has some overlap with the classic editor, but Teawater has been focusing on other things so you'll still want the original to do a lot of stuff.
October 13, 2019, 04:29:40 PM
Salanewt: As for moving posts over, I'll see if I can do it later today but I've been pretty busy these past few days.
October 13, 2019, 04:29:13 PM
Salanewt: Hey Maxi! I can help you with the latest "public" version of gsmagic if you join the Discord server, or when we start populating the board with topics, but if you want a download then you can go here: https://drive.google.com/drive/folders/1zZHTBD_7BTl6leXRgFulzSL9iS4TIBMt
October 13, 2019, 02:26:50 PM
Fox: Yes.  I am actually kind of surprised Salanewt hasn't moved my old GSMagic topic(s) over yet. (Even if they don't contain the latest versions.)  I have been focusing more on posting them to Discord. But it's been awhile since I've done any meaningful work, so....
October 12, 2019, 10:00:17 AM
MaxiPower: Any chance of getting a hold of the new editor for a test drive. Been here since day 1 (actually I was here since before there was a forum lol) so you can trust me.
October 07, 2019, 07:10:37 AM
Fox: It specializes in GS2, still... The others are just easter eggs because...similar formatting.
October 07, 2019, 06:26:27 AM
Salanewt: But it has GS1 editing and Mario game viewing/possible editing too.
October 07, 2019, 06:26:11 AM
Salanewt: That name made sense when it was just GS2 lol.
October 07, 2019, 05:02:04 AM
leaf: it's a better name than "the GSTLA editor" anyway
October 02, 2019, 08:13:00 AM
Misery: gsmagic is a fine name
October 01, 2019, 02:43:51 AM
Omx7: Heyo
September 29, 2019, 06:35:38 PM
Fox: Liking the changes so far.  In a way, I'm also wondering if I should give gsmagic a better name, since I see it has became a part of the Community, as I see by the board that has been added.... but... *shrug* - I can wait.  I still see it as an "experimental" editor.
September 28, 2019, 03:10:29 AM
zman9000: :)
September 25, 2019, 12:46:18 AM
Fox: Groovy.
September 25, 2019, 12:45:56 AM
Salanewt: Hey.
September 25, 2019, 12:23:19 AM
Megalord38: Hello, fellow Humans.
September 24, 2019, 11:18:49 PM
Salanewt: Yeah, baby!
September 24, 2019, 12:41:13 AM
Fox: Groovy?

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.157 seconds with 23 queries.