Breakthrough - Edit and repackage (most) audio successfully!
Oct 11, 2019 1:34:25 GMT 10
LeigiBoy, MATTEO, and 2 more like this
Post by shiroibara on Oct 11, 2019 1:34:25 GMT 10
Apologizes for my broken English, I'm not native speaker. Three years of my silence but now is time to give you all info, since people starting understanding what .xsew is exactly. You don't need shareware tools to make .xsew files. This files are Microsoft ADPCM. The problem what most converters what exists in web dose not determine very important parameter of game file - PCM sample per ADPCM block, so converting sound files to .xsew with 3rd party tools produce just noise or cracking sound. Look at original .xsew game header:
The offset x26(hex) of header contains number of PCM samples in ADCMP file. Correct number is x80(hex) 128 samples/block (dec). When I started my little project making Japanese voice over pack for RE0 and RE1HD remaster the main problem was find how to convert PCM mono 32 bit to ADCMP file with right PCM sample per ADPCM block at it. After searching as crazy almost whole Internet I finally asked myself answer: if this is MS format may be I need some MS tool for it? And answer is: yes, and it's free, but hidden in some famous SDK which called DirectX. You need at least 2008 SDK version or may be newer. The file what we looking for is called AdpcmEncode.exe. It's located in SDK\Utiltes\bin\x86 folder. You can download this SDK from MS site, no need to setup it, just extract archive with WinRAR or another archiver, navigate to necessary folder and grab the file. So, let's continue my story When I finally got the working tool for conversion I've found what sound files not working yet because the converting files missing another important thing - it's tail. On this screenshot you could see what this is missing from converted file:
The tails is 96 (dec) bytes block at the end of file which indeed starts from hex bytes 73 6D 70 6C and which is most important at on hex bytes 01 00 00 00.
Actually I just add to the end of converted file tail with 96 bytes and replaced all info inside of it with zeroes and keeps only end file marker 01 00 00 00, for game it has no difference what those 96 contains - it's only seeking for 01 00 00 00 marker.
But this is not done yet. After adding tail you need fix header of you created .xsew file and set their correct new file info size (without service info in header) include added tail. The 2 bytes what we interesting (If I remember it correctly now because for 3 years what had passed I'm not 100% sure now) is offset x04, it's endian little order. As soon as figured out that I wrote some bms scripts (look info about at XeNTaX forum) and batch file to automate the job. Finally I got working .xsew files what I've packed back to arc and made my mod.
P.S.
I just downloaded MS DirectX SDK November 2008 and have found new version of AdpcmEncode.exe there. It's support new option - bits per sample in decoded PCM file. And most interesting thing - it's now adds tail to encoded .xsew files, but it shorted that original - missing tIME and ver data. I don't know how this effect the game converted .xsew files - feels free to test it yourself.
I'm uploading tools what I'm using to make voice over pack. Since original PC game had no Japanese voice files at all, I used PS3 iso's to grab PS3 MSF containers which encapsulate Atrac3 plus sound files to PC .xsew. It could be done if few steps what all present in batch file. For additional info please go to XeNTaX forum, because I don't remember now all in details. The archive contains batch file, free audio converter sox.exe, executable Sony SDK converter PS3at3tool.exe, file quickbms.exe used for hex script editing and two AdpcmEncode.exe (old which I used for conversion which not adding tail located in folder Tools and new version in root where batch file present). One VERY important info what I still remember - if you deiced use any PS3 iso's you need one what has no synchronization info with it. This info is some bytes or even block of service data (sorry I don't remember exactly now) what repeats in large files and split them on sectors or whatever, probably for seeking right track for laser when it reads data from DVD. Like this:
The red string is synchronization data what must be removed before processing any conversion and final file should be shrink in size. Sorry I don't have scripts for it now, so try look for info yourself if you interesting use PS3 iso, or just try different one, some of them has no such info, it seems pirates used different tools to obtains iso's.
P.P.S.
I guess you guys want both RE0 and RE1HD Japanese voice packs? RE1 is very interesting - Japan PS3 version of the game has no English demo and ii was replaced for some funny J-POP video which and converted as well - it replace standard demo on title screen which starts if you not press any buttons for few seconds.
Tools could be downloaded here