gemot encubed  

Go Back   gemot encubed > Gemot > Technical Issues

Technical Issues For bug reports, problem solving, and help running Japanese software.

Reply
 
Thread Tools Display Modes
  #1  
Old 2012-05-08, 10:17
albert1905 albert1905 is offline
Visitor
 
Join Date: May 2012
Posts: 5
Question How to extract archive files from *.tex file of White album-綴られる冬の想い出-..?

First of all I'm not a native. I'm sorry for my bad english.

Well, I've been working on trying to unpacking *.tex file from white album-綴られる冬の想い出- to translating the game. (The *.tex file is not a latex file, but texture file.)

I tried to using all of the extractors, cg ripping tools, etc.. BUT,,
Except of 'RavioliGameTools_v2.5', all of programs just can not open *.tex file of white album-綴られる冬の想い出-.

http://www.mediafire.com/?lvu9bst53k5cw8l

Although RavioliGameTools_v2.5 can scanning *.tex file, but it does not support all of *.tga format.
When I extract files and open *.tga file, it was broken and viewer programs are detecting decode error...

I tried to using hex editor(MadEdit-0.2.9.1) and then, I find all of *.tex files containing 'Lz77'.
So, I searched Lz77 editor tools but, all of the programs support GBA.

Well... There a someone who extracts CG from white album-綴られる冬の想い出-.
But he or she does not reply how to extract CG from the game.

http://www.anime-sharing.com/forum/t...5Bcg%5D-57069/

I don't know how to dyscript *.tex file and solve Custom Lz77 algorithm of Lead/Aquaplus. What can I do..?

Here are some of *.tex files of white album-綴られる冬の想い出-.

http://www.mediafire.com/?9cglclodydicgzf


p.s
Is there anyone who can write 'Lz77' BMS scripts of 'quickbms'..?
http://aluigi.altervista.org/quickbms.htm

Last edited by albert1905; 2012-05-08 at 10:25.
Reply With Quote
  #2  
Old 2012-05-10, 16:39
Unregistered
Guest
 
Posts: n/a
Default

Extraction of CGs isn't very useful for the translation by itself because you'll have to somehow repack CGs after translating them. Do you have a LZ77 packer that's compatible with WA engine? I suspect that the scripts are packed as well and that's what really matters for a translation project.
Also, you could've chosen better samples: two *_logo.tex files are better for finding out the packing algorithm, because they're single fullscreen (1280x720 32bpp) images consisting mostly of a one color.
*.tex archives have a header ("Texture") with packed and unpacked sizes, payload of one or more LZ77-compressed images and a footer ("Parts").
Headers will have to be remade to reflect the changes of payload length after editing, while footer can probably be copied to the new .tex without any changes.
Images can be decompressed with something like ttp://wiibrew.org/wiki/LZ77 if you add handling of LZ77/LZSS "distances" which are outside of "window" size there (see relevant Wikipedia entry for algorithm explanation).
Reply With Quote
  #3  
Old 2012-05-11, 02:40
albert1905 albert1905 is offline
Visitor
 
Join Date: May 2012
Posts: 5
Default

Thanks for your advice. But I can't figure out the algorithm of Wii..

Last edited by albert1905; 2012-05-11 at 02:42.
Reply With Quote
  #4  
Old 2012-05-11, 09:21
Unregistered #2
Guest
 
Posts: n/a
Default

I'm afraid you will have not just to figure it out, but write a packer and unpacker too, because any premade tools to handle this format don't seem to exist (yet?).
Here's a detailed explanation with example in Japanese (because you probably know it better than English): ttp://www.geocities.jp/m_hiroi/light/pyalgo32.html
Python is easy to program with, if you know any other programming language, you can probably find LZ77 examples written in it too, and previous example isn't Wii-specific.

TL;DR: write it yourself or wait for the tools to appear. You, as a translator, should be more worried about getting the script from/into the game first of all anyway.
Reply With Quote
  #5  
Old 2012-05-11, 10:28
albert1905 albert1905 is offline
Visitor
 
Join Date: May 2012
Posts: 5
Default I have another problem..

Yes, you're right. Cause I'm not a programmer. And there are no premade tools for this format too.

