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

Author Topic: For the life of me I cannot figure out how to script dump  (Read 6728 times)

shadowdorothy

  • Jr. Member
  • **
  • Posts: 29
    • View Profile
For the life of me I cannot figure out how to script dump
« on: January 21, 2015, 10:51:52 pm »
Ok so as the title says I cannot figure out how to script dump. I can write a table, mess with a roms data and change some text, put can't dump that text for the life of me.  :banghead: It should not be this hard, but I just can't figure it out.

And whenever I do manage to dump a raw script it's usually garbage.  :(

I don't know. Maybe a little encouragement and a friendly helping hand or stories of your own frustrations would be nice.

Seihen

  • Sr. Member
  • ****
  • Posts: 404
    • View Profile
Re: For the life of me I cannot figure out how to script dump
« Reply #1 on: January 22, 2015, 01:12:20 am »
It would be immensely helpful if you could provide:
  • What software you're using.
  • What is going wrong.
  • What you've tried.

Otherwise, it's really hard to help without knowing anything further.

shadowdorothy

  • Jr. Member
  • **
  • Posts: 29
    • View Profile
Re: For the life of me I cannot figure out how to script dump
« Reply #2 on: January 22, 2015, 01:55:22 am »
1. Using hexacute. Kruptar won't let me import roms atm. Read my table just fine though.
2. What isn't going wrong? Hexacute seems to hate windows 7. Last time you used me I was in Japanese? Guess I should crash when you open me. Changed the language before opening anything? I'm gonna crash. This has been the last 24 hours with Hexacute. Starts in Japanese mode, switch to default mode, open a rom and it crashes. And when I do get it to work problem 3 happens.
3. Open the rom, then the tbl file, which at this point only contains English, symbols such as $ and #, katakana and hiragana. Select script dump starting at 000000000 ending at the very end of the rom. Try to save as (game name).txt Dumps fine.

Maybe I should use a different file extension, but after it's dumped I either get gibberish that looks like something from chutulhuian mythos or text pad crashes. I know my table isn't perfect, missing Kanji and all, but I've never had this much trouble dumping scripts.

Seihen

  • Sr. Member
  • ****
  • Posts: 404
    • View Profile
Re: For the life of me I cannot figure out how to script dump
« Reply #3 on: January 22, 2015, 04:31:14 am »

3. Open the rom, then the tbl file, which at this point only contains English, symbols such as $ and #, katakana and hiragana. Select script dump starting at 000000000 ending at the very end of the rom. Try to save as (game name).txt Dumps fine.

Maybe I should use a different file extension, but after it's dumped I either get gibberish that looks like something from chutulhuian mythos or text pad crashes. I know my table isn't perfect, missing Kanji and all, but I've never had this much trouble dumping scripts.

Well, I don't know what system you're trying to edit or roms you're working with, but doing a script dump from the very beginning sounds like you're asking for trouble. It's going to turn your file into a mound of mismatches and blobs, and you're going to end up with a really large file (depending on the rom). Let's say it's GBA, for fun, and you could have a text dump several megabytes in length. Text editors don't always handle such large files all that well.

As for the gibberish, well, the entire file isn't all readable text, so the fact that you'd get some gibberish is to be expected. If you're not seeing Japanese symbols, though, then it could be that your text file isn't being opened with the right encoding (SJIS or UTF).

Those are just the issues coming off the top of my head. First off, you might want to try to find WHERE the text is and dump that location.

shadowdorothy

  • Jr. Member
  • **
  • Posts: 29
    • View Profile
Re: For the life of me I cannot figure out how to script dump
« Reply #4 on: January 22, 2015, 05:38:48 am »
I am dumping a GBA rom, Super Robot Taisen D, but it's all of 10mb. I'm also seeing all gibberish, no Japanese or English characters at all.

I've only ever worked with gb and nes roms until recently. If you dumped all that text you got all of maybe 15-30kb in a text file. Guess it never occurred to me the file would be too large.  :-[

Well then, how does one go about finding pointers for when the story mode starts and such? I can find the last line in the rom before the blank space at the end easily enough, as that's where I was stopping the text dump.

BlackDog61

  • Hero Member
  • *****
  • Posts: 784
    • View Profile
    • Super Robot Wars A Portable translation thread
Re: For the life of me I cannot figure out how to script dump
« Reply #5 on: January 22, 2015, 02:12:22 pm »
Hello

I don't know if I'm right but it sounds like you haven't fully read the Getting Started section. I'd suggest you head there and take your time until you are familiar with the concept of tables.

What I think I read here is: you are missing the step where you try and figure out the table for the game.GBA games don't necessarily use standard encodings, so chances are high that you'll need a table.

A quick note that, in case I was incorrect here, you could look for SJIS-encoded text with sjis_dump.

