News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Windhex - Sorry ... The string was not found. (Help!!!)  (Read 23717 times)

paranvoi

  • Jr. Member
  • **
  • Posts: 45
    • View Profile
Windhex - Sorry ... The string was not found. (Help!!!)
« on: February 03, 2012, 04:39:36 pm »
So I'm using Scizz's Advance Text to translate Pokémon Fire Red. Not all in-game text is editable with that program, however, so to find the rest I need to use relative searching. The program I'm using is WindHex, and I'm trying my best to follow this tutorial by Jair. But try as I might, I can't seem to find ANY in-game text. :laugh:

Okay, so in Jair's tutorial he gives this table to use when searching for words:
Quote
1 A   2 B   3 C   4 D   5 E
 6 F   7 G   8 H   9 I  10 J
11 K  12 L  13 M  14 N  15 O
16 P  17 Q  18 R  19 S  20 T
21 U  22 V  23 W  24 X  25 Y
26 Z

(that table is probably going to show up badly mutilated here but hopefully you all get the point :D )

So OK. Let's say I want to find the line "your foe is weak". Out of those 4 words I decide to go with "weak", which according to that table should be rendered 23 5 1 11. So I search for this. What happens then? :

Quote
Sorry ... The string was not found.

Okayyy...
I read in a couple other threads that the first letter of a word should be left out for some reason (???) (something about capital letters?), so, okay, fine. I'll search for "eak", in other words "5 1 11". The result:

Quote
Sorry ... The string was not found.

