ROM Hack Gyakuten Saiban 1-3 Translation

cocomonk22

Well-Known Member
OP
Member
Joined
Oct 24, 2006
Messages
304
Trophies
0
XP
251
Country
United States
kcaze h3rmit 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


deufeufeu said:
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 and while the Japanese script shows and . 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 would instead be output as 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 to .

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 ''. 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

=01
=01=5a
/6??????=1e?????
[]
=96
/1??*0????=2d/5?????????????=14
[]
=01=19=50
=78=19
=01/7??????/8??=3c/3????????=10?????????=78
[]
=1a
=19=1e=19=64
=19=01
%3/5???????????????????
[]
=46=14
=14%0/3??????=10????????????=64
[]

=14%3/5????????????=10/4????=10???????????=64
[]

%0??=10/2*0?????=46
[]

%3=14/6????=0c?????=14/9????????/b???/d???/b??=32
[]
=19
=01*0&0
%0/1??
[
&0
??

&0
?????=64
]

=0a/3?????/c??=28*1/2???????????=50
[]
&0=01
=01=24=01
=19=60=28=50
=b4=b4
/8???=10/6????????=14/5??=10???/c??=14/4?????=5a
[]
=0f=05
=01*2=78
/a??????????=78
[]
=78=19

The English substituted directly in:
CODE@PTR0

=01
=01=5a
/6..."huff"...=1e"huff"...
[]
=96
/1Argh!*0How did I get into this mess?=2d/5Why...?=14
[]
=01=19=50
=78=19
=01/7 Why did I do that...?/8That girl...=3c/3You shouldn't see her anymore.Hey!=10It's none of your business!=78
[]
=1a
=19=1e=19=64
=19=01
%3/5I'm telling you for your sake.If you continue to see her,
[]
=46=14
=14%0/3it's going to be bad news.=10Y=64
[]

=14%3/5{1665}You're lying!=10/4Just listen to me.=10There's something you need=64
[]

%0to know about that girl... ...=10/2*0Stop=46
[]

%3=14/6 it!=0cD=14/9{1665}Don't talk about her like/bthat!/dIt/b{1665}It wasn't me!=32
[]
=19
=01*0&0
%0/1I
[
&0
{1665}I d

&0
{1665}didn't...=64
]

=0a/3I didn't do it!/c{1665}{1665} 5 Years Earlier {1665}{1665}=28*1/2Mia Fey=50
[]
&0=01
=01=24=01
=19=60=28=50
=b4=b4
/82nd Trial=10/6April 11,=14/5 9:40 AM=10District Court/cDefendant Lobby No. 3=14/4(Whew,=5a
[]
=0f=05
=01*2=78
/a it's finally time...=78
[]
=78=19

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?
 
Last edited by cocomonk22,

Harsky

Madmin
Member
Joined
Aug 2, 2004
Messages
5,561
Trophies
1
XP
3,840
Country
United Kingdom
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

Well-Known Member
OP
Member
Joined
Oct 24, 2006
Messages
304
Trophies
0
XP
251
Country
United States
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):
gbadscf0.png


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

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:
gs3wwtcodfb0.png

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

-----
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:
gs3wrongnamemo2.png

This is a bit more complicated to fix, since the and 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.
 

cocomonk22

Well-Known Member
OP
Member
Joined
Oct 24, 2006
Messages
304
Trophies
0
XP
251
Country
United States
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:
CODEecho 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
 

Normmatt

Former AKAIO Programmer
Member
Joined
Dec 14, 2004
Messages
2,161
Trophies
1
Age
33
Website
normmatt.com
XP
2,162
Country
New Zealand
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

Well-Known Member
OP
Member
Joined
Oct 24, 2006
Messages
304
Trophies
0
XP
251
Country
United States
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

M3 Fanboy
Member
Joined
May 16, 2007
Messages
3,394
Trophies
1
Age
32
Website
ndss.nl
XP
383
Country
Netherlands
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

Well-Known Member
Member
Joined
Aug 21, 2006
Messages
1,295
Trophies
0
Website
scorpei.com
XP
263
Country
Netherlands
maikelsteneker said:
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

M3 Fanboy
Member
Joined
May 16, 2007
Messages
3,394
Trophies
1
Age
32
Website
ndss.nl
XP
383
Country
Netherlands
Scorpei said:
maikelsteneker said:
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

With your drill, thrust to the sky!
Former Staff
Joined
Oct 23, 2007
Messages
11,056
Trophies
0
Location
PowerLevel: 9001
XP
5,716
Country
Italy
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
 
K

KaliKot

Guest
raulpica said:
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
 

martin88

Well-Known Member
Member
Joined
Dec 18, 2005
Messages
988
Trophies
0
XP
406
Country
Canada
You could try referring to the Chinese translated version of it. I played all three Gyakuten Saiban on GBA in Chinese.
 

Drkirby

Well-Known Member
Newcomer
Joined
Jul 22, 2007
Messages
90
Trophies
0
XP
85
Country
United States
Very interesting ROM hack. Not really sure whats the use to the community, but it should be great practice for you.
 

myuusmeow

Well-Known Member
Member
Joined
Jun 24, 2007
Messages
1,646
Trophies
0
Website
google.com
XP
327
Country
United States
Drkirby said:
Very interesting ROM hack. Not really sure whats the use to the community, but it should be great practice for you.
"still interresting for those who want to play it on their gameboy micro or the gba emu for psp etc. " -earlier post

Works great. I now have no need for my DS, as the first case of GS3 will last me awhile.
biggrin.gif

Anyway, still awesome. The saves should still work if I update the patch right?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: Antonblast is more optimized than pizza tower