My quickBMS scripts

Coders and would-be coders alike, this is the place to talk about programming.
Rmm4K
ultra-n00b
Posts: 3
Joined: Tue Jan 21, 2020 10:44 pm

Re: My quickBMS scripts

Post by Rmm4K » Wed Jan 22, 2020 12:37 am

Does anybody here have the skills to make a bms script for the tekken 4 3d models?

marcoxD95
ultra-n00b
Posts: 6
Joined: Sun May 26, 2019 10:14 pm

Re: My quickBMS scripts

Post by marcoxD95 » Sun May 16, 2021 1:13 pm

AlphaTwentyThree wrote:
Tue May 29, 2012 12:04 am
sdu extractor for "The Suffering" (Xbox)
Uses my new version of the Xbox ADPCM header adder, so be sure to update that!
XMV movies can be converted with VGM Toolbox (at least in most cases).
Remember to decode the *.lwav files with toWAV because the vgmstream playback is errornous!

Code: Select all

# extract the *.sdu and *.vdu files from The Suffering (Xbox)
# (c) 2012-05-29 by AlphaTwentyThree of XeNTaX

include "func_header_XADP.bms" # be sure to have this file in the same directory!
idstring "SRSC"
get UNK byte
get UNK byte
get INFO long
get ENTRIES long # head/file/tail entries
goto INFO
get EXT extension
if EXT == "sdu"
	callfunction sdu 1
elif EXT == "vdu"
	callfunction vdu
endif


startfunction sdu
	for i = 1 <= ENTRIES
		get SIG byte # head/data/tail
		get UNK2 byte #always 3?
		get FILE_ID short
		get UNK4 short # some identifier
		get OFFSET long
		get SIZE long
		if SIG == 2
			if FILE_ID != 0
				savepos MYOFF
				math OFFSET += 0x2c
				goto OFFSET
				get CH short
				get BITS short # always 4
				get FREQ long
				goto MYOFF
			endif
		elif SIG == 4
			get NAME basename
			string NAME += "_"
			string NAME += FILE_ID
			#string NAME += "_"
			#string NAME += UNK4
			string NAME += ".lwav"
			callfunction XADP 1
		elif SIG == 5 # some file tail - do nothing?
		endif
	next i
endfunction

startfunction vdu
	for i = 1 <= ENTRIES
		get SIG byte # head/data/tail
		get UNK2 byte #always 3?
		get FILE_ID short
		get UNK4 short # some identifier
		get OFFSET long
		get SIZE long
		if SIG != 66
			get NAME basename
			string NAME += "_"
			string NAME += FILE_ID
			string NAME += ".xmv"
			if FILE_ID != 0
				log NAME OFFSET SIZE
			endif
		endif
	next i
endfunction
Does anybody know how to extract the .sdu and .vdu archives from the PC version of the game? I tried this script here but it didn't extract anything so my guess is, it only works with the Xbox version.

After digging some more I also found this:
http://wiki.xentax.com/index.php/Surrea ... ot_Engine)

I tried the Drakan bms script on it and it did work, however, I end up with a bunch of .dat, .ico and .img files. My guess is that the audio stuff is in some of these .dat files but I found no way to open/extract/playback them yet.

Does anybody here know anything by chance? I could just use the Xbox version but from my experience the Xbox audio codec is often inferior and sounds bad especially in the hights.

AlphaTwentyThree
double-veteran
double-veteran
Posts: 985
Joined: Mon Aug 24, 2009 10:55 pm
Has thanked: 75 times
Been thanked: 647 times

Re: My quickBMS scripts

Post by AlphaTwentyThree » Mon May 17, 2021 6:43 am

I'm not coding anymore. Given the age of the game, they mostly used mp3 for music. It's actually inferior to the native Xbox codec (a really good ADPCM). After all, it's the direct pre-decessor of WMA.
If you like what you see, why not click the little Thank You button? ;) It will definitely motivate me! :)
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks ;)

marcoxD95
ultra-n00b
Posts: 6
Joined: Sun May 26, 2019 10:14 pm

Re: My quickBMS scripts

Post by marcoxD95 » Mon May 17, 2021 2:36 pm

AlphaTwentyThree wrote:
Mon May 17, 2021 6:43 am
I'm not coding anymore. Given the age of the game, they mostly used mp3 for music. It's actually inferior to the native Xbox codec (a really good ADPCM). After all, it's the direct pre-decessor of WMA.
Yeah, you could be right. I have a feeling that this BMS script doesn't even work properly on these files. I also end up with many 1kb files that just seem to be corrupt. Some files do seem to contain data but this seems to be only voice acting and video audio. I was able to import these in Audacity with the raw audio import option but couldn't find anything else out. Their header doesn't seem to be recognized by anything except rarely as rare video codec. I also didn't find any music so far so my guess is, it doesn't even get extracted and I extracted multiple .sdu and .vdu files already. The PC version of The Suffering just doesn't seem to be extractable right now, only the Xbox version with your script. If nothing else works I guess I just gonna work with these but still gotta rip Ties That Bind since I was only able to find a The Suffering 1 Joshw xbox rip.

I decided to upload the PC version files in case anybody with the knowledge wanna try figuring out how to extract their data properly including the music audio. Drakan script doesn't seem to work properly since more than half of the files end up as unusable 1kb files.
https://www.mediafire.com/file/nel7nspc ... es.7z/file

marcoxD95
ultra-n00b
Posts: 6
Joined: Sun May 26, 2019 10:14 pm

Re: My quickBMS scripts

Post by marcoxD95 » Sat Jul 31, 2021 12:31 am

Not sure if anybody cares but I was able to extract the PC OST of The Suffering. It isnt as good as the Xbox source so dont waste your time like me.

Furthermore, I dont know if anybody knew but the script to extract music from the Xbox version of The Suffering also works on the second game Ties That Bind. Xbox version of course. Was just a random thing I figured out. Weirdly enough didnt find a single OST rip of Ties That Bind. You btw need to extract a file named music.sdu which, at least on the Xbox, is in some weird shared folder. Furthermore it seems like that also in this case the Xbox has the highest music quality. Both PS2 and PC seem to use 22050khz files for everything. The Xbox uses 44100khz for dynamic action music and 22050khz for dark ambient music. Sometimes there also seem to be weird 32000khz or even 6000khz music files but some are also duplicates.

Just thought I leave this note to anyone wanting to rip the music from the games.

Eraea
ultra-n00b
Posts: 7
Joined: Mon May 28, 2018 2:49 pm
Been thanked: 1 time

Re: My quickBMS scripts

Post by Eraea » Fri Aug 20, 2021 10:39 pm

Hi, looking for help with extracting from a .bdt file. I tried using the func GetType bms but it didn't work. The file has a BDF4 Header unlike the Dark Souls BDF3 and the recent BDF5. The game is from PS3 called Kido Senshi Gundam Unicorn
image_2021-08-21_053842.png
You do not have the required permissions to view the files attached to this post.

Post Reply