Jump to content

Recommended Posts

Ok, I'll try to prepair a 'light version' for editing, if I reduce the game that much, you will not be able to go past the first video but if it's enough...


EDIT : Done, I have a light version (314 Mo, 187 Mo in a .zip), I'm uploading it now, the game runs correctly up to the first video (missing in the package). I'm uploading it right now. Btw I just realized I gave you the French notation Mo instead of MB up until now, sorry for that x)

 

EDIT 2 : Here is the link : [i deleted the link, PM me for information]

Link to post
Share on other sites

Ok, I'll try to prepair a 'light version' for editing, if I reduce the game that much, you will not be able to go past the first video but if it's enough...

 

Maybe, maybe not. It depends if the game does its decryption/decompression when loading the file or if it does it only when reading it. You could do it to the first line of dialogue to be a bit safer, but we'll see.

Link to post
Share on other sites

Oh, don't worry, there is a prelude part, with some text and choices before the video, you can have a view of what look like the display if that's the question. (The first video doesn't appear at the very beggining). Basically, I just replaced all the content of the heaviests archives with the smallest file of each original archive, you will only hear 1 sound and see 1 picture with the text.
Thank you again for giving it a look :)

Link to post
Share on other sites

Ok yeah it's just compression, not encryption. I haven't made a decompresser yet, but here's the decompressed file: http://a.pomf.se/ixanzt.rar

 

EDIT: Ok, made a decompresser and a fake compressor: http://a.pomf.se/qfzmbb.rar

 

Usage is:

Phantom_de_comp.exe [-e/-c] <infile>

 

-e: Extract <infile>

-c: Compile <infile>

 

So just give it sn.bin as "Phantom_de_comp.exe -e sn.bin" to extract it, then "Phantom_de_comp.exe -c sn_decomp.bin" or whatever name it has after you edit it. sn_new.bin will be your fake compressed file to use in the game.

 

The terrible code I'm using is just ripped from the game, but here if you want to make it better: http://pastebin.com/bg32gpXG- The compressor just adds a 0xFF byte every 8 bytes, so the game just copies the file directly and doesn't use the ring buffer.

 

DJrVdkX.jpg

Link to post
Share on other sites

