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

Author Topic: Assistance extracting Shin Megami Tensei script with gba_dumper  (Read 878 times)

Zero-One

  • Newbie
  • *
  • Posts: 2
    • View Profile
Assistance extracting Shin Megami Tensei script with gba_dumper
« on: October 25, 2019, 01:36:22 am »
I recently got gba_dumper compiled and running under Windows 10 with cygwin and thought I'll try to extract the script from the GBA version of Shin Megami Tensei, however I have have run in to an issue but I'm not exactly sure if it's because I'm searching for non-English text, the wrong text or because I'm not using the tool properly. I followed the steps as shown in the readme however I'm stuck at step 1 with my result being:

Quote
gba_dumper -f smt1.gba -r "東京"
No matches found. Try adding fuzz - or your text might actually be a graphic.

Which is normal as shown in the readme however despite adding fuzz to to the search, it still results in this:

Quote
gba_dumper -f smt1.gba -r "東京" -z 1
No matches found. Try adding fuzz - or your text might actually be a graphic.

I increased the fuzz number but I can't seem to get a result, I tested this with Metroid Fusion and the program is running perfectly with the same result as shown in the readme.



I'm not sure how to proceed and any assistance would be greatly appreciated.

filler

  • RHDN Patreon Supporter!
  • Hero Member
  • *****
  • Posts: 961
  • "WINNERS DON'T SELL REPROS"
    • View Profile
    • Filler's Translation Projects
Re: Assistance extracting Shin Megami Tensei script with gba_dumper
« Reply #1 on: October 25, 2019, 05:42:18 am »
These videos could stand to be redone, but they will introduce you to the concepts around custom text encoding in games. Check the comments and/or descriptions for some corrections. https://www.youtube.com/playlist?list=PLkybU1NLulWjcsr1mN6rKcVJBnMsF2Efs

You might also want to check my video on finding the kanji in City Hunter to get a sense of why your kanji search will not produce the results you want. https://youtu.be/MPKfhdwWupM

FAST6191

  • Hero Member
  • *****
  • Posts: 2962
    • View Profile
Re: Assistance extracting Shin Megami Tensei script with gba_dumper
« Reply #2 on: October 25, 2019, 07:00:41 am »
That looks like a relative search tool that was paired with a somewhat automated setup using it. Without checking the code I am not sure what the fuzz factor is in this -- it could be it skips values between characters, it could be that it will continue searching where it technically failed (say some random formatting got in the way) or it could be something else.

For a Japanese game then relative search gets far harder (there is no official ordering in Japanese, though there are common options) so it is not entirely surprising it failed.

Surprised the output did not mention compression when it mentioned graphics but I guess there is a possibility for an automated test there as well (at least for ones most games would use if they chose to use compression).

Anyway yeah time to learn about text encoding. If filler's stuff does not do it for you and the stuff in the getting started section of this site does not either I have a few things too
http://www.romhacking.net/forum/index.php/topic,14708.0.html

Zero-One

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Assistance extracting Shin Megami Tensei script with gba_dumper
« Reply #3 on: October 26, 2019, 01:50:15 am »
@filler thanks so much, I'm watching them as I go along to dump Shin Megami Tensei's script, however I got stuck because I don't have a pre-existing table to reference when doing my first search so I'm not really sure what I can search for as the videos don't tell you what to do if you don't have a reference table.

I am able through mGBA to see the tiles and sprites that tell me the hex addresses but I'm not sure how useful this is as this is the first time I'm doing this.



@FAST6191 thanks, I skimmed through it and it's probably a bit too much information for someone who has never done this before, this is the first game I looked at that doesn't have a file system like the DS so it's a bit overwhelming, filler's videos did help make it look much more managable than I previously thought however I'm still a little bit confused.

filler

  • RHDN Patreon Supporter!
  • Hero Member
  • *****
  • Posts: 961
  • "WINNERS DON'T SELL REPROS"
    • View Profile
    • Filler's Translation Projects
Re: Assistance extracting Shin Megami Tensei script with gba_dumper
« Reply #4 on: October 26, 2019, 04:49:49 pm »
@filler thanks so much, I'm watching them as I go along to dump Shin Megami Tensei's script, however I got stuck because I don't have a pre-existing table to reference when doing my first search so I'm not really sure what I can search for as the videos don't tell you what to do if you don't have a reference table.

Yeah, I figured I should have mentioned at that part how you can just type out a table even using decimal if you want. You're just looking for numbers, any numbers, that match up to the positions of the letters in the alphabet that you want to search for.

If you want something in decimal just type out:

0=あ
1=い
2=う
3=え
4=お
5=か
6=き
7=く
8=け
9=こ
10=さ
11=し
etc...

Keep in mind, there are other ways of writing the Japanese hirgana set like S-JIS' encoding which intersperses the small and voiced characters like this:

829F=ぁ
82A0=あ
82A1=ぃ
82A2=い
82A3=ぅ
82A4=う
82A5=ぇ
82A6=え
82A7=ぉ
82A8=お
82A9=か
82AA=が

However, a LOT of these older 8-bit and 16-bit text encoding schemes use a simple hiragana order. The main differences tend to be in the final two bytes whether を or ん show up as the last character so I try to omit those from any relative searching.

Here's a hiragana sample you can use if you want to try that relative value scan like I did:

B1=あ
B2=い
B3=う
B4=え
B5=お
B6=か
B7=き
B8=く
B9=け
BA=こ
BB=さ
BC=し
BD=す
BE=せ
BF=そ
C0=た
C1=ち
C2=つ
C3=て
C4=と
C5=な
C6=に
C7=ぬ
C8=ね
C9=の
CA=は
CB=ひ
CC=ふ
CD=へ
CE=ほ
CF=ま
D0=み
D1=む
D2=め
D3=も
D4=や
D5=ゆ
D6=よ
D7=ら
D8=り
D9=る
DA=れ
DB=ろ
DC=わ
DD=ん

Good luck!

NOTE: This one doesn't include を in its contiguous hiragana set so be sure not to include を or ん in any relative searches you do using these values.