D: Help? Am I doing something wrong? Do I need to "make a table" first?(seen talk of making tables on here even though I don't really get what a table is...?) ?????  :-X And YES, I am making sure to click "relative search" in WindHex, not any of the others (text, hex and kana search).

EDIT: wait!!! OK, I think I figured out the table!! So in Windhex I noticed "pokemon red version" on the right side of the screen:


...and based on that I was able to come up with this table:
Quote
61 A   62 B  63 C   64 D   65 E
 66 F   67 G   68 H   69 I  6A J
6B K  6C L  6D M  6E N  6F O
70 P  71 Q  72 R  73 S  74 T
75 U  76 V  77 W  78 X  79 Y
7A Z

(lower case letters of course)

..BUT! Even using that table I still can't find anything. I tried searching for "weak" again, this time with string "77 65 61 6B" but still got the error message "the string was not found". What in the world is wrong? Also, there is no English at all visible on the right side of the screen in WindHex.. it's all garbled gibberish like "@.B..H..J.." etc D: Is it supposed to be like that? That little bit of text that I used to make that table, "pokemon red version" is literally the only English text I can see (aside from that "POKEMON FIREBEPRE" or whatever right above it)... where is all the dialogue and stuff???
« Last Edit: February 03, 2012, 04:57:16 pm by paranvoi »

Vehek

  • Full Member
  • ***
  • Posts: 175
    • View Profile
Re: Windhex - Sorry ... The string was not found. (Help!!!)
« Reply #1 on: February 03, 2012, 05:46:30 pm »
You say you're doing a relative search, but it sounds like you're doing a search for a bunch of numbers (the places of the letters in the alphabet). That's not how Windhex works. Windhex already knows where all the letters of the alphabet are in relation to each other. You do a relative search for "weak" without the quote marks, not on the numerical values of their places in the alphabet.
« Last Edit: February 03, 2012, 06:04:45 pm by Vehek »

LostTemplar

  • Hero Member
  • *****
  • Posts: 906
    • View Profile
    • au-ro-ra.net
Re: Windhex - Sorry ... The string was not found. (Help!!!)
« Reply #2 on: February 03, 2012, 06:03:46 pm »
Vehek is right. Also, what you are looking at in the screenshot is the file header (which contains the game name); this is also the reason why it's in plain ASCII (A=41... a=61... is just ASCII). It has nothing to do with the text within the game. So there are two possibilities I guess - the text within the game is not in ASCII, or it is compressed. In the latter case using a hex editor won't really work.

paranvoi

  • Jr. Member
  • **
  • Posts: 45
    • View Profile
Re: Windhex - Sorry ... The string was not found. (Help!!!)
« Reply #3 on: February 03, 2012, 07:02:54 pm »
You say you're doing a relative search, but it sounds like you're doing a search for a bunch of numbers (the places of the letters in the alphabet). That's not how Windhex works. Windhex already knows where all the letters of the alphabet are in relation to each other. You do a relative search for "weak" without the quote marks, not on the numerical values of their places in the alphabet.

... oh.  :laugh: Of course I'd go and make a mistake like that! Haha ::)

Okay, so this time I did a real relative search in the way you described.

(First of all, let me ask. Are you not able to do a relative search with spaces?? Because for example when I searched for "weak" I got 52 matches, and to lower that number I tried to search for the exact line I am looking for: "your foe is weak". But I got the "string not found" error again. And everytime I tried to search for more than one word (i.e. multiple words with spaces in between), I got that error. But if I removed the spaces and limited the search to just a single word, it worked fine. What gives?)

Anyway, I did a search for "flinched" and got 1 result:


My question is what to do from here if I want to edit that text? Furthermore, how do I expand that so that I get the entire line, not just a single word from it? The whole line should be "[insert pokémon name] flinched". No idea how to search for the slot where the pokémon name goes. Anyway, I tried the options in that drop-down menu. "Create table" opens up a table editor with tons of what I'm guessing are ASCII characters, mostly Japanese kanji. O_O Useful in that on the left side of the table is all the characters used in the game as well as their corresponding symbol (e.g a=D5, b=D6, c=D7 ... in other words my table in the first post was way off :laugh: ) but I don't really know how I would use this to permanently edit the text. ????

"Dump data" gives me the option to save something to my computer. I tried it and ended up saving some sort of file to a folder... I opened it with Notepad and inside it read: [$003FB917] flinched        | A=B5 a=D5 0=A4

"Jump to starting/ending offset" don't seem to do anything...

What do I do? :0

Ryusui

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: Windhex - Sorry ... The string was not found. (Help!!!)
« Reply #4 on: February 03, 2012, 08:16:30 pm »
(First of all, let me ask. Are you not able to do a relative search with spaces?? Because for example when I searched for "weak" I got 52 matches, and to lower that number I tried to search for the exact line I am looking for: "your foe is weak". But I got the "string not found" error again. And everytime I tried to search for more than one word (i.e. multiple words with spaces in between), I got that error. But if I removed the spaces and limited the search to just a single word, it worked fine. What gives?)

Relative search is based on the ASCII values of the characters provided. Spaces are characters. If the game's encoding scheme doesn't happen to have spaces in the exact same relative position to lowercase letters as ASCII, searching for a string with spaces won't work. You can, however, use wildcards (usually asterisks) if available. The same applies to uppercase characters.

Quote
Anyway, I did a search for "flinched" and got 1 result:


My question is what to do from here if I want to edit that text? Furthermore, how do I expand that so that I get the entire line, not just a single word from it? The whole line should be "[insert pokémon name] flinched". No idea how to search for the slot where the pokémon name goes. Anyway, I tried the options in that drop-down menu. "Create table" opens up a table editor with tons of what I'm guessing are ASCII characters, mostly Japanese kanji. O_O Useful in that on the left side of the table is all the characters used in the game as well as their corresponding symbol (e.g a=D5, b=D6, c=D7 ... in other words my table in the first post was way off :laugh: ) but I don't really know how I would use this to permanently edit the text. ????

This is going to take a while, so sit back and listen.

Yes, you need to create a table. It's easiest to do in Notepad. Now that you have the hex values corresponding to the letters in "flinched," you can make a start on one. Since we have enough letters to confirm the encoding uses alphabetical order, we can fill in the blanks easily:

Code: [Select]
AB=!
D5=a
D6=b
D7=c
D8=d
D9=e
DA=f
DB=g
DC=h
DD=i
DE=j
DF=k
E0=l
E1=m
E2=n
E3=o
E4=p
E5=q
E6=r
E7=s
E8=t
E9=u
EA=v
EB=w
EC=x
ED=y
EE=z

I threw in "AB=!" as a freebie - I've played the game myself, so I know the sentence is actually "[name] flinched!" You'll have to figure out the uppercase letters and the rest of the punctuation on your own, but they should be easy now. For things like the Pokémon name placeholder, you'll have to figure those out through context - they'll be in the strings, right where you'll expect them to be.

Anyway. The next step is to find the pointer table - the block of ROM addresses which points to the individual strings. For a GBA game, it should be easy: find the starting address of a string, convert it to little-endian format (i.e. reverse the bytes: DEADBEEF becomes EFBEADDE), then search the ROM for that particular hex value. If you do have a 32-bit (four-byte) address, only search for the last 24 bits (3 bytes) - GBA ROM addressing maps almost perfectly to the file addressing without any conversion, but the most significant bit will have 08 added to it. Once you've found the pointer table, you can use Cartographer to dump the game's script to a text file, which you can then edit and reinsert using Atlas.
In the event of a firestorm, the salad bar will remain open.

paranvoi

  • Jr. Member
  • **
  • Posts: 45
    • View Profile
Re: Windhex - Sorry ... The string was not found. (Help!!!)
« Reply #5 on: February 03, 2012, 08:44:44 pm »
Anyway. The next step is to find the pointer table - the block of ROM addresses which points to the individual strings. For a GBA game, it should be easy: find the starting address of a string, convert it to little-endian format (i.e. reverse the bytes: DEADBEEF becomes EFBEADDE), then search the ROM for that particular hex value. If you do have a 32-bit (four-byte) address, only search for the last 24 bits (3 bytes) - GBA ROM addressing maps almost perfectly to the file addressing without any conversion, but the most significant bit will have 08 added to it. Once you've found the pointer table, you can use Cartographer to dump the game's script to a text file, which you can then edit and reinsert using Atlas.

Sorry... I understood everything up until this last paragraph. Ok, so I need to find the pointer table. Got it. What do you mean by the starting address of a string? Using "flinched!" as an example. The string is DAE0DDE2D7DCD9D8AB, correct? But what is the starting address...?
Also regarding that little-endian format... when you went from DEADBEEF to EFBEADDE. For the word "DEAD" you moved the characters one letter ahead in the alphabet (e.g. D>E), but with "BEEF" you moved them one letter back (e.g. B>A). I'm confused...?
And what do you mean by 32-bit address? What address?
Could you also explain exactly what a pointer table is? Do you just mean a table where all the characters used in-game and their corresponding values are provided? At least when I click "create table with selected values" I get this window:



Seems like the table is already there made for me? That's not the pointer table, is it?

You'll have to excuse my stupid questions. Totally new to this but willing to learn!

edit: Well one inconsistency I noticed with that table in that screenshot is that "!" is attributed to value 95, whereas when I did that search for "flinched!" there's clearly an AB after the string for "flinched". AB in the table editor however is assigned to the number 7. :\ But those lowercase letters (like a=D5 etc.) match up fine! Confusing....

Ryusui

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: Windhex - Sorry ... The string was not found. (Help!!!)
« Reply #6 on: February 03, 2012, 09:13:45 pm »
Okay, computer math time.

Each hex code is one byte. Each byte is eight bits. So when I say "a 16-bit value," that's the same as saying a "two-byte value." 24 bits is three bytes, 32 bits is four bytes, and so on.

GBA uses little-endian values - the least-significant byte comes first. So DEADBEEF - that's DE AD BE EF - becomes EF BE AD DE; that is, the four bytes comprising the number are reversed.

Anyways, would the term "address" make any more sense to you if I said "memory offset" instead? In the screenshot, you've got the byte at file address 3FB917 highlighted; the GBA would map that to 083FB917. However, since it uses little-endian formatting, it would be stored internally as 17B93F08. That's what I meant when I said "if you have a 32-bit address, it'll be easier to search for the last 24 bits" (that is, if the data were at DEADBEEF in the ROM, you should search for just ADBEEF, or EFBEAD).

To reiterate: the pointer table is a list of all the starting addresses. It is different from the encoding table that tells the hex editor and script dumper how to convert the game's hex into human-readable text. It will be stored somewhere in the ROM, and if you want to edit the game's text, you'll need to locate it so you can either 1. modify it by hand (insanely tedious) or 2. tell Atlas how to modify it for you when you reinsert the script.

The table that WindHex has generated for you automatically is, again, based off of the assumption that the game uses an encoding analogous to ASCII - that is, it's wrong and should be ignored altogether. Seriously, it's easier to just type up the damn thing in Notepad than fiddle with WindHex. Make the partial table using the information you have, load it into WindHex, and you should be able to figure out more.
In the event of a firestorm, the salad bar will remain open.

paranvoi

  • Jr. Member
  • **
  • Posts: 45
    • View Profile
Re: Windhex - Sorry ... The string was not found. (Help!!!)
« Reply #7 on: February 04, 2012, 01:29:56 am »
Okay Ryusui, I've followed your instructions carefully. :) I think I made some progress...

Well first of all I've advanced a little with the table... this is what I have so far:
Code: [Select]
94=
95=
96=
97=
98=
99=
9A=
9B=
9C=
9D=
9E=
9F=
A0=
A1=0
A2=1
A3=2
A4=3
A5=4
A6=5
A7=6
A8=7
A9=8
AA=9
AB=!
AC=?
AD=.
AE=
AF=
B0=
B1=
B2=
B3=
B4=
B5=
B6=
B7=
B8=, (comma)
B9=’ (apostrophe)
BA=
BB=A
BC=B
BD=C
BE=D
BF=E
C0=F
C1=G
C2=H
C3=I
C4=J
C5=K
C6=L
C7=M
C8=N
C9=O
C0=
C1=
C2=
C3=
C4=
C5=
C6=
C7=
C8=
C9=
CA=P
CB=Q
CC=R
CD=S
CE=T
CF=U
D0=V
D1=W
D2=X
D3=Y
D4=Z
D5=a
D6=b
D7=c
D8=d
D9=e
DA=f
DB=g
DC=h
DD=i
DE=j
DF=k
E0=l
E1=m
E2=n
E3=o
E4=p
E5=q
E6=r
E7=s
E8=t
E9=u
EA=v
EB=w
EC=x
ED=y
EE=z
EF=
F0=
F1=
F2=

Couple questions regarding that though. Is it absolutely necessary to find the corresponding character for every single one of those values? I mean, in the table editor it shows a lot of symbols like # and + that never once show up in the game, to my knowledge. Is it absolutely necessary to find out what value such characters correspond to?

Also, is it okay to add new values to my table? The values I quoted above are just what were listed in the table editor. But for example I've noticed that space is 00. Also either FB or FF (seen both) seem to be acting as some kind of line breaker. And the é in POKéMON corresponds to value 1B which also isn't in the table editor.

Basically I'm asking how much of the table do I actually need to fill in?

Next up, I tried hex searching based on the instructions you gave. First I tried with the 083FB917 -string that you listed for "flinched!" which gave me the "string was not found" error. So I tried with a different word. I did a relative search for "aquatic" and found its address to be 1922E6. I add 08- to the beginning and get 081922E6. Then with little endian-formatting I get 1908E622. When I search for this hex: "Sorry ... The string was not found". And yes I am selecting "hex search" and not "relative search".

Also, tell me please, if the pointer table is the list of all the starting addresses, does this mean I have to manually find the starting address for every word in the game? And what exactly does it mean to find the pointer table? Do I copy all of the starting addresses I find to a notepad document and just keep collecting them until I have them all...? Still a bit confused really as to what this pointer table thing actually is...

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 6860
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Windhex - Sorry ... The string was not found. (Help!!!)
« Reply #8 on: February 04, 2012, 01:44:07 am »
I add 08- to the beginning and get 081922E6. Then with little endian-formatting I get 1908E622.
The 32-bit little-endian value would be E6 22 19 08.
"My watch says 30 chickens" Google, 2018

paranvoi

  • Jr. Member
  • **
  • Posts: 45
    • View Profile
Re: Windhex - Sorry ... The string was not found. (Help!!!)
« Reply #9 on: February 04, 2012, 10:14:44 am »
The 32-bit little-endian value would be E6 22 19 08.

Still not working. I tried E6221908 and got the "string not found" message. I then tried that same value with spaces (E6 22 19 08) and then asterisks (E6*22*19*08) (with "use * for wildcards" checked) and both gave me a message "hex string is missing one digit". And again, I am selecting "hex search" and not "relative search".

Help? D:

Ryusui

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: Windhex - Sorry ... The string was not found. (Help!!!)
« Reply #10 on: February 04, 2012, 11:28:41 am »
The pointer table is a big directory of every single string the game uses. The fun part is, if you find one pointer, odds are you've found them all - they should be collected in a neat, if massive, block. Once you've found it, you'll need to find its start and end addresses (that is, the addresses of the first and last bytes of the pointer table), so you can feed that information into Cartographer.

I said it once and I'll say it again: FORGET WINDHEX'S TABLE EDITOR. It's easier to just type the thing out manually in Notepad, or whatever plain text editor you prefer.

Now. Yes, not all hex codes represent characters - that should have been obvious already. Some are control codes which handle formatting, like line breaks. The most important one you need to figure out is the end code, which looks to be either FF or FFFD - I can't be sure without more context (in a similar vein, I can't figure out if the "Pokémon name" code should be FD0F or just 0F).