Wow, you're great, I tried your program and it seems it works, but strangely, I can't edit the file. More precisely, I open the uncompressed file with notepad++, indicate the character setting to Japanese Shift JIS, find the first line (殺される), but whatever I put into this line, when I recompile the file, the game runs, but when I click on 'Start', the screen goes black and returns to the menu.
So the last question is how you edited it ? Why is there still weird text and symbols around the game's text in the decrypted file ? (And did you run the game in standard locale or Japanese locale ?)
So really, thank you for your work, I will add the translation of this novel to my projects (in fact it's the next one)

Link to post
Share on other sites

Well there's still a lot more to the file than just compression. Looks like some custom bytecode, in which case there's probably jump locations in the script, which break if you change the sizes of strings. I just edited the bytes that were there, and didn't change the size. It reads the script opcodes at base + 0x2F7FC. Opcode 0x45 is text.

Link to post
Share on other sites

So basically any replacement and original must have exactly the same size in bytes... Do you think there's'a way to edit it simply ?

I even tried to erase a kana from the text and then rewrote it, it didn't work.

 

EDIT : Ok I figured out how you did the modifications, not only there's the size restriction but also find the bytes sequences and replace them with encoded text sequences is pretty long... I hope there's a way to indicate the lines' size inside the bin, otherwise we'd have to edit the executable, and that'd be a completely different story...

 

EDIT 2 : Well I worked on the binary file, I've noted ome patterns for displayed lines : (all the independant valors are hexadecimal, the names and lines are encoded either in Japanese Shift JIS either in ASCII (S JIS characters use 2 bytes each) )

 

Narrative parts :

[sometimes similar pre-sequence] 00 45 [beta sequence] [line1] [closure sequence] (45 [following beta sequence] [following line] [closure sequence]...)

Voiced lines :

[sometimes similar pre-sequence] 90 0D 00 [character name] 00 44 [alpha sequence] 59 45 [beta sequence] [line1] (25 E4 [second part if separated]) [closure sequence]

 

The parts in brackets () are optional

Alpha sequence : for voiced lines, indicate which audio file take in vo.afs

Beta sequence : line number. For the voiced lines, even those containing two lines separated by a '25 E4' have only 1 alpha sequence and 1 beta sequence ; but as narrative parts contain a lot of separated lines (see above) each line has its own beta sequence

Closure sequence : 00 4A FF FF 6A FF FF FF FF 49 FF FF FF FF : the same throughout the whole file

The pre-sequences are different for narrative and voiced lines, and aren't the same throughout all the file

 

I named the alpha and beta sequences arbitrarily on my draft, they have some kind of specific form, but they have a logical order

 

I still haven't found the string lengths in the binary file, I'm continuing to search, but I'm afraid that they could be in the executable :(

 

If anything is unclear in what I said just ask me.

 

Btw, maybe I should open a separated topic ? Anyway, I keep trying to decode the file, if you have anything new, please tell me ^_^

 

EDIT 3 : Mea culpa, the beta sequence isn't a global counter of lines, it is reinitialized each time a scene ends. Which means, by counting occurence of the first beta sequence (+opcode)  : "45 FF FF 00 00" that there are 94 scenes, of variable sizes. But I confirm that alpha sequences are indicators for voice files.

And there's one more thing, I tried to add a byte in one of the very last lines, and it crashed instantly, which means that the program loads the whole binary file at the very beggining, and compare all the string lenghts in the same time.

Link to post
Share on other sites
  • 2 weeks later...

EDIT 3 : Mea culpa, the beta sequence isn't a global counter of lines, it is reinitialized each time a scene ends. Which means, by counting occurence of the first beta sequence (+opcode)  : "45 FF FF 00 00" that there are 94 scenes, of variable sizes. But I confirm that alpha sequences are indicators for voice files.

And there's one more thing, I tried to add a byte in one of the very last lines, and it crashed instantly, which means that the program loads the whole binary file at the very beggining, and compare all the string lenghts in the same time.

Link to post
Share on other sites

Kelebek1 : It's all ok, binaryfail gave me a tool to unpack the parts of the decompressed file, and another tool to track the opcodes that the game calls while running the game, I'm currently writing some code to extract the strings into a file and then repack new file by modifying the 'goto' locations in the file. As you said, it's long and boring, but up until now, I'm done with the first script file (there are 98 script files, and 94 of them contain strings, for a total of 20106 lines (plus the choices that I didn't take into account for now) and the script my code can handle only contain 142 lines :( )

Btw, the extracting/repacking tool I'm writing will use the extractor you gave me, can I add your name in the credits ?

Link to post
Share on other sites

So, i'm trying to get the text for Tokyo Alice to give to someone to translate it. I extracted the .xp3 files with xp3tools and got a bunch of compiled .pyc files. Then i decompiled the .pyc files and got a bunch of .pyc_dis. I don't know what to do with the .pyc_dis files, or which file is the text, or even if i've extracted the right files. Any help?

Link to post
Share on other sites
  • 2 weeks later...

Here I am having a request again. Is there someone who can help me to identify which file contain the scripts and extract it for me.

Game: White Album

 

AlbumModeParts.pck

BGM.pck

Caution_autosave.tex

CautionParts.tex

Font.pck

GuideParts.tex

MovieReplayParts.tex

MusicModeParts.tex

OptionParts.tex

PatternFade.pck

SPVoice.pck

SSMP_logo.tex

STING_logo.tex

SystemSE.pck

thumbnails.tex

TitleParts.tex

VoiceMessageParts.pck

 

AMP.pck

BG.pck

CalendarParts.tex

EventList.bin

GameParts.tex

LipSync.pck

MoveSelectParts.tex

PanelList.bin

Script.sdat

SE.pck

Voice.pck

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...