Alternatively you could try and use a debugger to find where text is, working backwards from graphics. But that's a more complex method and I'd recommend you try the easy path first.

Jorpho

  • Hero Member
  • *****
  • Posts: 4677
  • The cat screams with the voice of a man.
    • View Profile
Re: For the life of me I cannot figure out how to script dump
« Reply #6 on: January 23, 2015, 01:08:45 am »
It should not be this hard
What gave you that idea?  If it was easy, someone probably would have done it already, considering the popularity of the series.  I agree that there is not necessarily any basis for the conclusion that all the text should just be sitting there decompressed in plaintext Shift-JIS; it could just as easily be compressed and in an entirely different encoding.

It may be helpful to note that there's a debug menu, if you didn't know already.
This signature is an illusion and is a trap devised by Satan. Go ahead dauntlessly! Make rapid progres!

SunGodPortal

  • Hero Member
  • *****
  • Posts: 2919
  • 2 + 2 = 5
    • View Profile
Re: For the life of me I cannot figure out how to script dump
« Reply #7 on: January 23, 2015, 02:25:32 am »
Quote
Didn't Chrono Trigger have four levels of Ether (despite a 99 MP max? :P) 10, 30, 60, full?

Yes. (SNES names)
Ether 10
Mid Ether 30
Full Ether 60
Hyper Ether full restore

EDIT: Wow. That was strange. My reply ended up in the wrong thread. Probably my mistake. Sorry.
Cigarettes, ice-cream, figurines of the Virgin Mary...

shadowdorothy

  • Jr. Member
  • **
  • Posts: 29
    • View Profile
Re: For the life of me I cannot figure out how to script dump
« Reply #8 on: January 23, 2015, 03:01:31 am »
Hey BlackDog61. I read the getting started guide, but am still confused about pointers. It's one thing to know where you want the pointer to point to, it's another thing entirely trying to figure that out. I was not aware about the debugging menu, so that will be immensely helpful. And I have a table, just not a complete table. I have all Alpha numeric characters and symbols, katakana and hiragana, but no kanji atm.

I'm not sure what SJIS encoding is, so I will look that up and figure it out.

Seihen

  • Sr. Member
  • ****
  • Posts: 404
    • View Profile
Re: For the life of me I cannot figure out how to script dump
« Reply #9 on: January 23, 2015, 03:26:20 am »
And I have a table, just not a complete table. I have all Alpha numeric characters and symbols, katakana and hiragana, but no kanji atm.

And this leads us to another important questions: how did you make this table, are you sure that this table is correct for the game, and if so, why not try dumping the area where you found such text in the rom?

shadowdorothy

  • Jr. Member
  • **
  • Posts: 29
    • View Profile
Re: For the life of me I cannot figure out how to script dump
« Reply #10 on: January 23, 2015, 05:12:53 am »
Perhaps the values aren't right, but this is what I did. Open rom in hexacute, switch to Japanese, and copy the hex values into a txt file with the corresponding English values. Oddly enough towards the end of the rom English characters and alphanumeric characters where in order. 0.1.2.3 ... A.B.C and so on. Japanese characters where not in order on the other hand. I figured with the way the English characters where displayed towards the end of the rom that those where the correct values.

After I copied it into text pad I saved the file with the .tbl extension. Searched the rom for katakana and hiragana values and copied them into my table file. After that I loaded it up into hexacute and dumped the script.

For now I'm going to try that SJIS program and see if I can figure it out.

henke37

  • Hero Member
  • *****
  • Posts: 643
    • View Profile
Re: For the life of me I cannot figure out how to script dump
« Reply #11 on: January 23, 2015, 11:23:55 am »
So your entire argument is that you stumbled upon some data that when decoded in a presumably ascii like encoding happens to result in showing the letters of the alphabet in order?  :banghead:

BlackDog61

  • Hero Member
  • *****
  • Posts: 784
    • View Profile
    • Super Robot Wars A Portable translation thread
Re: For the life of me I cannot figure out how to script dump
« Reply #12 on: January 23, 2015, 03:26:04 pm »
Perhaps the values aren't right, but this is what I did. Open rom in hexacute, switch to Japanese, and copy the hex values into a txt file with the corresponding English values. Oddly enough towards the end of the rom English characters and alphanumeric characters where in order. 0.1.2.3 ... A.B.C and so on. Japanese characters where not in order on the other hand. I figured with the way the English characters where displayed towards the end of the rom that those where the correct values.

After I copied it into text pad I saved the file with the .tbl extension. Searched the rom for katakana and hiragana values and copied them into my table file. After that I loaded it up into hexacute and dumped the script.

For now I'm going to try that SJIS program and see if I can figure it out.

Err...
Let's get back to "tables" first. You're supposed to try a relative search to determine that table. Looking for seemingly ordered data in a ROM is not likely to yield any useful result.
Like henke37 expressed, your current table is most likely wrong.
Please try relative search.

