Professor Layton Portuguese Translation

Discussion in 'NDS - ROM Hacking and Translations' started by WeaponKnight, Jan 5, 2009.

Jan 5, 2009
  1. WeaponKnight
    OP

    Newcomer WeaponKnight Newbie

    Joined:
    Dec 22, 2007
    Messages:
    8
    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.
     


  2. Vampires

    Newcomer Vampires Member

    Joined:
    Mar 16, 2008
    Messages:
    17
    Country:
    Russia
    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: ,
     
  3. cocomonk22

    Member cocomonk22 GBAtemp Fan

    Joined:
    Oct 24, 2006
    Messages:
    304
    Country:
    United States
    I agree with Vampires on using the European version instead. Look into lz77 packing tools.
     
  4. WeaponKnight
    OP

    Newcomer WeaponKnight Newbie

    Joined:
    Dec 22, 2007
    Messages:
    8
    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 =]
     
  5. ninhokova

    Newcomer ninhokova Newbie

    Joined:
    May 30, 2008
    Messages:
    5
    Country:
    United States
    Enfim uma tadução para esse jogo em português!!!!!!!
     
  6. Jax

    Member Jax Pip Pip Cheerioink!

    Joined:
    Jul 31, 2006
    Messages:
    4,092
    Location:
    L.A.V.
    Country:
    Portugal
    Pena que é para o português do Brasil... [​IMG]
     
  7. Noitora

    Member Noitora ::

    Joined:
    Aug 9, 2007
    Messages:
    3,768
    Location:
    Athens
    Country:
    Greece
    This is an English speaking community guys.
     
  8. Toni Plutonij

    Former Staff Toni Plutonij *has TrolleyDave & tiny p1ngy on moderating shelf!

    Joined:
    Dec 22, 2007
    Messages:
    8,153
    Location:
    Depths of Nuclear powerplant
    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! [​IMG]
     
  9. psycoblaster

    Member psycoblaster Divine

    Joined:
    Jan 26, 2008
    Messages:
    2,132
    Location:
    Seoul.. (in Korea)
    Country:
    Korea, South
    NVM

    make sure the game supports additional characters.
    Try using an S-JIS font file and see if it works.
     
  10. Noitora

    Member Noitora ::

    Joined:
    Aug 9, 2007
    Messages:
    3,768
    Location:
    Athens
    Country:
    Greece
    Lucky me I have a table and font mapped with Greek [​IMG]
     
  11. ninhokova

    Newcomer ninhokova Newbie

    Joined:
    May 30, 2008
    Messages:
    5
    Country:
    United States
    Im sorry, I had forgotten.
    My English is terrible!!!!!
     
  12. WeaponKnight
    OP

    Newcomer WeaponKnight Newbie

    Joined:
    Dec 22, 2007
    Messages:
    8
    Country:
    Brazil
     
  13. psycoblaster

    Member psycoblaster Divine

    Joined:
    Jan 26, 2008
    Messages:
    2,132
    Location:
    Seoul.. (in Korea)
    Country:
    Korea, South
    when dealing lz77 compression, use crystaltile2.
     
  14. Vampires

    Newcomer Vampires Member

    Joined:
    Mar 16, 2008
    Messages:
    17
    Country:
    Russia
    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.
     
  15. WeaponKnight
    OP

    Newcomer WeaponKnight Newbie

    Joined:
    Dec 22, 2007
    Messages:
    8
    Country:
    Brazil
    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 [​IMG]

    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 [​IMG]
    Thanks for all the help so far, guys. You all rock [​IMG]
     
  16. psycoblaster

    Member psycoblaster Divine

    Joined:
    Jan 26, 2008
    Messages:
    2,132
    Location:
    Seoul.. (in Korea)
    Country:
    Korea, South
    I made a language file for it. Ask noitora, he has it.
     
  17. Vampires

    Newcomer Vampires Member

    Joined:
    Mar 16, 2008
    Messages:
    17
    Country:
    Russia
    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;
    }
     
  18. knl

    Member knl I can change this?

    Joined:
    Jun 2, 2003
    Messages:
    658
    Country:
    Brazil
    I couldn't help but think you were being sarcastic at this point.
    I mean, come on, "fallow"?

    anyways, good luck with the translation!
     
  19. WeaponKnight
    OP

    Newcomer WeaponKnight Newbie

    Joined:
    Dec 22, 2007
    Messages:
    8
    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:

    [​IMG]

    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.
     
  20. Vampires

    Newcomer Vampires Member

    Joined:
    Mar 16, 2008
    Messages:
    17
    Country:
    Russia
    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.
     

Share This Page