When I say "the start address of a string," I don't mean "the start address of just any plain old word" - what use is "flinched!" to the game? You need the whole string, which includes the placeholder code. The actual start of the "X flinched!" string should be either 3FB914 or 3FB915 - again, I don't know whether the placeholder code is FD0F or just 0F, so be sure to try both.
In the event of a firestorm, the salad bar will remain open.

paranvoi

  • Jr. Member
  • **
  • Posts: 45
    • View Profile
Re: Windhex - Sorry ... The string was not found. (Help!!!)
« Reply #11 on: February 04, 2012, 11:44:13 am »
When I say "the start address of a string," I don't mean "the start address of just any plain old word" - what use is "flinched!" to the game? You need the whole string, which includes the placeholder code. The actual start of the "X flinched!" string should be either 3FB914 or 3FB915 - again, I don't know whether the placeholder code is FD0F or just 0F, so be sure to try both.

I see! So, when I do a hex search, I need the address of the start of the sentence, not just a single word in the sentence, correct? I'm guessing that's how you got 3FB914 and 3FB915 from 3FB917 ; you just moved the final digit back to accomodate for the "pokemon name" code, which is either going to be 1-2 bytes (+ the space in between, which is another byte). Got it!

I converted 3FB914 to little-endian and got 14B93F08. Did a hex search and got a match! I tried the same with 15B93F08 and got an error message, so 14B93F08 should be right. I guess that also means the pokémon name code is FD0F and not just 0F, right?