shadowdorothy

  • Jr. Member
  • **
  • Posts: 29
    • View Profile
Re: For the life of me I cannot figure out how to script dump
« Reply #13 on: January 24, 2015, 03:16:25 pm »
BlackDog 61.
I downloaded monkey moore, input a string of text in English and... It gave me the exact same table with English letters, but no Japanese. When I try to use a relative scan on the file for a Japanese word it gives me over 50 results. Even with an updated character sheet that includes all hiragana, katakana and some character combinations. How do you narrow it down to a few selections?

On an updated character sheet note, under what section should I submit the character sheet I updated? I don't know if it should go into utilities or documents.

BlackDog61

  • Hero Member
  • *****
  • Posts: 784
    • View Profile
    • Super Robot Wars A Portable translation thread
Re: For the life of me I cannot figure out how to script dump
« Reply #14 on: January 24, 2015, 06:35:53 pm »
How do you narrow it down to a few selections?
I'd try longer Japanese words. And check that there is a kind of logical order in the letters (that one is not always true, but I'd expect it most of the time).

On an updated character sheet note, under what section should I submit the character sheet I updated? I don't know if it should go into utilities or documents.
I'm not a mod, but I'd go for documents. I think there are some there already.

Seihen

  • Sr. Member
  • ****
  • Posts: 404
    • View Profile
Re: For the life of me I cannot figure out how to script dump
« Reply #15 on: January 25, 2015, 04:15:55 am »
As others have said, I'm afraid what you've found is NOT actually a table, but text being printed in ASCII order inside the data of the ROM, for one reason or another. I admit that I don't have a whole lot of experience, but it actually isn't too uncommon in GBA games from what I've seen. In fact, I've seen exactly what you've described in both of the Japanese GBA games I've dumped in the past. It is probably an artifact of the software they were using to compile the data.

In the Ganbare Goemon 1+2 ROM for GBA, it actually includes windows directory paths for someone who was working on it. Pretty fascinating the stuff you can find.

But, alas, it has nothing to do with a 'table' and what you found is the normal, run-of-the-mill ASCII encoding. A = 41, B = 42, and on and on.

henke37

  • Hero Member
  • *****
  • Posts: 643
    • View Profile
Re: For the life of me I cannot figure out how to script dump
« Reply #16 on: January 25, 2015, 11:06:34 am »
Or it could just be a an increasing sequence of integers that is at least 65 entries long. Those do happen.

Pennywise

  • Hero Member
  • *****
  • Posts: 2350
  • I'm curious
    • View Profile
    • Yojimbo's Translations
Re: For the life of me I cannot figure out how to script dump
« Reply #17 on: January 25, 2015, 01:40:49 pm »
I recall someone like Kingcom saying that the GBA SRW games use some kind of dictionary compression. This makes building a table more complicated when the script is partly compressed.

Jorpho

  • Hero Member
  • *****
  • Posts: 4677
  • The cat screams with the voice of a man.
    • View Profile
Re: For the life of me I cannot figure out how to script dump
« Reply #18 on: January 25, 2015, 02:04:55 pm »
I'm not sure what SJIS encoding is, so I will look that up and figure it out.
Shift-JIS is basically ASCII for Japanese characters.  Just like assorted binary values might happen to randomly look like ASCII when viewed with a hex editor, some of them might happen to look like Japanese characters in a hex editor or other viewer that supports Shift-JIS.  But again, there's nothing obliging a game developer to store text data as Shift-JIS, or any of the other established encoding standards for Japanese characters.
This signature is an illusion and is a trap devised by Satan. Go ahead dauntlessly! Make rapid progres!

goldenband

  • Sr. Member
  • ****
  • Posts: 333
    • View Profile
Re: For the life of me I cannot figure out how to script dump
« Reply #19 on: January 25, 2015, 03:08:18 pm »
The part of script dumping that's always confused me is that we often talk about it as if it's some sort of automated process -- which I suppose it can be, if a game is very regimented about how and where it stores its text.

And if you've got Shift-JIS stored in plain sight, sure, I can imagine how a program can automatically find all occurences of Shift-JIS and the boundaries of each chunk that has them. As a Mac user, SJIS Dump isn't an option, so I just use a hex editor and a Shift-JIS chart, and have found a couple scripts that way.

But in ROMs for older (8-bit) systems it seems like text can be just about anywhere in the ROM, especially if there isn't much text at all (as with arcade-style games) and it's stored as single-byte references to tile blocks that may only be used in one or two screens each. In the games I've worked on it's been a painstaking process of tracking down one or two strings at a time -- nothing I could automate, even if I knew how. I have no trouble finding text I already know exists, but I have no idea how I'd go about finding text I don't know about.

Is there some clever way to deal with this, or is "dumping" for many 8-bit games really...less systematic and automatic than that term makes it sound?