ROM Hack Professor Layton Portuguese Translation

WeaponKnight

Member
OP
Newcomer
Joined
Dec 22, 2007
Messages
8
Trophies
0
XP
74
Country
Brazil
Hi there, fellas =]

I am currently working on a Brazilian Portuguese translation of Professor Layton and the Curious Village.
When I get to know the file structure and actually start translating, I'll update this posts with the details.

Status:
Trying to figure out how the packed files are organized.
 

Vampires

Member
Newcomer
Joined
Mar 16, 2008
Messages
17
Trophies
0
XP
74
Country
Serbia, Republic of
Europe version don't use special chars, it's just use tags. For example: < - (open tag), ^ - (reverted character tag), ! - (character), > - (close tag) = . That will be reverted !. Other characters: ,
 

WeaponKnight

Member
OP
Newcomer
Joined
Dec 22, 2007
Messages
8
Trophies
0
XP
74
Country
Brazil
I guess I'll have to try the European version then. There is not enough space in the US font, because we use ALL the English characters there, plus ours =/

Thanks for the help, I'll post here once I look into it =]
 

ninhokova

Member
Newcomer
Joined
May 30, 2008
Messages
5
Trophies
0
XP
54
Country
United States
WeaponKnight said:
I guess I'll have to try the European version then. There is not enough space in the US font, because we use ALL the English characters there, plus ours =/

Thanks for the help, I'll post here once I look into it =]

Enfim uma tadução para esse jogo em português!!!!!!!
 

Jax

Pip Pip Cheerioink!
Member
Joined
Jul 31, 2006
Messages
4,132
Trophies
0
Age
36
Location
L.A.V.
XP
1,123
Country
Portugal
ninhokova said:
WeaponKnight said:
I guess I'll have to try the European version then. There is not enough space in the US font, because we use ALL the English characters there, plus ours =/

Thanks for the help, I'll post here once I look into it =]

Enfim uma tadução para esse jogo em português!!!!!!!

Pena que é para o português do Brasil...
tongue.gif
 

Toni Plutonij

*has TrolleyDave & tiny p1ngy on moderating shelf!
Former Staff
Joined
Dec 22, 2007
Messages
8,149
Trophies
1
Age
36
Location
Depths of Nuclear powerplant
XP
700
Country
Croatia
Listen to Noitora, please speak in english, because we are multi-national community that accepted english as speaking language..People of other nations can't understand you, so anyone who posts in other language then english after this post, will get moderated!

Fallow the rules!
lecture.gif
 

ninhokova

Member
Newcomer
Joined
May 30, 2008
Messages
5
Trophies
0
XP
54
Country
United States
Toni Plutonij said:
Listen to Noitora, please speak in english, because we are multi-national community that accepted english as speaking language..People of other nations can't understand you, so anyone who posts in other language then english after this post, will get moderated!

Fallow the rules!
lecture.gif

Im sorry, I had forgotten.
My English is terrible!!!!!
 

WeaponKnight

Member
OP
Newcomer
Joined
Dec 22, 2007
Messages
8
Trophies
0
XP
74
Country
Brazil
cocomonk22 said:
I agree with Vampires on using the European version instead. Look into lz77 packing tools.
I tried many yesterday.
Most didn't work, mainly because they are made to detect GBA graphics compressed with LZ77.
The only tool that worked made one big txt file and threw some garbage in it >.>

I found an old post during my search from a guy talking about a tool that can compress and decompress groups of files packed in LZ77, but he lost it and didn't find. Anyone know that tool? It would be VERY useful.

QUOTE(Vampires @ Jan 6 2009, 12:38 AM) Europe version don't use special chars, it's just use tags. For example: < - (open tag), ^ - (reverted character tag), ! - (character), > - (close tag) = . That will be reverted !. Other characters: ,
 

Vampires

Member
Newcomer
Joined
Mar 16, 2008
Messages
17
Trophies
0
XP
74
Country
Serbia, Republic of
WeaponKnight, search in google for GbaDecmp for decompression (don't pack files with it) and GBACrusher for comression. Read basics about GBA lz77 to undestand how it works. (I've my own lz77 decompression C++ source code, if you know C++ I can share it with you.)
In Layton there're 1 archive can store several txt files. So, first you need unpack file, then extract all txt's from decompressed file. Translate it, convert special chars to tags, make an archive and compress it.
 

WeaponKnight

Member
OP
Newcomer
Joined
Dec 22, 2007
Messages
8
Trophies
0
XP
74
Country
Brazil
psycoblaster said:
when dealing lz77 compression, use crystaltile2.
That's one of the tools I tried, but it's mostly in Chinese and everytime I find a translation the link is broken.
I found some options to decompress the files, but it also makes one big txt file instead of separating them. If I edit this file and compress it again, it doesn't work.

I looked for an option to pack the many txt files from the US version, but didn't find any options to do so...