Anyway, here's what the hex search returned:


Now, how do I read this result? I mean, what do I do with it?

Ryusui

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: Windhex - Sorry ... The string was not found. (Help!!!)
« Reply #12 on: February 04, 2012, 01:04:27 pm »
High five, man. That's the pointer table.

Now, like I said before, the pointer table tells the game where to look for each of its myriad strings. You might have figured this out already, but by default, you're restricted to however much space each original string had allotted to it - for example, you could change the string to "[NAME] winced!" (which is shorter) but not "[NAME] was momentarily cowed by the blow!" (which is much longer). But knowing where the pointer table is allows us to change that - by changing it. If we need more space for a string, we can tweak the string pointers so we have more space to work with. On GBA, we can even go as far as to relocate the entire script block if we need to, since the pointers can indicate any location in the ROM.

There are two ways you can go about this.

1. The manual approach: ferret out every single pointer and change them by hand as necessary. If you plan on changing the entire game's script, THIS. IS. MADNESS.

2. The automatic approach: dump the script with Cartographer and reinsert it with Atlas. Atlas can automatically change the pointers as necessary, though it needs special formatting to do so. Cartographer can actually be set up to insert that formatting while it dumps the script, though you'll need the start and end addresses of the pointer table.

So yeah. #2 requires a lot more effort to set up, but it'll save you ten times as much tedium in the long run.
In the event of a firestorm, the salad bar will remain open.

