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

Author Topic: Available Scripts  (Read 5357 times)

abw

  • Full Member
  • ***
  • Posts: 170
    • View Profile
Re: Available Scripts
« Reply #20 on: May 17, 2018, 10:27:42 pm »
@abw This may be better suited to a PM, but I'd like to ask, is this something you would explain to me how to determine on my own?

I don't know enough to know if it requires more background than I currently have in order to understand, or if it's something you could explain to a semi-neophyte. If I could grasp this one portion of reverse engineering I feel like I'd be able to dump and translate that many more scripts.
Well, I can sure give it a try ;).

Finding the lookup table (or call it a pointer table, depending on how you want to think of it) is pretty easy with a debugger. You already knew the dictionary entries were at 0x135F0-0x13FE7, and we can find out that the game uses mapper #1 (a.k.a. MMC1; if you don't already know from somewhere else, FCEUX can tell you this if you look under the Help -> Message Log menu item). A quick peek in the debugger shows that the game is using MMC1 in its 2 x 16k bank mode (as opposed to its 1 x 32k bank mode; NESDev can tell you about the available modes for each mapper), and $C000-$FFFF is mapped to bank 7. That being the case, when it appears in RAM at all, 0x135F0-0x13FE7 will show up in RAM in the $8000-$BFFF bank at $B5E0-$BFD7, so you can set a read breakpoint on $B5E0-$BFD7 (and add a "T==#04" condition if you want to ignore $B5E0-$BFD7 reads for other ROM banks) and then play through the game until it tries to read from the dictionary and the breakpoint triggers. I'll use the first dictionary read during the title intro sequence as an example below.

I actually wrote a fairly detailed account of tracing the source of some data in Dragon Warrior recently; the details aren't exactly the same as in Marusa no Onna, but the basic ideas are exactly the same, so you might find that thread relevant and/or interesting to read. The example there uses a trace log because Dragon Warrior's text engine takes the scenic route, loading a character from ROM and then winding its way through a variety of other RAM addresses before writing the character to VRAM. For Marusa no Onna's dictionary, the path is much more direct. When the game pauses on the $B5E0-$BFD7 read breakpoint, this is what the debugger shows (a trace log would show something quite similar but with slightly different extra information like register and processor states):

Code: [Select]
07:CBAE:BD 80 B2  LDA $B280,X @ $B281 = #$B5
 07:CBB1:85 10     STA $0010 = #$87
 07:CBB3:BD 81 B2  LDA $B281,X @ $B282 = #$E5
 07:CBB6:85 11     STA $0011 = #$B6
 07:CBB8:E6 BA     INC $00BA = #$01
 07:CBBA:A6 BA     LDX $00BA = #$01
 07:CBBC:A9 00     LDA #$00
 07:CBBE:9D E0 04  STA $04E0,X @ $04E1 = #$00
 07:CBC1:A0 00     LDY #$00
>07:CBC3:B1 10     LDA ($10),Y @ $B687 = #$0F

In order to understand what the debugger's showing you, you'll want to know at least a little 6502 ASM. If that sounds intimidating, remember that you just need enough to follow along; it's not like you're writing your own homebrew from scratch :P. Anyway, here we can see that the breakpoint triggered when the game read a #$0F byte from RAM address $B687 via the LDA ($10),Y instruction. The line above that set Y to #$00, so we know that $10-$11 is $B687, and a few lines above that we can see the game writing to $10 and $11 from $B280,X and $B281,X (scrolling up to $B280 will show you that ROM bank 4 is currently loaded into RAM $8000-$BFFF, so $B280 corresponds to 0x13290; you can also right-click on $B280 in the Hex Editor and use the "Go Here In ROM File" option to get to 0x13290).

After that, a visual scan of the ROM file shows what looks like a whole lot of pointers going down to 0x135EF, so I made an educated guess that the pointer table stops there; knowing that the dictionary starts at 0x135F0 adds some extra support for that guess.

That's basically all there was to it!

filler

  • RHDN Patreon Supporter!
  • Hero Member
  • *****
  • Posts: 812
  • "WINNERS DON'T SELL REPROS"
    • View Profile
    • Filler's Translation Projects
Re: Available Scripts
« Reply #21 on: May 18, 2018, 12:27:33 am »
Heh, sounds like it's a bit more involved than I was hoping. I've taken a look at 6502 assembly before though. It was years ago now, so I'd have to familiarize myself with the instructions again. I've also read the book "Code: The Hidden Language of Computer Hardware" to try to get a basic understanding of CPU architecture, but I haven't managed to get it all to click very well.

I'm interested in trying to do something similar to what you did with Marusa no Onna, for the game Racer Mini Yonku (4WD). It seems like it has some kind of dictionary. I'll see if I can get up the nerve to give it a go. If not, I might post asking for help again. :D

Thanks for the help btw!

MrLemonLame

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Available Scripts
« Reply #22 on: May 18, 2018, 01:38:14 am »
I've been lurking around for quite some time on this site, in hopes of finding a completed translation of a game on this list.  That game is "Yamamura Misa Suspense - Kyouto Ryuu no Tera Satsujin"  I found the game very intriguing as I enjoy the genre and theme of it.  Sadly, I am not fluent in Japanese but, I started using Google Translate to help me try and figure out the basic commands, etc.  This pushed me to try my hands at actually translating it myself, but only found a way to edit the hiragana/katakana to romaji.  The dialogue and menu options are now in romaji (although the dakuten and handakuten are left hanging above my edits). While this sorta helps with typing the words into Google Translate, this is not what I initially wanted to do. I tried my hands at using Hex Workshop to try and find where the game script was, but am completely overwhelmed and have no idea where to start.

TL;DR
I'd love to help any way I can in translating "Yamamura Misa Suspense- Kyouto Ryuu no Tera Satsujin"

snark

  • Full Member
  • ***
  • Posts: 218
  • 晴天の霹靂
    • View Profile
Re: Available Scripts
« Reply #23 on: May 18, 2018, 03:37:40 pm »
You have to start somewhere! I would recommend taking a formal course of Japanese, at least one year, or with assistance of a native speaker. If that is not available to you, I recommend a used textbook and watch subtitled movies to get a better hang of it. When you feel comfortable you can use JWPCE word processor or the like to assist. If you didnt ever play cryptoquote and  don't know how to crack ciphers to find out what address each letter is, or feel adventurous enough to use the brute break method, there are tools available that can help you find the text strings to make your table.
"Always listen to experts. They'll tell you what can't be done, and why. Then do it."

filler

  • RHDN Patreon Supporter!
  • Hero Member
  • *****
  • Posts: 812
  • "WINNERS DON'T SELL REPROS"
    • View Profile
    • Filler's Translation Projects
Re: Available Scripts
« Reply #24 on: May 27, 2018, 10:51:17 pm »
TL;DR
I'd love to help any way I can in translating "Yamamura Misa Suspense- Kyouto Ryuu no Tera Satsujin"

I didn't understand what you were getting at, so thanks for the tl;dr. I agree with Snark. I started with a couple years of college Japanese. A few classes really help you get some fundamentals.

If you are motivated to help with this Yamamura game, here is the first bit of text. Why don't you take a stab at this. Get it back to me, I'll see if it's something I can use, and we'll go from there.

Code: [Select]
    * 4がつ15にち[BR]

      きょうと りょうあんじの もんぜん[BR]

[WT]    * ゲームデサイナー[NA]は しんさくゲーム[BR]

      「きょうと りゅうのてら さつじんじけん」[BR]

      の はっぴょうと、サインかいのため ここ[BR]

      りょうあんじへ やってきた。[BR]

[WT]    * イベントに つめかけた ファンをあとにして[BR]

      [NA]は けいだいへ あしをすすめた。[BR]

[WT]    * もんぜんとは うってかわって しずかな[BR]

      けいだい・・・。[BR]

      はきあつめられた さくらの はなびらが[BR]

      ピンクのやまを つくっている。[BR]

[WT]      「ゲームでは このへんが さつじんげんばに[BR]

      なってるんだけど・・・。[BR]

      はなびらの やまか、 [BR]

      このなかから したいが でてくるってのも[BR]

      なかなか おもしろい、・・・あれっ!」[BR]

[WT]     「・・・ん、なんだ こりゃ、[BR]

      はなびらの なかから あしが・・・?[BR]

      どうせ、スタッフか だれかの[BR]

      いたずらなんだよねえェ・・・。[BR]

      マネキンなんか つかったりして・・・。」[BR]

[WT]     「・・・あっ!![BR]

      し し しんでる!!![BR]

      どど どうしよう・・・、け けいさつに[BR]

      しらせないと・・・。」[BR]

[WT]    * そのとき ぼうぜんと たたずむ [NA]の[BR]

      うしろで、だれかの さけびごえが きこえた。[BR]

      そのこえを ききつけて、あたりに ひとが[BR]

      あつまってきた。[BR]

[WT]    * そのひとごみを かきわけながら、ひとりの[BR]

      じょせいが あらわれた。[BR]

[WT]キャサリン「・・・あらっ、あなた ゲームデサイナー[BR]

      の [NA]さん じゃないんですか?[BR]

      わたし キャサリンって いうんですけど、[BR]

      いったい なにが あったんですか?」[BR]

[WT]キャサリン「・・・えっ!はなびらのなかに このじょせ[BR]

      いの したいが・・・。」[BR]

[WT]キャサリン「・・・うーん、とくに がいしょうは[BR]

      ないみたい だけど・・・。[BR]

      あれっ、[BR]

      ねェ みて、このひとのてのところ、[BR]

      なにか にぎってるようだけど・・・。」[BR]

[WT]キャサリン「わたしに あいたいときは カフェ・ド・ミ[BR]

      サっていう きっさてんにくればいいわ。[BR]

      たいてい そこにいるから。」[BR]

[WT]    * りょうあんじです。[BR]

      かんこうきゃくが います。[BR]

[WT]   ひと「さあ・・・よう わかりまへんけど・・・[BR]

      ここの はいかんは あさ 8じはん から[BR]

      でっせ。」[BR]

[WT]   ひと「・・・なんのことか わかりませんが・・・[BR]

      ・・・あっ、あなた ひょっとして[BR]

      [NA]さん じゃないんですか   [BR]

      ・・・サイン ください。」[BR]

[WT][WT][WT]  なみこ「すいません・・・。[BR]

      でも どうしても、[BR]

      ここへ きたかったんです。」[BR]

[WT]  なみこ「でも [NA]さんには ほんとうに[BR]

      ごめいわくを おかけしました。[BR]

      ゲームのことは みなおから[BR]

      きいたんです。[BR]

      もうしわけ ありませんでした。」[BR]

[WT]  なみこ「かれを しぬほど あいしていたんです。[BR]

      ・・・でも ゆるせなかった。[BR]

      それで みんなを ころして いちから[BR]

      やりなおそうと おもったんです。」[BR]

[WT]  かりや「あのあさ あなたは イベントに きていた[BR]

      ゆりこさんを うらぐちから けいだいへ[BR]

      さそいだし かんコーヒーに せいさんカリを[BR]

      いれて かのじょに のませた。」[BR]

[WT]  かりや「じかんは けいだいに ひとけのない[BR]

      7じ30ぷんごろ。そのあと ゆりこさんを[BR]

      はなびらの なかに うめた。しかし[BR]

      かのじょは そのはなびらの なかで しぬ[BR]

      まえに あなたあの なまえを かいた。」[BR]

[WT]キャサリン「やっぱり ここだったのね。[BR]

      もう そろそろ かいけつ するころだろうと[BR]

      おもって さがしてたのよ。[BR]

      わたしのほうも はなしが あるから・・・[BR]

      すこし あるきましょうか。」[BR]

[WT]  かりや「もと アメリカふくだいとうりょうの むす[BR]

      めさんで、わたしも いろいろ おせわに[BR]

      なってます。いままで いろんな じけんを[BR]

      かいけつした ひとですよ。」[BR]

[WT]キャサリン「わたしのことは きかなくていいの?」[BR]

[WT]  かりや「わかりました。[BR]

      ところで 17にちですが あのひ あなたは[BR]

      はじめから 3にんを ころす つもり[BR]

      でしたね。それで ケーキを かっていき[BR]

      すいみんやくいりの おちゃを のませた。」[BR]

[WT]  かりや「そして さわおのへやから くるまのキーを[BR]

      さがしだし かれのクラウンで かえった。[BR]

      くるまを とめたのは バスてい ふきん。[BR]

      それから へやで アリバイをつくり[BR]

      ふたたび さわおのへやへ いった。」[BR]

[WT]  かりや「そこで 3にんの くちに せいさんカリを[BR]

      ふくませて さつがいした。[BR]

      ・・・そうですね。」[BR]

[WT]キャサリン「はんぶんは わたしの そうぞう だけど、[BR]

      ほぼ まちがいないと おもうわ。[BR]

      かねのために おんなごころを[BR]

      ふみにじるなんて・・・、ころされたのは[BR]

      じごうじとく というものだわ。」[BR]

[WT]キャサリン「それから みなおのことだけど、[BR]

      かれは ほんとに なみこが すきだった[BR]

      みたいね。でも あいてにされなかったから[BR]

      あんな きょうはくを したのね。」[BR]

[WT]  かりや「そして さいごの みなお さつがいの[BR]

      けんですが あのひ あなたは ふじさんが[BR]

      なくなられたあと みなおのへやへ いき[BR]

      はなしでも しながら かれに ウイスキーを[BR]

      のませた。」[BR]

[WT]  かりや「もちろん すきをみて そのなかに[BR]

      せいさんカリをいれた。[BR]

      かれが しんだあと すばやく トリックを[BR]

      すませ じぶんのへやへ もどった。」[BR]

[WT]キャサリン「あらっ、かぜがふいて さくらのいはなが[BR]

      ちりはじめたわ。[BR]

      そういえば、こんかいのじけんも[BR]

      このさくらから はじまったのね。[BR]

      ・・・きれいだわ、とっても・・・・・。」[BR]

abw

  • Full Member
  • ***
  • Posts: 170
    • View Profile
Re: Available Scripts
« Reply #25 on: June 02, 2018, 08:28:37 pm »
Heh, sounds like it's a bit more involved than I was hoping. I've taken a look at 6502 assembly before though. It was years ago now, so I'd have to familiarize myself with the instructions again. I've also read the book "Code: The Hidden Language of Computer Hardware" to try to get a basic understanding of CPU architecture, but I haven't managed to get it all to click very well.

I'm interested in trying to do something similar to what you did with Marusa no Onna, for the game Racer Mini Yonku (4WD). It seems like it has some kind of dictionary. I'll see if I can get up the nerve to give it a go. If not, I might post asking for help again. :D

Thanks for the help btw!
You're welcome! If you do find that you need some more help, you know where to ask ;)

There's certainly some up-front time investment required to learn enough about assembly, the NES hardware, and FCEUX's debugger to be able to make tracking arbitrary bits of games back to their locations in the ROM file doable without getting completely lost, but it can definitely be time well spent. You'll have to find whatever works best (or at least good enough) for you, but in order to cut down on the sheer volume of material to cover, you might want to focus on a specific system such as the NES rather than trying to learn everything about everything all at once - a lot of the higher-level concepts present in modern systems don't really apply to computers made 30 years ago, and on the other end, knowing how to wire up transistors into a logic gate doesn't make you any better at reading code.

filler

  • RHDN Patreon Supporter!
  • Hero Member
  • *****
  • Posts: 812
  • "WINNERS DON'T SELL REPROS"
    • View Profile
    • Filler's Translation Projects
Re: Available Scripts
« Reply #26 on: October 12, 2018, 12:06:10 am »
FYI: I've updated the OP with a new script; Famicom Jump: Hero Retsuden. This is the first RPG based on properties from Shounen Jump. It was developed by Tose. Around 76K of text. For the Famicom/NES.

snark

  • Full Member
  • ***
  • Posts: 218
  • 晴天の霹靂
    • View Profile
Re: Available Scripts
« Reply #27 on: October 17, 2018, 01:36:33 am »
I'm interested in translating Marusa no Onna.  :D


Awesome! that is a good game. :D
"Always listen to experts. They'll tell you what can't be done, and why. Then do it."

jables

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Available Scripts
« Reply #28 on: October 27, 2018, 08:43:20 pm »
I could try to do the hack part for one of the smaller ones like Golf-kko or one of the game gear Madou Monogatari games.

cccmar

  • Full Member
  • ***
  • Posts: 214
    • View Profile
    • Nebulous Translations site
Re: Available Scripts
« Reply #29 on: October 28, 2018, 04:10:33 am »
I could try to do the hack part for one of the smaller ones like Golf-kko or one of the game gear Madou Monogatari games.

If you want to try doing Madou Monogatari II, the script is fully translated and available right now. The thing is, that game will likely need 6 lines of text instead of 3, due to the tiny size of the dialogue box. TheMajinZenki could probably say more about it. Apparently they all use a very similar engine though, so if you hack one, the others should be at least somewhat easier.

jables

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Available Scripts
« Reply #30 on: October 28, 2018, 10:40:46 am »
Sure. I’ve never done a translation hack before but I don’t mind jumping in the deep end. Where is the script?

filler

  • RHDN Patreon Supporter!
  • Hero Member
  • *****
  • Posts: 812
  • "WINNERS DON'T SELL REPROS"
    • View Profile
    • Filler's Translation Projects
Re: Available Scripts
« Reply #31 on: October 28, 2018, 08:41:20 pm »
If you want to try doing Madou Monogatari II, the script is fully translated and available right now. The thing is, that game will likely need 6 lines of text instead of 3, due to the tiny size of the dialogue box. TheMajinZenki could probably say more about it. Apparently they all use a very similar engine though, so if you hack one, the others should be at least somewhat easier.

I'm pretty sure Stephen Seehorn got around the small dialog box in the first game by implementing a VWF. There's also the possibility of just letting the dialog spill onto another page if that's an option. There's a reason I leave this to more technically skilled folks than myself to figure out. ;)