+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  Help me figure out the whole pointer thing.
Pages: 1 2 [3] 4
Author Topic: Help me figure out the whole pointer thing.  (Read 2 times)
RedComet
Guest
« Reply #30 on: March 25, 2008, 01:28:54 pm »

Quote from: Rai on March 25, 2008, 01:25:01 pm
Quote from: RedComet on March 25, 2008, 01:20:27 pm
Quote from: Rai on March 25, 2008, 01:03:56 pm
Well that's not really true. I've taken all your advice, read almost every pointer document out there and still can't find them. What are these "key" concepts I'm missing that keep me from finding these pointers so I can fit in to the game, what I need to fit in? I have to be perfectly honest, that's all I care about is learning whatever I need to, in order to fit in all the text I want to fit in. All I can do now really, is work with what limited space I have.

Please tell us what you've learned from reading those docs. That way we know what you understand and what you don't. If that's too much, let's start with a simple question: what's a pointer?
Well let's start with what I DO know. A pointer is basically a place in the rom that points somewhere else to the rom. I know that whenever I ask however add space, I get "pointers" and people tell me to read the docs. I read the docs and try to apply the techniques, but nothing happens. So what I DON'T know is how to calculate the pointers and find them correctly. And what I also know is finding the pointers will help me to insert everything I need into the game.

What don't I know?

I don't know how to make "Mars" "Marth" if the game only let's you use 4 spaces. That's what I'm trying to do, extend it a space so I can put "Marth".

Have you tried simply changing "Mars" to "Marth" and moving the end of string control code or any other type of experimentation?
DarknessSavior
Guest
« Reply #31 on: March 25, 2008, 01:31:41 pm »

I think in this case, if it's anything like the original FE, he's dealing with pointers not just related to Marth's name, but the person after him as well. I think it's Jeigan.

Something like: MarsJeigan. Or Mars[end]Jeigan.