paranvoi

  • Jr. Member
  • **
  • Posts: 45
    • View Profile
Re: Windhex - Sorry ... The string was not found. (Help!!!)
« Reply #13 on: February 04, 2012, 01:46:24 pm »
Oh great! I found the pointer table, excellent!

You said in an earlier post that the step to take after finding the pointer table is to dump the script using cartographer. But... how? Okay, you said I need the start and end addresses of the pointer table. How do I know where the pointer table starts and where it ends, though? Because it WindHex it looks huge, I can't make heads or tails out of where it starts and where it stops.

Ryusui

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: Windhex - Sorry ... The string was not found. (Help!!!)
« Reply #14 on: February 04, 2012, 02:49:22 pm »
Believe me, it stops eventually. See the pattern? "XX XX XX 08" over and over? Scroll up until it stops. That's the start of the pointer table. Now scroll down until it stops. That's the end.

Okay. Now, when you download Cartographer, it's already got an example setup: a command file, which tells Cartographer what to dump and how, a table file, and a batch file that automates the dumping process. All are set up with the original Final Fantasy for NES in mind. You'll need to create a command file for FireRed.

Here's a sample I created for Breath of Fire for GBA.

Code: [Select]
#GAME NAME: Breath of Fire (GBA)

#BLOCK NAME: Credits
#TYPE: NORMAL
#METHOD: POINTER_RELATIVE
#POINTER ENDIAN: LITTLE
#POINTER TABLE START: $FDD40
#POINTER TABLE STOP: $FDE08
#POINTER SIZE: $03
#POINTER SPACE: $01
#ATLAS PTRS: Yes
#BASE POINTER: $00
#TABLE: bof1e_dump.tbl
#COMMENTS: Yes
#END BLOCK