But it is easy to find a script of this game. Script.sdat contains all of the script of this game. But WA use its own fonts. There is no CreatefontA funtion.
If I replace エコーズ to another language, it prints "blank" on the game!
http://imageshack.us/photo/my-images/69/60090269.png/

I guess font.pck file ~it can be unpacked to maintext.fnt and select.fnt by asmodean's exwatfopck tool.. but you'll know that I can not repacking that *.fnt files to font.pck file~
contains some information of the shift-jis code.

unpaking tool and font.pck file http://www.mediafire.com/?bi568pvgp5ihm79

So I have another problem that I have to replace the font.pck file to my own fonts... But I have no idea how to figure out the structure of the font of this game.
Is there a some analysis game font tutorials? How can I make a fonts..?

Last edited by albert1905; 2012-05-11 at 11:03.
Reply With Quote
  #6  
Old 2012-05-12, 00:48
Unregistered #2
Guest
 
Posts: n/a
Default

The fonts, unsurprisingly, have the same format as .tex files except that they aren't compressed at all. Which means that the game engine can read non-compressed images, and you probably won't have to write a packer to compress edited images after all (hopefully, they'll only need new headers).
I don't know where WA stores the mapping table from Shift-JIS symbols to font glyphs, so you'll have to replace existing glyphs with the ones needed for your language (there are 2176 glyphs in MAINTEXT and 574 in SELECTTEXT, 2750 total - that's way more than enough for most languages) and run your scripts through some kind of mapping table so that they look like they're written in Japanese to the WA engine.
Since fonts are uncompressed, anything that can work with raw images (XnView, IrfanView etc.) will work with them too. But you must know exact positions of font images in Font.pck and image properties for this to work. Find "Texture" header in font files and look for properties there. WA uses big-endian format of numbers in its archives, so you'll likely have to change the way your hex editor interprets data to be able to see image resolution etc. (look up "endianness" on Wikipedia for details).
According to the MAINTEXT Texture header, image dimensions are 2016x1404 and it's 11321856 bytes long (11321892 including 36 bytes long Texture header). This gives us 4 bytes per pixel (11321856 / 2016 / 1404) = 32 bits per pixel (bpp), which generally means 24 bits for red-green-blue components and 8 bits for alpha channel (transparency). Armed with this information, count 36 bytes from the "T" in "Texture" and save the following 11321856 bytes as a new file (MAINTEXT.raw, for example). Then open it in any viewer/editor (I recommend GIMP) as a RAW image, fill resolution and color format from the Texture header and have fun editing glyphs. Note that GIMP will let you save raw images as raw only if you "Export" them. Insert saved images into Font.pck at exactly the same positions you've extracted the from (immediately after corresponding 36-byte long Texture header). Image size MUST stay the same, so double-check it before insertion.
I'll leave the processing of SELECTTEXT to you.

Here's how the text looks with vertically flipped MAINTEXT:
ttp://img715.imageshack.us/img715/6036/mhitealbuw.jpg

I've had a look at the scripts and they're compiled to bytecode, which very likely means that you won't be able to change lengths of the text lines without decompiling and recompiling the script. It isn't as difficult as it sounds, but it still requires some programming skills, so your translation project won't progress without a programmer, whether you like it or not.
And since I don't feel like writing another wall of text, decompiling and recompiling bytecode is covered in a VN hacking tutorial available at ttp://vn.i-forge.net/tools/
Reply With Quote
  #7  
Old 2012-05-12, 03:20
albert1905 albert1905 is offline
Visitor
 
Join Date: May 2012
Posts: 5
Default Thank you!

Wow.. I'll give it a try! Thank you very much for your reply!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to extract words from *.sdat file of White album-綴られる冬の想い出-..? Unregistered Technical Issues 1 2016-01-02 13:14
How to extract scripts from an .arc file ? raphael512 Production & Help 3 2014-04-01 09:15
How to extract .dat files? Unregistered Technical Issues 2 2012-02-24 20:55
How to extract cg in PS2 game image file? ps2 Technical Issues 4 2007-05-26 13:29
Can someone please tell me how to extract Actress' files? General Discussion 0 2006-07-31 15:17


All times are GMT -8. The time now is 19:32.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.