Offtopic: Into Commodore 64 (6502) coding, pixeling or music?
Xentax is looking for new members for the C64 activities!
Just drop us a message at forum@xentax.com and join the Scene Team!

Forum rules: Click here

Rayman Legends PC Audio Container

Get help on any and all audio formats, or chip in and help others!
spider91
advanced
Posts: 78
Joined: Mon Feb 14, 2011 8:09 am
Has thanked: 18 times
Been thanked: 44 times

Re: Rayman Legends PC Audio Container

Post by spider91 » Wed Sep 02, 2015 2:46 pm

for mono (should work for stereo as well) adpcm files that lonrot posted before

Code: Select all

get NAME basename
goto 0x38
get DATA_SIZE long
set RIFF_SIZE long DATA_SIZE
math RIFF_SIZE += 0x46
set FULL_SIZE long RIFF_SIZE
math FULL_SIZE += 0x8
get CODEC short
get CHANNELS short
get FREQ long
get BPS long
get ALIGN short
get UNKNOWN1 long
get UNKNOWN2 long
get UNKNOWN3 long
get UNKNOWN4 long
get UNKNOWN5 long
get UNKNOWN6 long
get UNKNOWN7 long
get UNKNOWN8 long
get UNKNOWN9 long
set RIFF long 0x46464952
set WAVE long 0x45564157
set FMT long 0x20746d66
set FMT_SIZE long 0x00000032
set DATA long 0x61746164
putVarChr MEMORY_FILE FULL_SIZE 0
log MEMORY_FILE 0 0
append
putVarChr MEMORY_FILE 0x0 RIFF long
putVarChr MEMORY_FILE 0x4 RIFF_SIZE long
putVarChr MEMORY_FILE 0x8 WAVE long
putVarChr MEMORY_FILE 0xC FMT long
putVarChr MEMORY_FILE 0x10 FMT_SIZE long
putVarChr MEMORY_FILE 0x14 CODEC short
putVarChr MEMORY_FILE 0x16 CHANNELS short
putVarChr MEMORY_FILE 0x18 FREQ long
putVarChr MEMORY_FILE 0x1C BPS long
putVarChr MEMORY_FILE 0x20 ALIGN short
putVarChr MEMORY_FILE 0x22 UNKNOWN1 long
putVarChr MEMORY_FILE 0x26 UNKNOWN2 long
putVarChr MEMORY_FILE 0x2A UNKNOWN3 long
putVarChr MEMORY_FILE 0x2E UNKNOWN4 long
putVarChr MEMORY_FILE 0x32 UNKNOWN5 long
putVarChr MEMORY_FILE 0x36 UNKNOWN6 long
putVarChr MEMORY_FILE 0x3A UNKNOWN7 long
putVarChr MEMORY_FILE 0x3E UNKNOWN8 long
putVarChr MEMORY_FILE 0x42 UNKNOWN9 long
putVarChr MEMORY_FILE 0x46 DATA long
putVarChr MEMORY_FILE 0x4A DATA_SIZE long
log MEMORY_FILE 0x6E DATA_SIZE
log NAME 0 FULL_SIZE MEMORY_FILE

lonrot
ultra-n00b
Posts: 8
Joined: Wed Sep 02, 2015 6:38 am

Re: Rayman Legends PC Audio Container

Post by lonrot » Wed Sep 02, 2015 11:33 pm

@AlphaTwentyThree That's a bummer! Thanks for taking the time to respond :)

Update:
@spider91 Thanks, I will try it right away.

lonrot
ultra-n00b
Posts: 8
Joined: Wed Sep 02, 2015 6:38 am

Re: Rayman Legends PC Audio Container

Post by lonrot » Thu Sep 03, 2015 1:29 am

@spider

The script fails to convert sfx_buzzsaw_move_brass_02.wav when processing the file list provided in the previous link.

Code: Select all

Error: incomplete input file 0: Z:\GAMES\Rayman Legends\bundle\606_mountain\test\sfx_buzzsaw_move_brass_02.wav
       Can't read 15631996 bytes from offset 00017a32.
       Anyway don't worry, it's possible that the BMS script has been written
       to exit in this way if it's reached the end of the archive so check it
       or contact its author or verify that all the files have been extracted.
       Please check the following coverage information to know if it's ok.

  coverage file 0    99%   96762      96818

Last script line before the error or that produced the error:
  51  log MEMORY_FILE 0x6E DATA_SIZE

Press RETURN to quit
Last edited by lonrot on Thu Sep 03, 2015 1:39 am, edited 1 time in total.

spider91
advanced
Posts: 78
Joined: Mon Feb 14, 2011 8:09 am
Has thanked: 18 times
Been thanked: 44 times

Re: Rayman Legends PC Audio Container

Post by spider91 » Thu Sep 03, 2015 1:38 am

Upload a file that gives that error. I've tested it on all files from your previous acrhieve only and it worked well.

lonrot
ultra-n00b
Posts: 8
Joined: Wed Sep 02, 2015 6:38 am

Re: Rayman Legends PC Audio Container

Post by lonrot » Thu Sep 03, 2015 1:43 am

spider91 wrote:Upload a file that gives that error. I've tested it on all files from your previous acrhieve only and it worked well.
Here's the file.

spider91
advanced
Posts: 78
Joined: Mon Feb 14, 2011 8:09 am
Has thanked: 18 times
Been thanked: 44 times

Re: Rayman Legends PC Audio Container

Post by spider91 » Thu Sep 03, 2015 1:47 am

Image

Maybe it's about version of quickbms. What is your version?
Last edited by spider91 on Thu Sep 03, 2015 1:49 am, edited 1 time in total.

lonrot
ultra-n00b
Posts: 8
Joined: Wed Sep 02, 2015 6:38 am

Re: Rayman Legends PC Audio Container

Post by lonrot » Thu Sep 03, 2015 1:48 am

It seems that the script is failing only when doing batch requests with folders and subfolders.

When selecting a folder, and selecting "*".

It crashes immediately with the first file.

Code: Select all

Error: incomplete input file 0: Z:\GAMES\Rayman Legends\bundle\sound\common\music_trees\01_jungle_legends\ju_rl_3_ropesnroll_inv\musictree_ju_rl_3_ropesnroll_inv.tpl.ckd
       Can't read 335517175 bytes from offset 00006a77.
       Anyway don't worry, it's possible that the BMS script has been written
       to exit in this way if it's reached the end of the archive so check it
       or contact its author or verify that all the files have been extracted.
       Please check the following coverage information to know if it's ok.

  coverage file 0    99%   27199      27255

Last script line before the error or that produced the error:
  51  log MEMORY_FILE 0x6E DATA_SIZE

Press RETURN to quit

spider91
advanced
Posts: 78
Joined: Mon Feb 14, 2011 8:09 am
Has thanked: 18 times
Been thanked: 44 times

Re: Rayman Legends PC Audio Container

Post by spider91 » Thu Sep 03, 2015 1:56 am

You can create batch file like this (just change pathes to ones you are using)

Code: Select all

for /r %%i in (*.ckd) do (
cd "%%~dpi"
"C:\Users\spider91\Desktop\test\quickbms.exe" "C:\Users\spider91\Desktop\test\script.txt" "%%i"
)
pause

lonrot
ultra-n00b
Posts: 8
Joined: Wed Sep 02, 2015 6:38 am

Re: Rayman Legends PC Audio Container

Post by lonrot » Thu Sep 03, 2015 2:14 am

spider91 wrote:You can create batch file like this (just change pathes to ones you are using)

Code: Select all

for /r %%i in (*.ckd) do (
cd "%%~dpi"
"C:\Users\spider91\Desktop\test\quickbms.exe" "C:\Users\spider91\Desktop\test\script.txt" "%%i"
)
pause
Some questions:

1) What format/extension is the batch file?

2) Where should the batch file be placed at?

3) Is the script.txt the same as script.bms?

4) In the batch file, What calls the location of the root folder (where the files are present)?

Thank you.

spider91
advanced
Posts: 78
Joined: Mon Feb 14, 2011 8:09 am
Has thanked: 18 times
Been thanked: 44 times

Re: Rayman Legends PC Audio Container

Post by spider91 » Thu Sep 03, 2015 2:35 am

1) It's a simple .txt file renamed to .bat
2) In folder with .ckd files or in the main game folder (it will scan subdirectories too)
3) Yes, it's the same script i posted before.
4) Can't undestand this one.

lonrot
ultra-n00b
Posts: 8
Joined: Wed Sep 02, 2015 6:38 am

Re: Rayman Legends PC Audio Container

Post by lonrot » Thu Sep 03, 2015 2:38 am

Following this guide, I made the following batch.bat file:

Code: Select all

for %%i in (*.ckd) DO %CD%\quickbms.exe -o script.bms "%%i" "%CD%" 
Everything is in a single folder, quickbms.exe, script.bms and every existing wav.cpk file, no subfolders.

The batch file returns:
Image

Not a single file is saved. What am I doing wrong?

Update:
Renamed "Rayman Legends" to RaymanLegends and now it works!
Last edited by lonrot on Thu Sep 03, 2015 2:43 am, edited 1 time in total.

spider91
advanced
Posts: 78
Joined: Mon Feb 14, 2011 8:09 am
Has thanked: 18 times
Been thanked: 44 times

Re: Rayman Legends PC Audio Container

Post by spider91 » Thu Sep 03, 2015 2:41 am

Replace

Code: Select all

%CD%\quickbms.exe
with

Code: Select all

"%CD%\quickbms.exe"
You must do it when you have spaces in your filenames/pathes.

lonrot
ultra-n00b
Posts: 8
Joined: Wed Sep 02, 2015 6:38 am

Re: Rayman Legends PC Audio Container

Post by lonrot » Thu Sep 03, 2015 2:44 am

Thanks spider, "Rayman Legends" was causing the error.

Post Reply