Now, since this is for a GBA game, it's already set up to recognize GBA pointers - you just need to change the game name, set the start and end of the pointer table to their appropriate values, and change the table file. "Atlas Ptrs" will automatically insert the formatting Atlas needs to update the pointers, and "Comments" will comment out the script - that way, you'll have the original English script for reference without having to delete or overwrite it.

You'll also need to add some extra formatting to the file to make Atlas recognize it, mind. Here's another BoF1 sample:

Code: [Select]
#VAR(MyTable, TABLE)
#ADDTBL("bof1e.tbl", MyTable)
#ACTIVETBL(MyTable)
#JMP($3A0000)

Again, you'll need to change the table file to whatever's appropriate, and change the address in the #JMP instruction to the start of the script block (or wherever you want to insert your script).

Finally, Cartographer and Atlas are both command-line programs - you'll need to run them from a command prompt. You can automate the process a bit with batch files, however. Cartographer comes with one you can customize: right-click on Cartographer.bat and select "edit" in order to modify the batch file to your liking. For Atlas, you'll probably need to create one, but the usage is simple:

Code: [Select]
atlas rom.gba script.txt
Just replace "rom.gba" and "script.txt" with the appropriate filenames. To make a batch file of this, type the command up in Notepad and save the file with a .bat extension.
In the event of a firestorm, the salad bar will remain open.