If he overwrites or moves the [end] (if there is one, I dun remember if it's fixed length or not), then Jeigan (or whoever) has part of Marth's name as the beginning of his.

What you need to do, Rai, is to move the list of names into expanded space, then change the pointers to point at that list. This way, you can have this, and it'll work:

MarthJeiganetcetc OR Marth[end]Jeigan[end]etcetc[end]

~DS
RedComet
Guest
« Reply #32 on: March 25, 2008, 01:34:03 pm »

Quote from: DarknessSavior on March 25, 2008, 01:31:41 pm
I think in this case, if it's anything like the original FE, he's dealing with pointers not just related to Marth's name, but the person after him as well. I think it's Jeigan.

Something like: MarsJeigan. Or Mars[end]Jeigan.

If he overwrites or moves the [end] (if there is one, I dun remember if it's fixed length or not), then Jeigan (or whoever) has part of Marth's name as the beginning of his.

Which is precisely why you learn what pointers do. You change the pointer to the subsequent string so that it points to the beginning of the string's new position.
Rai
Guest
« Reply #33 on: March 25, 2008, 01:35:35 pm »

Quote from: RedComet on March 25, 2008, 01:34:03 pm
Quote from: DarknessSavior on March 25, 2008, 01:31:41 pm
I think in this case, if it's anything like the original FE, he's dealing with pointers not just related to Marth's name, but the person after him as well. I think it's Jeigan.

Something like: MarsJeigan. Or Mars[end]Jeigan.

If he overwrites or moves the [end] (if there is one, I dun remember if it's fixed length or not), then Jeigan (or whoever) has part of Marth's name as the beginning of his.

Which is precisely why you learn what pointers do. You change the pointer to the subsequent string so that it points to the beginning of the string's new position.
So after(If ever) I find these pointers, I simply have to move the list of names into expanded space(Bunch of FF's I assume) and repoint?
Nightcrawler
Guest
« Reply #34 on: March 25, 2008, 03:23:12 pm »

Has anybody looked at this game besides me?  Roll Eyes Unrelated advice is unhelpful. I'm looking at you DS.

Here's what is going on:

Code:
$87/8364 A9 00 8E    LDA #$8E00              A:000F X:0007 Y:0007 D:0000 DB:87 S:1FEF P:eNvmxdIzcHC:1074 VC:242 00 FL:65535
$87/8367 85 01       STA $01    [$00:0001]   A:8E00 X:0007 Y:0007 D:0000 DB:87 S:1FEF P:eNvmxdIzcHC:1092 VC:242 00 FL:65535
$87/8369 A0 01 00    LDY #$0001              A:8E00 X:0007 Y:0007 D:0000 DB:87 S:1FEF P:eNvmxdIzcHC:1120 VC:242 00 FL:65535
$87/836C B7 0F       LDA [$0F],y[$8C:A47A]   A:8E00 X:0007 Y:0001 D:0000 DB:87 S:1FEF P:envmxdIzcHC:1162 VC:242 00 FL:65535
$87/836E 0A          ASL A                   A:0001 X:0007 Y:0001 D:0000 DB:87 S:1FEF P:envmxdIzcHC:1210 VC:242 00 FL:65535
$87/836F 18          CLC                     A:0002 X:0007 Y:0001 D:0000 DB:87 S:1FEF P:envmxdIzcHC:1222 VC:242 00 FL:65535
$87/8370 77 0F       ADC [$0F],y[$8C:A47A]   A:0002 X:0007 Y:0001 D:0000 DB:87 S:1FEF P:envmxdIzcHC:1258 VC:242 00 FL:65535
$87/8372 18          CLC                     A:0003 X:0007 Y:0001 D:0000 DB:87 S:1FEF P:envmxdIzcHC:1306 VC:242 00 FL:65535
$87/8373 69 13 92    ADC #$9213              A:0003 X:0007 Y:0001 D:0000 DB:87 S:1FEF P:envmxdIzcHC:1318 VC:242 00 FL:65535
$87/8376 85 00       STA $00    [$00:0000]   A:9216 X:0007 Y:0001 D:0000 DB:87 S:1FEF P:eNvmxdIzcHC:1336 VC:242 00 FL:65535
$87/8378 A7 00       LDA [$00]  [$8E:9216]   A:9216 X:0007 Y:0001 D:0000 DB:87 S:1FEF P:eNvmxdIzcHC:1388 VC:242 00 FL:65535
$87/837A 48          PHA                     A:982E X:0007 Y:0001 D:0000 DB:87 S:1FEF P:eNvmxdIzcHC:0068 VC:243 00 FL:65535
$87/837B B7 00       LDA [$00],y[$8E:9217]   A:982E X:0007 Y:0001 D:0000 DB:87 S:1FED P:eNvmxdIzcHC:0120 VC:243 00 FL:65535
$87/837D 85 01       STA $01    [$00:0001]   A:8E98 X:0007 Y:0001 D:0000 DB:87 S:1FED P:eNvmxdIzcHC:0168 VC:243 00 FL:65535
$87/837F 68          PLA                     A:8E98 X:0007 Y:0001 D:0000 DB:87 S:1FED P:eNvmxdIzcHC:0196 VC:243 00 FL:65535
$87/8380 85 00       STA $00    [$00:0000]   A:982E X:0007 Y:0001 D:0000 DB:87 S:1FEF P:eNvmxdIzcHC:0230 VC:243 00 FL:65535
$87/8382 22 47 AC 87 JSL $87AC47[$87:AC47]   A:982E X:0007 Y:0001 D:0000 DB:87 S:1FEF P:eNvmxdIzcHC:0258 VC:243 00 FL:65535

Refer to my previous post for additional information.

http://www.romhacking.net/forum/index.php/topic,6012.msg95377.html#msg95377


It's in scripting blocks. There's no pointers to individual strings. You'll see the block containing your line of text Rai starts at $8E:982E. As you can see the bank is hard coded and the rest is pulled with a hard coded add and another partial pointer pull there. It starts at $8e:982e and puts along processing the scripting block until it hits the code to make a windows and print some text and then prints your string at $8E:983C.

You will need to relocate the whole block so you have space to change it's size. Then you'll have to change a few of those values in the code there. And then hope you don't have to deal with any relative jumps within the scripting block that could get fouled up. It will take an intermediately skilled hacker in my opinion to make it work from my initial look.

EDIT: This information was from the 1.0 version of the ROM.
« Last Edit: March 25, 2008, 04:20:23 pm by Nightcrawler »
Rai
Guest
« Reply #35 on: March 25, 2008, 03:42:11 pm »

So another words there's no chance of a newbie like me putting script an English script into this game? Ah well, maybe I'll just make a translation document for the game or something.
DarknessSavior
Guest
« Reply #36 on: March 26, 2008, 07:40:00 am »

If you put your mind to it, you could do it, but it would take time and practice. You'd have to read up on ASM, making sure you understand the opcodes that are used, and understand what they do in context to the game.

Once you have that down, you can start changing things. The first part is probably the harder of the two. Or at least, it was for me.

And yeah, you're right NC. Unrelated advice is unhelpful. But the moment you gave him related, well thought out advice, what did he say? "Oh well, I guess a newbie like me couldn't do it."

That's why I didn't bother. If he were willing to get into the nitty-gritty, I'd be more than willing to help. But it doesn't seem like he is.

~DS
KaioShin
Guest
« Reply #37 on: March 26, 2008, 07:56:22 am »

Quote from: DarknessSavior on March 26, 2008, 07:40:00 am
And yeah, you're right NC. Unrelated advice is unhelpful. But the moment you gave him related, well thought out advice, what did he say? "Oh well, I guess a newbie like me couldn't do it."

That's why I didn't bother. If he were willing to get into the nitty-gritty, I'd be more than willing to help. But it doesn't seem like he is.

~DS

Then why post at all? You contradict yourself to produce a cheap excuse for your post Tongue
DarknessSavior
Guest
« Reply #38 on: March 26, 2008, 08:07:17 am »

How exactly am I contradicting myself? >.>

Edit: Nevermind. I get it. Let me be more specific. I was willing to explain pointers because that's simple. I won't bother downloading a rom, opening it up and messing with the ASM to give advice to someone who will just give up after I do so. =P

~DS
« Last Edit: March 26, 2008, 03:50:44 pm by DarknessSavior »
Rai
Guest
« Reply #39 on: March 26, 2008, 02:21:34 pm »

Well I started looking at some of the code in the NES version but lol, it's mostly gibberish to me. Like I know what the OPCodes and all mean, but I just don't know what it actually does.

Like I was debugging the game, in the spot where there's text and everything and got this...
Quote
$C156:A5 20     LDA $20 = #$00
$C158:D0 03     BNE $C15D
$C15A:4C 56 C1  JMP $C156
$C15D:20 4E C0  JSR $C04E
$C160:4C 44 C1  JMP $C144
$C163:08        PHP
$C164:48        PHA
$C165:8A        TXA
$C166:48        PHA
$C167:98        TYA
$C168:48        PHA
$C169:A9 00     LDA #$00
$C16B:8D 03 20  STA $2003 = #$00
$C16E:A9 02     LDA #$02
$C170:8D 14 40  STA $4014 = #$FF
$C173:A5 00     LDA $00 = #$A7
$C175:48        PHA
$C176:A5 01     LDA $01 = #$26
$C178:48        PHA
$C179:20 A5 C3  JSR $C3A5

Guess now I have to figure out WHAT that has to do with loading the text.
creaothceann
Guest
« Reply #40 on: March 26, 2008, 02:56:38 pm »

I don't see the problem. If you know what the opcodes do then the rest is easy.

It's like going from some words to the meaning of the sentence - the words are the hardest part.
Rai
Guest
« Reply #41 on: March 26, 2008, 03:15:31 pm »

Quote from: creaothceann on March 26, 2008, 02:56:38 pm
I don't see the problem. If you know what the opcodes do then the rest is easy.

It's like going from some words to the meaning of the sentence - the words are the hardest part.
Well it's like I could tell you it stores 20 into a, branches at $C15D, jumps to C156, jumps and saves at C04E, then does another jump to C144, then pushes the flag, pushes A, transfers x to a, pushes A... blah blah. But the thing is I don't understand what any of it means in conjuction with the game.
RedComet
Guest
« Reply #42 on: March 26, 2008, 03:43:40 pm »

How did you find that routine you posted?
Rai
Guest
« Reply #43 on: March 26, 2008, 06:20:43 pm »

Quote from: RedComet on March 26, 2008, 03:43:40 pm
How did you find that routine you posted?
I used FCE Debugger. I found this at the very beggining of the first stage. The main reason I'm trying to learn ASM though is to see if it'll help me be able to expand stuff, so I can fit the translations. Once I can fit the translations, it's a smooth ride.
« Last Edit: March 26, 2008, 06:46:32 pm by Rai »
RedComet
Guest
« Reply #44 on: March 26, 2008, 11:07:35 pm »

What I meant was how did you find that specific address? Did you just open the debugger up and Step Into the code? Or did you set a breakpoint?
Pages: 1 2 [3] 4  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC