Jump to content


  • Please log in to reply

Gyakuten Saiban 1-3 Translation

, Help (Go to first unread post)
cocomonk22 Post #1 Posted 28 February 2008 - 07:40 AM

    GBAtemp Regular

  • PipPipPip

  • Group: Members
  • Posts: 298
  • Member No.: 52,142
  • Joined: 24-October 06

  •  

kcaze is continuing this project, see latest posts in this topic.

==============================

Note: Not continuing this project, since the low amount of memory in the GBA version is causing the game to crash with the new English text which takes up more space than the Japanese text. Fixing requires moving pointers and splitting the script in multiple files which is irritating. Main reason I started this project was actually to play Phoenix Wright games on my TV, and the WiiWare versions fulfilled this.

Download Translation as of September 11th 2008 here: Translated all of case 2, just missing some full screen answers in the second trial.
Also, Scorpei has created a wiki page for the project at http://PW.scorpei.com/

This project aims to take the script from the English Phoenix Wright games 1-3 for NDS and put them into the Japanese Gyakuten Saiban games 1-3 for GBA, creating an English translation for three GBA games. smile.gif

QUOTE(deufeufeu)
with the stuff at come back court (gs3 translation) it could be not so difficult. You have to add a variable width font hack, to add English letters at the end of the Japanese font, and to change scriptutils.py to encode any character with the given offset. Since the ASM font hack might be tedious if you don’t have any hacking background, I can say that it could range from one afternoon to two weeks tongue.gif.

If anyone has any familiarity with hacking roms and is interested in this project, please consider helping, as my knowledge in this area is minimal so far.

Tools needed:
Comeback Courtroom tools (http://sourceforge.net/project/showfiles.p...lease_id=500989)
Phoenix Wright Script Editor (http://www.romhacking.net/utils/419/)

==============================

To start off, I have extracted the English scripts from PW3 and the Japanese script from GS3. Since the CC3 tool already includes VWF, it should be the quickest and easiest way to start testing this project.

Since two different tools were used, the scripts are not formatted the same. For example, the file containing the English trans uses <bgcolor:256,0,31> and <wait:10> while the Japanese script shows <bgcolor 256 0 31> and <wait_noanim 10>. I could just replace : and , with spaces, but doing so would effect normal spoken text as well. An alternative would be to modify the Phoenix Wright Script Editor to format output so that such commands as <wait:10> would instead be output as <wait_noanim 10> so it would be in the correct format for the Comeback Court 3 editor. PWSE is written in Python and includes the source, so it should be easy enough for someone who knows python, hopefully.
Edit: Or, a text editor that can do renames such as [ ] to @PTR or <fademusic:*,*> to <fademusic * *>.

Scripts of case 1 (items ending in translated are the English, the others are the Japanese version as formatted for CC3, which will be used to put the text into the gba version):
http://www.4shared.com/file/38659382/abbabd6b/gs3-1.html

==============================

Edit 2: I've created a small program that does the conversion of the control codes in the scripts created by PWSE to the formatting of the control codes used in the comebackcourt tool. It can output script, convert to similar codes as used with comebackcourt, and change replace Japanese text with a file with an English file created after using the output script function. You can get it here: http://pw.scorpei.com/aascriptreader.zip

==============================

Edit 3: After modifying aascriptreader a few times to reduce the errors and testing the rom, I have found that simply substituting the cc files will NOT work since the DS and GBA games use different argument values. However, it would still be possible to use aascriptreader's "script output" function to remove control codes only leaving in dialogue separated by line, which could then be substituted to replace the Japanese text by adding a new function that checks for where '<' does not occur after '>'. That would work assuming that the Japanese and English use the same amount of dialogue separations (hopefully), but it would still require modification of the speed arguments which are not the same for Japanese and English versions because of the differing length between number of characters of each.

==============================

Edit 4: I attempted to substitute English directly into the Japanese. Unfortunately, the English and Japanese text does not line up properly, so it will be a bit more complicated than I had hoped. I'll try to go back to changing PWSE scripts to cc scripts, but it will be difficult as the control codes of cc use hexadecimal and values may not line up correctly.

Here's an example of the misalignment when substituting English into the Japanese script:
First, the original Japanese:
CODE
@PTR0

<noop><bganim 0 2000><music 12d 0><bg ff><bgcolor 100 0 1f>=01<bgcolor 202 0 8>
=01<bg 37><bganim b 200><bganim 5 200>=5a<name 4200><hidetextbox 0>
/6‥‥はあ‥‥=1e はあ‥‥
[]
<bganim 1 0>=96<nextpage_nobutton>
/1‥‥*0くそっ!=2d<b>/5なんでぼくがこんな目に‥‥=14
[]
<bgcolor 202 0 8>=01<bganim 5 201><bgcolor 104 1 9>=19=50<hidetextbox 1><nextpage_nobutton>
=78<bgcolor 204 1 1f>=19<bganim 1 201><bg ff><hidetextbox 0><bgcolor 100 0 1f>
=01/7‥‥あのとき/8‥‥=3c/3ぼくは<b>どうして、=10あんなコトを‥‥!=78
[]
<nextpage_nobutton><hidetextbox 1><bganim 6 200><sound 16e 1>=1a<bgcolor 404 8 1f>
=19<bganim 6 201><bganim 2 0><bg 39>=1e<music 14e 0><bgcolor 304 1 1f>=19=64<bgcolor 204 1 8>
=19<bg ff><bgcolor 100 0 1f>=01<name 4200><hidetextbox 0>
%3/5‥‥彼女とは、<b>もう会わないほうがいい。
[]
<6B 3 84 1><bganim 3 0>=46=14<nextpage_nobutton>
=14%0/3そんなコト、=10<b>きみに言われたくないよ!=64
[]
<nextpage_nobutton>
=14%3/5‥‥アンタのためなんだ。=10<b>/4きっと、=10よくないことが起こる。=64
[]
<nextpage_nobutton>
%0う、=10/2*0ウソだッ!=46
[]
<nextpage_nobutton>
%3=14/6いいか、=0c聞くんだ。=14<b>/9‥‥あの女はなぁ/b‥‥‥/d‥‥‥/b‥‥=32
[]
<bgcolor 204 1 1f>=19<nextpage_nobutton><bganim 3 201><bg ff><bgcolor 100 0 1f>
=01*0&0
%0/1‥‥
[
<sound 48 1>&0
やめ

&0
てくれッ!=64
]
<nextpage_nobutton>
=0a/3彼女のコト/c‥‥=28<b>*1/2そんなふうに言うなッ!=50
[]
&0<bgcolor 400 0 1f>=01<hidetextbox 1><nextpage_nobutton><bg ff><bgcolor 100 0 1f>
=01<bganim 6 200><sound 16e 1>=24<bgcolor 400 0 1f>=01<bganim 6 201><bganim c 3><bg 37>
<bganim b 201><bganim 1 202><music 14f 0><bgcolor 304 1 1f>=19=60=28<bganim 1 3>=50<6B 1 0 0>
<bganim c 200>=b4=b4<hidetextbox 0>
/8ぼ‥‥=10/6ぼくじゃないぞ!=14<b>/5こ、=10こんな/c‥‥=14/4こんな‥‥=5a
[]
<bgcolor 402 8 1f>=0f<hidetextbox 1><nextpage_nobutton>=05<bg 38><bganim c 202>
<bgcolor 300 0 1f>=01<sound 7a 1>*2=78<hidetextbox 0>
/a‥‥殺人なんて‥‥!=78
[]
<hidetextbox 1><nextpage_nobutton>=78<bgcolor 204 1 1f>=19<bganim 0 1000><endjmp>


The English substituted directly in:
CODE
@PTR0

<noop><bganim 0 2000><music 12d 0><bg ff><bgcolor 100 0 1f>=01<bgcolor 202 0 8>
=01<bg 37><bganim b 200><bganim 5 200>=5a<name 4200><hidetextbox 0>
/6..."huff"...=1e"huff"...
[]
<bganim 1 0>=96<nextpage_nobutton>
/1Argh!*0How did I get into this mess?=2d<b>/5Why...?=14
[]
<bgcolor 202 0 8>=01<bganim 5 201><bgcolor 104 1 9>=19=50<hidetextbox 1><nextpage_nobutton>
=78<bgcolor 204 1 1f>=19<bganim 1 201><bg ff><hidetextbox 0><bgcolor 100 0 1f>
=01/7 Why did I do that...?/8That girl...=3c/3You shouldn't see her anymore.<b>Hey!=10It's none of your business!=78
[]
<nextpage_nobutton><hidetextbox 1><bganim 6 200><sound 16e 1>=1a<bgcolor 404 8 1f>
=19<bganim 6 201><bganim 2 0><bg 39>=1e<music 14e 0><bgcolor 304 1 1f>=19=64<bgcolor 204 1 8>
=19<bg ff><bgcolor 100 0 1f>=01<name 4200><hidetextbox 0>
%3/5I'm telling you for your sake.<b>If you continue to see her,
[]
<6B 3 84 1><bganim 3 0>=46=14<nextpage_nobutton>
=14%0/3it's going to be bad news.=10<b>Y=64
[]
<nextpage_nobutton>
=14%3/5{1665}You're lying!=10<b>/4Just listen to me.=10There's something you need=64
[]
<nextpage_nobutton>
%0to know about that girl... ...=10/2*0Stop=46
[]
<nextpage_nobutton>
%3=14/6 it!=0cD=14<b>/9{1665}Don't talk about her like/bthat!/dIt/b{1665}It wasn't me!=32
[]
<bgcolor 204 1 1f>=19<nextpage_nobutton><bganim 3 201><bg ff><bgcolor 100 0 1f>
=01*0&0
%0/1I
[
<sound 48 1>&0
{1665}I d

&0
{1665}didn't...=64
]
<nextpage_nobutton>
=0a/3I didn't do it!/c{1665}{1665} 5 Years Earlier {1665}{1665}=28<b>*1/2Mia Fey=50
[]
&0<bgcolor 400 0 1f>=01<hidetextbox 1><nextpage_nobutton><bg ff><bgcolor 100 0 1f>
=01<bganim 6 200><sound 16e 1>=24<bgcolor 400 0 1f>=01<bganim 6 201><bganim c 3><bg 37>
<bganim b 201><bganim 1 202><music 14f 0><bgcolor 304 1 1f>=19=60=28<bganim 1 3>=50<6B 1 0 0>
<bganim c 200>=b4=b4<hidetextbox 0>
/82nd Trial=10/6April 11,=14<b>/5 9:40 AM=10District Court/cDefendant Lobby No. 3=14/4(Whew,=5a
[]
<bgcolor 402 8 1f>=0f<hidetextbox 1><nextpage_nobutton>=05<bg 38><bganim c 202>
<bgcolor 300 0 1f>=01<sound 7a 1>*2=78<hidetextbox 0>
/a it's finally time...=78
[]
<hidetextbox 1><nextpage_nobutton>=78<bgcolor 204 1 1f>=19<bganim 0 1000><endjmp>


As you can see, because of differing amounts of divisions between English and Japanese phrases, the English substitution jumps ahead to the next section early, so the substitution option appears to be out.

------------------------------
So, does anyone want to help out on this project?

Edited by cocomonk22, 01 May 2011 - 04:48 AM.



sixb0nes Post #2 Posted 28 February 2008 - 12:17 PM

    GBAtemp Regular

  • PipPipPip

  • Group: Members
  • Posts: 176
  • Member No.: 48,992
  • Joined: 13-September 06

  •  

I don't mean to discourage you, but this is quite pointless since the NDS versions are available and far superior to the GBA versions.


xalphax Post #3 Posted 28 February 2008 - 12:24 PM

    Internet killed the Ponystar.


  • Group: Members
  • Posts: 1,243
  • Member No.: 55,069
  • Joined: 18-November 06
  • Location: here'n'there

  •  

still interresting for those who want to play it on their gameboy micro or the gba emu for psp etc.

Edited by xalphax, 28 February 2008 - 12:25 PM.


myuusmeow Post #4 Posted 29 February 2008 - 01:33 AM

    loltimetravel


  • Group: Members
  • Posts: 1,646
  • Member No.: 86,164
  • Joined: 24-June 07
  • Location: Ontario, CA

  •  

QUOTE(xalphax @ Feb 28 2008, 03:24 AM)
the gba emu for psp etc.

/me is very interested, and hopes this project gets very far.

As always, I can't help; no skills. Message me if you ever want a webpage for this, I can do HTML. nyanya.gif

Edited by myuusmeow, 29 February 2008 - 01:34 AM.


Harsky Post #5 Posted 29 February 2008 - 01:46 AM

    Madmin


  • Group: Members
  • Posts: 4,345
  • Member No.: 25,344
  • Joined: 02-August 04

  •  

While it would be a nice idea for people who still only have a GBA and a GBA flashcart, I think you'll have an uphill struggle. It really won't be just a simple case of INSERT TRANSLATED FILES.

Also, are you going to leave the graphics for the backgrounds and evidence as it is? I know there were some tweaks between the Japanese and English version mostly involving Japanese writing but I can't remember if this was important enough if you have to examine the evidence.


cocomonk22 Post #6 Posted 29 February 2008 - 06:33 AM

    GBAtemp Regular

  • PipPipPip

  • Group: Members
  • Posts: 298
  • Member No.: 52,142
  • Joined: 24-October 06

  •  

OK, actually, after reading through the comebackcourt tool's guidelines, it looks like the method I was using to add in the translated text was wrong, and the real way is actually simpler than I thought, and would not require me having to modify any of the control codes such as animations and such that are not related to the text (I wasn't supposed to replace the Japanese text, I was supposed to put the English into the [] to use the VWF).

Regarding the graphics and backgrounds, I believe the evidence "text" and profile "text" are actually graphics, which would require modifying, but right now, I'm just looking at getting the translation to work, since that is the only thing that I know I can probably get working.

Also, the reason for this "translation" is to be easier to port the game to other systems, since the GBA is easier to emulate than the DS.

UPDATE: I was able to get the text to fit the right amount of [], at least for the first section, however, I have run into a bigger problem: the GBA version only uses two lines of text per text box instead of three lines as in the DS version! The comebackcourt tool is using an Arial 13 font on two rows. Somehow, this needs to be changed to a shorter font that uses three rows, but I have no knowledge of how to do that at all, so until someone else has a solution to fix this, I'm not sure how I'll be able to progress in this project.

GBA on the left, DS on the right (notice how the GBA version cuts off the last line of text):


--------------------------------------------------------

UPDATE:
After some more modifications with my script reader, 2 of the the three files for case 1 were replaced with English almost perfectly! The only parts missing were the answers that the player selects from when asked a question such as "Yes,No" or answers to the judge's questions. The reason those parts were missing is because the DS version uses graphics for those parts rather than text:

Since these occurrences are few, it shouldn't be too difficult to write in the answers manually.
-----
Edit: Added in the answers:

-----
For the third part of the case, there are some strange pointers in both the GBA and DS scripts. If I can figure out how to match the pointers in both, it should be easy to complete the case 1 script.

There are also some problems in the script with the wrong character's voice moving when someone else is speaking or the wrong name label being shown when someone is talking:

This is a bit more complicated to fix, since the <name:> and <person:> controlcodes are different between the GBA and DS versions, and so would require making a list of all the different name codes and all the different person codes and having them converted to GBA values. I'm not sure of an easy way to go through with that.

Edited by cocomonk22, 02 March 2008 - 03:26 AM.


cocomonk22 Post #7 Posted 02 March 2008 - 06:00 AM

    GBAtemp Regular

  • PipPipPip

  • Group: Members
  • Posts: 298
  • Member No.: 52,142
  • Joined: 24-October 06

  •  

I've finished translating case 1, part of case 2, and case 4. This is text only, with the exception of the graphics that were modified by the ComebackCourt guys, since I don't know how to modify graphics. Let me know of any problems you find in the game.

The reason on these parts of the cases are translated is because the hackall.bat file used to put the translation in the game only has instructions for those parts, and I'm not sure how to find out the correct hex values and rom addresses. Here's an excerpt:
CODE
echo Inserting Case 1-1 script...
rem cctools\ccscript -pack -dmp insertion_temp\case1-1.bin -txt extracted\case1-1.cc
cctools\ccscript -pack -dmp insertion_temp\case1-1.bin -txt scripts\case1-1-translated.cc
cctools\ccinsert -hex 0x00007a08 -rom CC3_English.gba -romaddr 0x00049B38
cctools\ccinsert -lz77 -dmp insertion_temp\case1-1.bin -rom CC3_English.gba -romaddr 0x007a0000
rem cctools\ccinsert -lz77 -dmp insertion_temp\case1-1.bin -rom CC3_English.gba -romaddr 0x006E5BC4

echo Inserting Case 1-2 script...

rem Unholy hack to circumvent RAM overflow
cctools\ccscript -pack -dmp insertion_temp\case1-2.bin -txt scripts\case1-2-translated.cc

cctools\ccscript -pack -dmp insertion_temp\case1-2-overflow.bin -txt scripts\case1-2-overflow.cc
cctools\ccinsert -dmp insertion_temp\case1-2-overflow.bin -rom CC3_English.gba -romaddr 0x007d0000

rem 087d0000 - 02011FC0 = 67be040
rem + 0x2F0 = 067be330 <-> 30e37b06
rem at addr 0x168
cctools\ccinsert -hex 0x30e37b06 -rom insertion_temp\case1-2.bin -romaddr 0x00000168

cctools\ccinsert -hex 0x00007c08 -rom CC3_English.gba -romaddr 0x00049B3C
cctools\ccinsert -lz77 -dmp insertion_temp\case1-2.bin -rom CC3_English.gba -romaddr 0x007c0000

echo Inserting Case 1-3 script...
cctools\ccscript -pack -dmp insertion_temp\case1-3.bin -txt scripts\case1-3-translated.cc
cctools\ccinsert -hex 0x00007e08 -rom CC3_English.gba -romaddr 0x0001EE9C
cctools\ccinsert -lz77 -dmp insertion_temp\case1-3.bin -rom CC3_English.gba -romaddr 0x007e0000

echo Inserting Case 2-1 script...
cctools\ccscript -pack -dmp insertion_temp\case2-1.bin -txt scripts\case2-1-preview.cc
cctools\ccinsert -lz77 -dmp insertion_temp\case2-1.bin -rom CC3_English.gba -romaddr 0x006F92E8

echo Inserting Case 2-1b script...
cctools\ccscript -pack -dmp insertion_temp\case2-1b.bin -txt scripts\case2-1b-translated.cc
cctools\ccinsert -hex 0x00007b08 -rom CC3_English.gba -romaddr 0x0001EECC
cctools\ccinsert -lz77 -dmp insertion_temp\case2-1b.bin -rom CC3_English.gba -romaddr 0x007b0000

echo Inserting Case 4-1 script...
cctools\ccscript -pack -dmp insertion_temp\case4-1.bin -txt scripts\case4-1-translated.cc
cctools\ccinsert -lz77 -dmp insertion_temp\case4-1.bin -rom CC3_English.gba -romaddr 0x0077bf54

echo Inserting Case 4-2 script...
cctools\ccscript -pack -dmp insertion_temp\case4-2.bin -txt scripts\case4-2-translated.cc
cctools\ccinsert -hex 0x00007908 -rom CC3_English.gba -romaddr 0x00049b6c
cctools\ccinsert -lz77 -dmp insertion_temp\case4-2.bin -rom CC3_English.gba -romaddr 0x00790000



Edited by cocomonk22, 03 March 2008 - 01:45 AM.


myuusmeow Post #8 Posted 02 March 2008 - 06:22 AM

    loltimetravel


  • Group: Members
  • Posts: 1,646
  • Member No.: 86,164
  • Joined: 24-June 07
  • Location: Ontario, CA

  •  

AWESOME! I'm putting this on my PSP right now! Looks great in VBA, hope it works in gpSP.


Normmatt Post #9 Posted 02 March 2008 - 06:52 AM

    Former AKAIO Programmer


  • Group: Members
  • Posts: 1,756
  • Member No.: 29,491
  • Joined: 14-December 04

  •  

About getting the offsets i'd suggest taking a look at the script extraction batch file, maybe those addresses are the original script addresses if not i'd assume thier just areas with blank space so you can put your new scripts in the blank space at the end of the rom.


cocomonk22 Post #10 Posted 02 March 2008 - 10:19 AM

    GBAtemp Regular

  • PipPipPip

  • Group: Members
  • Posts: 298
  • Member No.: 52,142
  • Joined: 24-October 06

  •  

I no nothing about how to find rom addresses with hex addresses, so I'll need help if anyone wants to see more cases translated/GS1 & 2.


Maikel Steneker Post #11 Posted 02 March 2008 - 11:20 AM

    M3 Fanboy


  • Group: Members
  • Posts: 3,351
  • Member No.: 80,319
  • Joined: 16-May 07

  •  

Why haven't I seen this earlier? This is really awesome dude!

I'm making a Dutch translation of the first case of this game with some other guys at the moment. If it is possible to insert the official English text it will really help us: the translation would be more precise and we could translate other cases.

I have a bit experience with the comebackcourt editor, so I may be able to help you a little bit... Contact me if you need any help with anything biggrin.gif Btw, is this also possible with the first two games (I remember the comebackcourt tools did work with the first two games...)?


Scorpei Post #12 Posted 02 March 2008 - 11:27 AM

    GBAtemp Maniac


  • Group: Members
  • Posts: 1,281
  • Member No.: 47,556
  • Joined: 21-August 06

  •  

QUOTE(maikelsteneker @ Mar 2 2008, 11:20 AM) <{POST_SNAPBACK}>
Why haven't I seen this earlier? This is really awesome dude!

I'm making a Dutch translation of the first case of this game with some other guys at the moment. If it is possible to insert the official English text it will really help us: the translation would be more precise and we could translate other cases.

I have a bit experience with the comebackcourt editor, so I may be able to help you a little bit... Contact me if you need any help with anything biggrin.gif Btw, is this also possible with the first two games (I remember the comebackcourt tools did work with the first two games...)?

Can't imagine they changed their engine / rom so much with the different versions. Possibly there are only a few differences between the games?


Maikel Steneker Post #13 Posted 02 March 2008 - 04:09 PM

    M3 Fanboy


  • Group: Members
  • Posts: 3,351
  • Member No.: 80,319
  • Joined: 16-May 07

  •  

QUOTE(Scorpei @ Mar 2 2008, 12:27 PM) <{POST_SNAPBACK}>
QUOTE(maikelsteneker @ Mar 2 2008, 11:20 AM) <{POST_SNAPBACK}>
Why haven't I seen this earlier? This is really awesome dude!

I'm making a Dutch translation of the first case of this game with some other guys at the moment. If it is possible to insert the official English text it will really help us: the translation would be more precise and we could translate other cases.

I have a bit experience with the comebackcourt editor, so I may be able to help you a little bit... Contact me if you need any help with anything biggrin.gif Btw, is this also possible with the first two games (I remember the comebackcourt tools did work with the first two games...)?

Can't imagine they changed their engine / rom so much with the different versions. Possibly there are only a few differences between the games?

Well, the comebackcourt translation was good, but some parts are completely different (though they don't affect the story). Also, names like Dillores Willow and Jack Richford were changed. Using the final text is just much easier smile.gif


raulpica Post #14 Posted 02 March 2008 - 04:18 PM

    With your drill, thrust to the sky!


  • Group: Global Moderators
  • Posts: 7,224
  • Member No.: 107,952
  • Joined: 23-October 07
  • Location: _____________ PowerLevel: 9001

  •  

Great project biggrin.gif
It will be great playing them on my GBA biggrin.gif

Another thing... I was thinking some days ago about a re-translation project, without the english translation adjustments (I like them a lot, but as an Hardcore GS fan I would like to play them again with things like Japanese names, the game being in Japan and not in America, and other things) tongue.gif Pretty useless, but it's just an idea smile.gif


KaliKot Post #15 Posted 02 March 2008 - 04:52 PM

    GBAtemp Regular

  • PipPipPip

  • Group: Members
  • Posts: 153
  • Member No.: 6,394
  • Joined: 10-November 02

QUOTE(raulpica @ Mar 2 2008, 04:18 PM) <{POST_SNAPBACK}>
Great project biggrin.gif
It will be great playing them on my GBA biggrin.gif

Another thing... I was thinking some days ago about a re-translation project, without the english translation adjustments (I like them a lot, but as an Hardcore GS fan I would like to play them again with things like Japanese names, the game being in Japan and not in America, and other things) tongue.gif Pretty useless, but it's just an idea smile.gif


Do you realize that it would be even more trouble than what they are doing now? I like the idea but I'm satisfied with the PW translations and I would really like to see this finished







Users browsing this topic

2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users