paranvoi

  • Jr. Member
  • **
  • Posts: 45
    • View Profile
Re: Windhex - Sorry ... The string was not found. (Help!!!)
« Reply #15 on: February 04, 2012, 04:01:15 pm »
Okay!

I think I found the start and end of the pointer table:


(turns out kinda small in this post, here's the direct link: http://i1.aijaa.com/b/00705/9502389.jpg)

In other words, the table starts at 003FDF40 and ends at 003FE500. Based on the example command file you posted, I made this. I wasn't sure if the 00 at the beginning of those strings needed to be removed, or if the dollar sign you have at the beginning of your strings needs to be added or not, but this is what I came up with:

Code: [Select]
#GAME NAME: Pokemon - Fire Red.GBA

#BLOCK NAME: Credits
#TYPE: NORMAL
#METHOD: POINTER_RELATIVE
#POINTER ENDIAN: LITTLE
#POINTER TABLE START: $3FDF40
#POINTER TABLE STOP: $3FE500
#POINTER SIZE: $03
#POINTER SPACE: $01
#ATLAS PTRS: Yes
#BASE POINTER: $00
#TABLE: bof1e_dump.tbl
#COMMENTS: Yes
#END BLOCK

Nothing else needs to be changed then? Pointer size, pointer space, etc?

Regarding that extra formatting you also posted, where does that go? I'm guessing it needs to come in between #COMMENTS and #END BLOCK, like this maybe? :

Code: [Select]
#GAME NAME: Pokemon - Fire Red.GBA

#BLOCK NAME: Credits
#TYPE: NORMAL
#METHOD: POINTER_RELATIVE
#POINTER ENDIAN: LITTLE
#POINTER TABLE START: $3FDF40
#POINTER TABLE STOP: $3FE500
#POINTER SIZE: $03
#POINTER SPACE: $01
#ATLAS PTRS: Yes
#BASE POINTER: $00
#TABLE: bof1e_dump.tbl
#COMMENTS: Yes

#VAR(MyTable, TABLE)
#ADDTBL("bof1e.tbl", MyTable)
#ACTIVETBL(MyTable)
#JMP($3A0000)

#END BLOCK

Also, I was reading another thread where you were helping someone do this same exact thing, and you said something about making sure to include the symbol "/" somewhere, because otherwise Cartographer won't know when to stop dumping the script, my computer will slow to a crawl and I'll end up with a gigantic text file etc. Is that backslash important here in any way?

edit: Okay, I missed the part in your post where you said the values in this part:
Code: [Select]
#VAR(MyTable, TABLE)
#ADDTBL("bof1e.tbl", MyTable)
#ACTIVETBL(MyTable)
#JMP($3A0000)

...also need to be edited. I'm guessing for #ADDTBL I need to include the script table that I make in Note Pad? What goes next to #VAR and #ACTIVETBL, then? And is the string that goes into #JMP the same as the starting string for the pointer table?

And again, regarding the actual text table. Is it okay to have an incomplete table like the one I posted on the first page, or is it imperative that I find the corresponding value for every single character used in the game?
« Last Edit: February 04, 2012, 04:15:11 pm by paranvoi »

Ryusui

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: Windhex - Sorry ... The string was not found. (Help!!!)
« Reply #16 on: February 04, 2012, 04:25:17 pm »
Pay a bit closer attention. The start of the pointer table is actually on the line above, at 3FDF3C. The end is at 3FE514. (Also, you'll want to change the "Block Name" to something appropriate, like "Script". Not strictly necessary, but just letting you know.) You were close, mind, but you'd be missing a couple of strings if you dumped using those erroneously rounded addresses.

That last bit of formatting I mentioned doesn't go in the command file - it goes at the top of your script file, after you've dumped it. Now, it looks to me as though the pointers are in consecutive order, so if I'm right, you'll want to change the address in the #JMP instruction to 3FB219 (and yes, the dollar signs are important).

As for your last question, I double-checked, and your "end line" character should be marked with a forward slash so that Cartographer recognizes it as such. From the looks of things, that'd be FF, so your table file should include:

Code: [Select]
/FF=<END>
"<END>" is just an example - if you'd prefer some other marker, feel free to change it to whatever suits your fancy. Also, be sure to change the table file entry in the command file to the filename of your table file. You did complete the table file, right? Be sure to view the script in the hex editor using your table: if any known text characters show up blank in the right-hand side, then you're not done.
In the event of a firestorm, the salad bar will remain open.

Normmatt

  • Full Member
  • ***
  • Posts: 139
    • View Profile
Re: Windhex - Sorry ... The string was not found. (Help!!!)
« Reply #17 on: February 04, 2012, 06:22:43 pm »
Code: [Select]
#GAME NAME: Breath of Fire (GBA)

#BLOCK NAME: Credits
#TYPE: NORMAL
#METHOD: POINTER_RELATIVE
#POINTER ENDIAN: LITTLE
#POINTER TABLE START: $FDD40
#POINTER TABLE STOP: $FDE08
#POINTER SIZE: $03
#POINTER SPACE: $01
#ATLAS PTRS: Yes
#BASE POINTER: $00
#TABLE: bof1e_dump.tbl
#COMMENTS: Yes
#END BLOCK

Your code only works on GBA games where the strings are within the first 16MB of the rom

you should be using:

Code: [Select]
#POINTER SIZE: $04
#POINTER SPACE: $00
#BASE POINTER: $F8000000

instead as it allows you to dump from anywhere within the whole 32MB GBA rom area.

Ryusui

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: Windhex - Sorry ... The string was not found. (Help!!!)
« Reply #18 on: February 04, 2012, 07:01:25 pm »
Okay, thanks! :3
In the event of a firestorm, the salad bar will remain open.

paranvoi

  • Jr. Member
  • **
  • Posts: 45
    • View Profile
Re: Windhex - Sorry ... The string was not found. (Help!!!)
« Reply #19 on: February 05, 2012, 11:25:28 am »
Okay, I just tried dumping the script with Cartographer and it didn't work. Cartographer opened and closed instantly (I know it's supposed to do that) and didn't create any file or anything with the text in it.

Before I get into that, where did you get the start address 3FDF3C? I can understand 3FE514 because you just counted 4 to the right, but where did the C in the start address come from?

Here's the command file I made for Fire Red, based on you guys's instructions:

Code: [Select]
#GAME NAME: Pokemon - Fire Red.GBA

#BLOCK NAME: Script
#TYPE: NORMAL
#METHOD: POINTER_RELATIVE
#POINTER ENDIAN: LITTLE
#POINTER TABLE START: $3FDF3C
#POINTER TABLE STOP: $3FE514
#POINTER SIZE: $04
#POINTER SPACE: $00
#ATLAS PTRS: Yes
#BASE POINTER: $F8000000
#TABLE: table.tbl
#COMMENTS: Yes

/FF=<END>

#END BLOCK

(wasn't sure where to put the /FF=<END>)

I then edited the .bat file in this way:
Code: [Select]
cartographer firered.GBA firered_commands.txt firered_script -m

pause

I wasn't sure about that "firered_script -m" part... it was originally "ff1_script -m" and I just changed the "ff1" to "fire red". There was no ff1_script.txt or any file like that in the folder so I assumed that whatever I put there doesn't actually have to correspond to any actual file. ?

I have both the ROM and the .tbl table file in the same folder as Cartographer.