Jump to content
XCOMUFO & Xenocide

Xcom Dos 1.4 Sound Extraction Tool


Inteck

Recommended Posts

:) This program was originally intended for Grand Prix 2 by Microprose, Strangely it can extract/insert roughly 88-95% of DOS Xcom 1.4's sounds from its sample.cat files as well.....extracts to .wav format (will sometimes corrupt extracted files...does not harm original files when extracting) Available here[attachment=5436:attachment]

Things I have been asked about this and can answer from experience.......

Q: Can it extract sound files from the first version of Dos Xcom 1.2 Sound.cat files?
A: NOPE
Comment: Renamed the sound.cat files to sample.cat and tried. Manages to seemingly extract files but doesn't work....Playing the "extracted" files will always give you a "file corrupt" message

Q: Can it extract sound files from the TFTD Sample.cat files??
A: NOPE
Comment: Almost manages to the do the job, but the parameters are different enough to throw things off....almost doesn't get it. I get a "class not registered" message when I tried to play these "extracted" files.

Q: How about Xcom Gold/CE; Can it extract stuff from there??
A: YEP
Comment: EXTREMELY similar in structure, unfortunately, not similar enough to immediately insert back into the old 1.4 Dos sample.cat file and have things work 100%. The engines that play the sound effects are dissimilar enough to throw off even the most similar of wav files slightly...Some files will work, others will not. Will not extract everything correctly as in the 1.4 version....will sometimes corrupt extracted files. Just try copying the sound files from MOKS files available at this forum to your DOS 1.4 sound folder and you can see (listen)for yourself how badly off the engines are(CE as opposed to DOS) ....Especially the Alien death screams, they are really weird.
Link to comment
Share on other sites

no specific program is needed to extract, as they are waves with standard riff header that is recognized by any ripper. the 1.2 dos version used different sound engine, and file with sounds stores pure pcm data, which is just binary without any additional information, and that is why extraction is not obvious. they are not corrupt, they are just headerless.

look at my posts in mok's thread: [url="http://www.xcomufo.com/forums/index.php?showtopic=4702"]http://www.xcomufo.com/forums/index.php?showtopic=4702[/url], they cover formats of both 1.2 and 1.4, and explanation why mok's patch does not work with 1.4.

the ce and 1.4 sound files are exactly the same.

tftd sound files have slighly different format. for now i can say only that they are headerless signed pcm.

edit: wrong link Edited by quantifier
Link to comment
Share on other sites

:( Recognized by any ripper???? Hmmmm.......I am unaware of anything or any program which can/will correctly 100% extract the waves from the DOS sample.cat files from 1.4. As a matter of fact I can't find ANY program to extract the sounds from the DOS 1.2 program.cat files into any recognizable form. No one has told me, or for that matter, posted anything in this forum as far as useful extraction programs for the sound files. No one has even provided any links to programs for sound extraction for these games .cat files.....If you have or know of any software, (ANY ripper??? I sure haven't found one) which extract the sounds in the Dos 1.2 as well as 1.4 sound files etc., then by all means-let everyone know where it is at so we can download it and work with it. If necessary I won't mind posting it.....the DOS xcom sound problems have gone on long enough (over 10 years now with no support in sight) and really need to be fixed.
Link to comment
Share on other sites

i meant any ripper could extract 1.4 sounds...
anyway, [url="http://student.uci.agh.edu.pl/~jasiekz/rippers"]here[/url] are three rippers. i don't remember which one i used, but i extracted 1.4/ce sounds 100% correct (files sample.cat, sample2.cat, sample3.cat)
as for 1.2, [url="http://student.uci.agh.edu.pl/~jasiekz/oldrip.zip"]here[/url] is simple program i wrote for 1.2 sound extraction. it is _very_ crude and completely _not_ fool proof, doesn't do any checks, and will work correctly only on sound1.cat, sound2.cat and intro.cat files (these 3 store respectively battlescape, geoscape and intro sounds). create an empty directory, copy there one of the files and the program, then give filename as paramater (eg. 'oldrip.exe sound1.cat') and it will create separate file for each sound. to play them you have to open them as raw audio data, unsigned 8 bit @ 8 kHz.

i think of writing a program (set of programs) to extract/rebuild sound files. however, as my knowledge is not sufficient, they won't do any converting/resampling, just simple file operations.
Link to comment
Share on other sites

:Coffee: Well if you can do that, then so much the better. It will be one less step to be overcome for correction in the dos versions sound mistakes. An encoder to put the re-worked sounds back in the .cat files that works 100% is probably a good thing to make. Re-sampling will have to be done with something like Cooledit 2000 or similar (if you can find it for download that is....it and all cooledit products have been discontinued :( )
Link to comment
Share on other sites

ok, ready.
i would post it as attachment, but i got permission on 'upload' directory error. anyway, download from [url="http://student.uci.agh.edu.pl/~jasiekz/sndrip.zip"]here[/url].

to use the program put .execs in ufo\sound directory, then run rip.exe and ripold.exe, resample old files you want to use, rename either newxx.wav or oldxx.wav to ripxx.wav and run glue.exe.

if you don't have any good program like cool pro edit, or don't know how to use it, or have ce (ce doesn't have old sound files while in dos version they are simply unused), download already resampled sounds in proper format from [url="http://student.uci.agh.edu.pl/~jasiekz/old.zip"]here[/url].

i wrote these programs mainly for me, so use them at your own risk.
Link to comment
Share on other sites

:blink: Well, you have almost got it. I tried the "glue" program in conjunction with your sound files. After it made the sample2.new file, I renamed it to sample2.cat and copied it over to my DOS UFO 1.4 sound file. I am getting sounds all over in the wrong places :blink2: . Snake slithering sounds/heavy gunshots if I press new or load game. In the tactical screen I am lucky to get any effects at all. I tried to take a look for file comparison with my hex editor to see if I could figure out what is going on, but the sample2.new file is :blink: blank!!! Weird.....I know somethings there, it reads to be about 400+kb....but all my editor is reading is a bunch of 0's oh well. I figure the Toc/offsets aren't right.
Link to comment
Share on other sites

oh. strange. geoscape sounds are stored in sample.cat file, and my programs don't touch it.
did you remember to rename oldxx.wav files to ripxx.wav? it is the part that has to be made manually, because interface to do it from within the program would make sense only if i knew how to make program play sound. glue.exe halts when it can't find ripxx.wav (if you ran it under windows you might haven't seen the message). it would explain why sample2.new was blank. Edited by quantifier
Link to comment
Share on other sites

I think I have found the problem. My computer is telling me- missing file:ripped\ripxx.wav. After trying to put my ripxx.wav files under a "ripped" folder, it still gave me that message even though I had all the sound files renamed to ripxx-rip55. It eventually dawned on me that the program is looking for a wavefile with the entire heading ripped\ripxx.wav which is impossible. The slash \ variable is impossible to put into a file when renaming it. I tried to simply take out the variable "ripped\" by hex editing, so that it would recognize my ripxx files, but the program crashed. If you would, rework the program and take out the "ripped\" and it will probably work.
Link to comment
Share on other sites

Well, lets see, I'll start off with the basics:

I have Win98 with a P3@800Mhz.

The message I am getting is; missing file: ripped\rip01.wav

Yes, its the same message every time.

The sound files(s) I have are located under a folder named "Ripped" on the D drive.

The "Ripped" folder is not under any other folder

The .wav files themselves are named Rip01.wav-Rip55.wav.

All of the renamed rip wav files are taken from your download here at this forum.

Like I said, for some reason, the "glue" program is looking for a file with the full ripped\ripxx.wav name by the looks of it. It isn't simply looking for a file with the name rippedxx.wav or ripxx.wav. As far as I can tell, the file(s) it is looking for has to be named ripped\ripxx.wav.....which is impossible. I have to admit, it doesn't make any sense why it would have this problem on one computer but not another. Edited by Inteck
Link to comment
Share on other sites

ripped\rip01.wav is not a file name. it is file named 'rip01.wav' in the relative path '.\ripped\' where '.' is current directory. if you have directory 'ripped' in root dir of d: (d:\ripped), then copy glue.exe to 'd:\' , then set current dir to 'd:\' and run glue.exe. either of rip programs create 'ripped' dir.

and btw, you might want to use some sounds from 1.4 that are almost the same as in 1.2 (esp. footsteps), because of their higher quality. (11 kHz 8bit is better than resampled 8 kHz 6bit) Edited by quantifier
Link to comment
Share on other sites

:Hyper: HANG ON!!! There it goes :banana: !!! I was wrong.... ( :P not suprising):idea: The glue program is just being particularly cranky and particular as to where it and the wav files are located at. The wavs HAVE to be under the \ufo\SOUND folder in a seperate folder called Ripped. Also, the "glue" program HAS to be located in the "sound" folder itself (no other) in order for it to work..... :hammer: This was just a tad confusing.....sorry about that :blush1: .
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...