Author
|
Topic: SNES Text Trans help - text dumping (newbie) (Read 2 times)
|
MontyMole
Guest
|
|
« Reply #30 on: January 20, 2009, 11:10:44 am » |
|
You should also familiarize yourself with this. Applies to Vista, too.
cYa,
Tauwasser Cool thanks for that, now I've got Japanese language support. ã‚ã„ã†ãˆãŠ test.
|
|
|
|
vx
Guest
|
|
« Reply #31 on: January 21, 2009, 12:38:59 am » |
|
I'm having trouble in locating the pointers for this SNES ROM, it is LoROM/SlowROM so Xcalibur's Pointer Doc's process should work, but I am stumped.
ROM: Ultra Baseball Jitsumeiban (J).smc
Thanks KaioShin, that explains the pointers that ROMs use, I think I got it now.
Unfortunately the pointer doc doesn't specify exactly what text bytes are the start (could be the first or last bytes) so I tested with both - though after carefully reading I believe it is the last bytes' offset.
My example:
Text: ヘoナント Hex: AC5FA4BDA3 Offset (AC): 6E63 Offset (A3): 6E67
I then subtract the SNES header, which is 200 and add 8000 since the hex is not between 8k and FFFF:
Pointer (AC): EC63 (63EC) Pointer (A3): EC67 (67EC)
Neither of these are the pointers, I even take it a step further and tried it w/o the 8000 and tested multiple strings...I can't seem to find it. Unfortunately I haven't found any documents that discuss SNES Pointers.
The doc states that the end bytes maybe different making it very difficult to find, so I did a test by a "replace all" to see if the bytes are found and no such luck...guess I am doing something wrong?
|
|
|
|
RedComet
Guest
|
|
« Reply #32 on: January 21, 2009, 07:19:08 am » |
|
Do yourself and your translator a favor and add a 2 byte entry in your table to dump 㺠and the others correctly.
|
|
|
|
vx
Guest
|
|
« Reply #33 on: January 21, 2009, 01:05:37 pm » |
|
Do yourself and your translator a favor and add a 2 byte entry in your table to dump 㺠and the others correctly. It's a seperate character (byte) in that font system so it's written wrong in the table (o=5F), the hex values are correct though. Unfortunatly that's not the problem :'(
|
|
|
|
RedComet
Guest
|
|
« Reply #34 on: January 21, 2009, 01:41:17 pm » |
|
Do yourself and your translator a favor and add a 2 byte entry in your table to dump 㺠and the others correctly. It's a seperate character (byte) in that font system so it's written wrong in the table (o=5F), the hex values are correct though. Unfortunatly that's not the problem :'( So? Say you have ã¸=43 in your table. Add ãº=435F and you'll get a script dump that won't make a translator want to gouge their eyes out with a spoon. EDIT: Are you even sure your rom HAS a header? Open it up in a hex editor and jump to the end of the file. Does the address end with $200? If not, it doesn't have a header.
|
|
|
|
vx
Guest
|
|
« Reply #35 on: January 21, 2009, 02:01:56 pm » |
|
Do yourself and your translator a favor and add a 2 byte entry in your table to dump 㺠and the others correctly. It's a separate character (byte) in that font system so it's written wrong in the table (o=5F), the hex values are correct though. Unfortunately that's not the problem :'( So? Say you have ã¸=43 in your table. Add ãº=435F and you'll get a script dump that won't make a translator want to gouge their eyes out with a spoon. EDIT: Are you even sure your rom HAS a header? Open it up in a hex editor and jump to the end of the file. Does the address end with $200? If not, it doesn't have a header. A big thanks RedComet for the help, I appreciate it Ah OK I see, yes it works now searching for the text, text searching wasn't working on that charcater Not sure what you mean by the address $200? The last byte's offset is: 0007FFFF I found the pointer table, it was directly above the text as described...the question is how do I calculate it? Here's some samples: Text 9482AB5FBDFF Pointer 5DEE Text AC5FA4BDA3FF Pointer 63EE Text 93A25E69C3A3FF Pointer 69EE It could be the ROM doesn't have a header, it does use control codes (FF Line Break) I did try to calculate that, I can also try it w/o the header (-200) could it have a smaller header??
|
|
|
|
KingMike
Guest
|
|
« Reply #36 on: January 21, 2009, 02:13:16 pm » |
|
Sounds like the ROM doesn't have a header, so don't subtract for the header.
|
|
|
|
RedComet
Guest
|
|
« Reply #37 on: January 21, 2009, 03:02:18 pm » |
|
Compare the pointer and the address of the string:
The pointer is $63EE for the string at $6E63. First flip your pointer bytes around: $EE63. Okay, now just subtract the string address form this pointer value:
$EE63 - $6E63 = $8000
So add $8000 to each string address before you flip the bytes to calculate your pointer, or subtract $8000 from your pointer after you've flipped the bytes to calculate the string address.
Not much else to it really.
|
|
|
|
vx
Guest
|
|
« Reply #38 on: January 23, 2009, 02:11:43 am » |
|
Compare the pointer and the address of the string:
The pointer is $63EE for the string at $6E63. First flip your pointer bytes around: $EE63. Okay, now just subtract the string address form this pointer value:
$EE63 - $6E63 = $8000
So add $8000 to each string address before you flip the bytes to calculate your pointer, or subtract $8000 from your pointer after you've flipped the bytes to calculate the string address.
Not much else to it really.
A BIG thanks RedComet for teaching me about pointers and how to calculate them. FYI for this header it is actually: 7FFB 63EE EE63-6E68 = 7FFB, my old post was wrong bytes as I wasn't counting the control codes (FF) I guess I have to? Anyway at least now I know what to do and should be OK :woot!:
|
|
|
|
Tauwasser
Guest
|
|
« Reply #39 on: January 23, 2009, 09:48:17 am » |
|
Pointers still point to the beginning of stings, not the ends, so 0x8000 is correct. Everything else would not work either way with real hardware.
cYa,
Tauwasser
|
|
|
|
vx
Guest
|
|
« Reply #40 on: January 23, 2009, 10:51:50 pm » |
|
Pointers still point to the beginning of stings, not the ends, so 0x8000 is correct. Everything else would not work either way with real hardware.
cYa,
Tauwasser
Thanks again Tauwasser just to verify it is +8000 and the first byte, I guess I miscalculated. \ What is the best (easiest) way to translate the text? Should I dump it all w/ WinDhex? If so not sure how to do that yet. A lot of the text doesn't have enough chracters, sure I change pointers but can I add text to an SNES rom to make it easier? Like at the end of the ROM?
|
|
|
|
InVerse
Guest
|
|
« Reply #41 on: January 24, 2009, 09:21:24 am » |
|
What is the best (easiest) way to translate the text? Should I dump it all w/ WinDhex? If so not sure how to do that yet. A lot of the text doesn't have enough chracters, sure I change pointers but can I add text to an SNES rom to make it easier? Like at the end of the ROM?
How much text are you dealing with? If it's only a few screens, it might be easiest to do the editing directly in WindHex. Otherwise, you could dump it (I haven't used WindHex's dumping feature, most of my dumping experience comes with ROM Juice. There's also Cartographer.) As for making room for more text.... I think it is possible to add space to the end of a SNES ROM as long as your pointers are able to access that space. (This will depend on the size of your pointers and the size of the ROM.) (Note: I have very little experience with SNES hacking, this is primarily going off of memory from reading various threads.) You may need to ensure that the final file size fits into a particular "group", though I'm not sure if this is necessary with SNES. (Look at NES ROMs, for instance, and you'll see that almost all file sizes are a power of 2.) First, however, you should look through your ROM for big banks of blank space, primarily as a bunch of 00s or FFs in a row. If you can find one or more of these, you can move some (or all) of your text there. Also, keep in mind that you don't have to move all of the text to the same place. If you can find an empty bank big enough to hold half of your new text, don't forget that you can now use the space where that text originally was to hold the text that was left over. (To give a slightly more concrete explanation, let's say you had 50K of original text but your translated text is 100K. If you can find an empty bank that is 50K in size, you could then move the last half of your translated text to that empty bank, which frees up it's original space into which you can expand the first half of the text from it's original location.)
|
|
|
|
vx
Guest
|
|
« Reply #42 on: January 24, 2009, 09:47:04 pm » |
|
A big thanks once again Inverse, I wasn't sure if the FF's were unused space, so that allowed me to use some extra needed lines to get the text in order. Alas, a new problem has risen...I guess this game uses DTE compression? If that's what it is...I have one pointer that controls multiple menu text, which is fine if it's Japanese but doesn't work in English...unless I screwed that up a ways back, kind of too late now. Is there anyway to find the section that is using the pointer and change what pointer it uses? As an example so everyone understands a pointer will point to: LAYBALL and I can make that text work in one place "PLAYBALL" but in other places it has to be removed or changed as it is out of place
|
|
|
|
InVerse
Guest
|
|
« Reply #43 on: January 24, 2009, 10:05:08 pm » |
|
I'm not quite sure I'm understanding you at this point.... (I'm thinking it may be a mixing up of terms, but I could just be misunderstanding the situation altogether.)
When you say you have a pointer that points to LAYBALL (and you did mean to spell it that way, right, not simply leaving off the P?) what do you mean? They way you're describing it almost sounds like you're saying there's a control code byte that prints out LAYBALL when entered, but maybe I'm just misunderstanding. (If my understanding is correct, you're talking about dictionary compression, in which a single byte references an entire word.)
If that's not correct, can you provide some more information, such as the location/value of the pointer you're referring to an example of where it is and isn't working?
|
|
|
|
vx
Guest
|
|
« Reply #44 on: January 24, 2009, 10:49:54 pm » |
|
EDIT:
I was able to resolve this issue by adjusting some control codes and pointers, just try and error...anyway I think I resolved this for now.
============
Sorry InVerse I meant to say it sounds like "Dictionary" compression not DTE...was a little tired when I wrote that. I hope that explains it?
MENU 1
PLAYBALL => P will be one string uses it's own pointer, LAYBALL will be another string using a different pointer. We'll call it Pointer A and Pointer B.
MENU 2
uses parts of the same text as menu 1, and Pointer B. It actually uses the middle of the sentence LAYBALL. Any way around this?
Hope that explains it.
|
|
« Last Edit: January 25, 2009, 02:28:05 am by vx »
|
|
|
|
|