EDIT:
QUOTE(Vampires @ Jan 8 2009, 12:50 PM) WeaponKnight, search in google for GbaDecmp for decompression (don't pack files with it) and GBACrusher for comression. Read basics about GBA lz77 to undestand how it works. (I've my own lz77 decompression C++ source code, if you know C++ I can share it with you.)
In Layton there're 1 archive can store several txt files. So, first you need unpack file, then extract all txt's from decompressed file. Translate it, convert special chars to tags, make an archive and compress it.
I was typing when you posted =P
I'm learning Java. People say C++ and Java are very alike so that may help. Having the code in a language I'm at least a little familiar with would make learning LZ77 a lot easier, thank you
smile.gif


I got GbaDecmp, and it worked like Crystaltile2, so I guess I need to learn how to extrat the txts and then how to pack them. Gonna look for GBACrusher now.

lol I chose Layton because it seemed easy and now I'm jumping into packing and compressing files
tongue.gif

Thanks for all the help so far, guys. You all rock
wink.gif
 

Vampires

Member
Newcomer
Joined
Mar 16, 2008
Messages
17
Trophies
0
XP
74
Country
Serbia, Republic of
WeaponKnight, yeah, I think this two languager pretty similar.
It's pure C++, maybe you'll need to add some header files. It's full function, so you'll just need to call it from main code. It's returning size of decompressed file.
CODE#include

int LZ77UnComp(LPSTR input, LPSTR output, int comOffset);
int LZ77UnComp(LPSTR input, LPSTR output, int comOffset)
{
int firstByte = 0, sysByte = 0, gbaByte = 0, decByte = 0, gbaBit = 0, size = 0, readsizoff = 0, readsize = 0, offset = 0;

FILE *lzCom, *lzDec;

fopen_s (&lzCom, input, "rb");
fopen_s (&lzDec, output, "wb");

fseek (lzCom, comOffset, SEEK_SET);

fread(&firstByte, 1, 1, lzCom);

if (firstByte != 0x10)
{
fclose (lzCom);
fclose (lzDec);
return -1;
}

fread(&size, 1, 3, lzCom);

while (1)
{
if (ftell(lzDec) >= size)
{
break;
}
fread(&sysByte, 1, 1, lzCom);
for (int i = 0; i < 8; i++)
{
if (ftell(lzDec) >= size)
{
break;
}
gbaBit = (sysByte & 0x80) >> 7;
sysByte = sysByte 12) + 3;
offset = readsizoff & 0xFFF;
offset = offset + 1;

fseek (lzDec, ftell(lzDec) - offset, SEEK_SET);

for (int j = 0; j < readsize; j++)
{
fread(&decByte, 1, 1, lzDec);
offset = ftell(lzDec);
fseek (lzDec, 0, SEEK_END);
fwrite(&decByte, 1, 1, lzDec);
fseek (lzDec, offset, SEEK_SET);
}
fseek (lzDec, 0, SEEK_END);
readsizoff = 0, readsize = 0, offset = 0;
}
}
sysByte = 0, gbaByte = 0, decByte = 0, gbaBit = 0, readsize = 0, offset = 0, readsizoff = 0;
}
fclose (lzCom);
fclose (lzDec);
return size;
}
 

WeaponKnight

Member
OP
Newcomer
Joined
Dec 22, 2007
Messages
8
Trophies
0
XP
74
Country
Brazil
Hey there guys!

It's been months since I last worked on this translation, but I found some tips lately and got some progress and motivation to go on =]

Thanks to your help, I managed to decompress the LZ77 files, but got stuck after that as I didn't know what to do. After some research (especially here and the current thread) I found out how the files are organized, BUT there are still two things left:

decompressedTextLayton.png


This is otext.pcm, in the French otext folder.
The first line is the package file header. It's one of the things I don't know what means yet, but I'll leave that for last.

In the second line:
20 00 00 00 B0 00 00 00 00 00 00 00 86 00 00 00

- A byte 0x20, which I guess means the start of a file.
- A single byte, wich is the one I'm trying to figure out. I have no idea of what it does. In the first file it's 0xB0, then 0x90 in the second, 0xB0 again in the third and 0xA0 in the fourth file. I tried to see a pattern here but failed.
- The last byte is the file size, no problem.

Then, in the following line, we have the file name, and finally the data, starting at the next line and going for the size marked previously.

My main concern now is: what does that single byte mean in each header? Any ideas?

If anyone wants to take a look, here's the file shown in the pic.
 

Vampires

Member
Newcomer
Joined
Mar 16, 2008
Messages
17
Trophies
0
XP
74
Country
Serbia, Republic of
It's an archive file. For example first file block start at 0x10.
4 bytes (0x00000020) - textOffset. I think it's always will be 0x20. Beginning of the block + textOffset = beginning of the text.
4 bytes (0x000000B0) - fileSize. Beginning of the block + fileSize = original size of this whole block.
4 bytes (0x00000086) - textSize. Go to textOffset, read textSize = original size of the text block.

As you can see there's nothing hard about it. It woud be easier to do it if you know any programming language.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    SylverReZ @ SylverReZ: https://www.youtube.com/watch?v=hke2YUirpf4 +1