XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Thu Aug 17, 2017 10:31 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 467 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8 ... 32  Next
Author Message
 Post subject: Re: My quickBMS scripts
PostPosted: Sat Oct 02, 2010 6:13 pm 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 594 times














You can make the ads go away by registering

pmfAT3_to_aa3.bms
Converts dumped AT3 streams from PMF movies to decodable *.aa3 files.
Code:
get UNKNOWN short
get CODE short

set INTERL 0x2b8
set SKIP 0x8
set LAYERS 1
set JUMP INTERL
math JUMP *= LAYERS
math INTERL -= SKIP
get FSIZE asize
for i = 1 <= LAYERS
    log MEMORY_FILE 0 0
    set OFFSET i
    math OFFSET -= 1
    math OFFSET *= INTERL
    math OFFSET += SKIP
    append
    DO
        log MEMORY_FILE OFFSET INTERL
        math OFFSET += JUMP
        math OFFET += SKIP
        set TEST OFFSET
        math TEST += INTERL
    WHILE TEST <= FSIZE
    if OFFSET < FSIZE # write last block
        get LB asize
        math LB -= OFFSET
        log MEMORY_FILE OFFSET LB
    endif
    append
next i

set MEMORY_FILE2 binary "\x65\x61\x33\x3\x0\x0\x0\x0\x7\x76\x47\x45\x4f\x42\x00\x00\x01\xc6\x00\x00\x02\x62\x69\x6e\x61\x72\x79\x00\x00\x00\x00\x4f\x00\x4d\x00\x47\x00\x5f\x00\x4c\x00\x53\x00\x49\x00\x00\x00\x01\x00\x40\x00\xdc\x00\x70\x00\x08\x00\x00\x00\x00\x00\x00\x4b\x45\x59\x52\x49\x4e\x47"
putVarChr MEMORY_FILE2 0x400 0x1334145 long
putVarChr MEMORY_FILE2 0x404 0xffff6000 long
putVarChr MEMORY_FILE2 0x420 0x1 byte
putVarChr MEMORY_FILE2 0x422 CODE short
goto 0 MEMORY_FILE
get FIRST long MEMORY_FILE
putVarChr MEMORY_FILE2 0x460 FIRST long
savepos DATA MEMORY_FILE
get SIZE asize MEMORY_FILE
math SIZE -= 4
print "here"
append
log MEMORY_FILE2 4 SIZE MEMORY_FILE1
append
get NAME basename
string NAME += ".aa3"
math SIZE += 0x460

log NAME 0 SIZE MEMORY_FILE2

_________________
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 ;)


Last edited by AlphaTwentyThree on Fri Oct 08, 2010 10:59 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Sat Oct 02, 2010 6:22 pm 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 594 times
I've attached a program that can convert PMF to parsed AT3+ files (with RIFF header). I downloaded it from some chinese site, can't remember which one. Use my at3toaa3.bms to convert the results into decodable aa3 files (open with SoundForge).


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.


_________________
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 ;)


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Sat Oct 02, 2010 6:29 pm 
Offline
mega-veteran
mega-veteran

Joined: Fri Jun 11, 2010 12:08 pm
Posts: 310
Has thanked: 75 times
Have thanks: 20 times
Thanks! Works.

pmfdemux don`t work with .pam ps3 video files(message - this is not PMF).
PMF2AVI&AT3 has APPCRASH with .pam files from another game(White Knight Chronicles EX Edition).


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Sat Oct 02, 2010 7:12 pm 
Offline
double-veteran
double-veteran

Joined: Sun Apr 20, 2008 2:58 am
Posts: 823
Has thanked: 5 times
Have thanks: 32 times
The contents of this post was deleted because of possible forum rules violation.


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Fri Oct 08, 2010 10:46 pm 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 594 times
The contents of this post was deleted because of possible forum rules violation.

_________________
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 ;)


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Fri Oct 08, 2010 10:48 pm 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 594 times
MSF converter
Converts PS3 *.msf files into valid *.at3, *.ss2 and *.wav files. Not all variants are supported yet so if you encounter some problem, just PM me and I'll try to add support. :)
Note that some MSF files with AT3 stream state the wrong frequency in the header. The script will tell you when such a file is found. You'll have to change the frequency with viewtopic.php?f=13&p=71565#p71565.
func_header_AT3.bms: viewtopic.php?f=13&p=42999#p42999
func_header_SS2.bms: viewtopic.php?f=13&p=44717#p44717
func_headre_PCM.bms: viewtopic.php?f=13&p=71565#p71565

Code:
# msf_convert.bms
# converts PS3 *.msf containers to playable Atrac files
# (c) 2012-07-22 by AlphaTwentyThree of XeNTaX

include "func_header_AT3.bms"
include "func_header_PCM.bms"
include "func_header_SS2.bms"

IDstring MSF
endian big
set NAME ""
get SIGN byte
get BITSIGN long
get CH long
get SIZE long
if SIGN == 0xc9
   get DUMMY long
endif
get FREQ long
set OFFSET 0x40
math SIZE -= OFFSET
if SIGN == 0x43
   if BITSIGN >= 4
      print "Warning: frequency might be wrong!"
      set BITRATE 132
      callfunction AT3 1
      cleanexit
   endif
endif
if BITSIGN == 1 # wav PCM
   set BITS 16
   set BLOCKALIGN 1
   set CODEC 1
   callfunction PCM 1
elif BITSIGN == 3 # ss2 mono
   set INTERLEAVE 0x10
   callfunction SS2 1
elif BITSIGN == 4
   set BITRATE 66
   callfunction AT3 1
elif BITSIGN == 5
   set BITRATE 105
   callfunction AT3 1
elif BITSIGN == 6
   set BITRATE 132
   callfunction AT3 1
endif

_________________
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 ;)


Last edited by AlphaTwentyThree on Sun Jul 22, 2012 2:47 pm, edited 7 times in total.

Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Fri Oct 08, 2010 10:53 pm 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 594 times
extractXWS.bms
Extracts the Atrac files from *.xws containers (used in some PS3 games). Header is automatically adjusted, files are playable with the Atrac codec installed. Note: DO NOT OPEN ATRAC FILES WITH SONY SOUNDFORGE - ONLY ATRAC3+ FILES!!! It somehow gets the samples of simple Atrac files totally wrong when the sample count isn't adjusted (which none of the scripts does). However, I'm not sure if it's necessary to adjust the samples because I have the feeling that the (necessarily) calculated samples of audio editors could be wrong. The samples could be the value at offset 0x8 into the "fact" area of the header. Compared to the calculated samples in Audition for example, there's quite a discrepancy. Can anyone explain or clear this?
Code:
endian big
getdstring IDENT 8
get UNKNOWN long
get UNKNOWN long
get FILESIZE long
get UNKNOWN long
get UNKNOWN long
get UNKNOWN long
get INFO1OFF long
get INFO2OFF long # unknown informatin

goto INFO1OFF
get UOFF long # unknown information
get CODEOFF long
get MSF long # MSFBANK

goto INFO2OFF
get UNKNOWNOFF long
get UNKNOWNOFF long
get DATASIZE long # size from MSFBANK till end

set OFF MSF
math OFF += 0x14
goto OFF

get FILES long
math OFF += 0x1c
set OFFPOS OFF
set SIZEPOS FILES
math SIZEPOS *= 4
math SIZEPOS += OFFPOS
math SIZEPOS += 0xc
get BNAME basename
string BNAME += "_"

for i = 1 <= FILES
    endian big
    goto OFFPOS
    get OFFSET long
    math OFFSET += MSF
   
    savepos OFFPOS
    goto SIZEPOS
    get SIZE long
    savepos SIZEPOS
    set NAME BNAME
    string NAME += i
    goto OFFSET
    callfunction writeAT3 1
next i

startfunction writeAT3
   
    # read info from header and adjust size
    goto OFFSET
    getDstring MSIG 4 # "MSF0" or "MSFC"
    get BITSIGN long
    get UNK long
    get SIZE long
    get FREQ long
    math OFFSET += 0x40
   
    endian little
    set MEMORY_FILE binary "\x52\x49\x46\x46\x88\xb3\x6d\x0\x57\x41\x56\x45\x66\x6d\x74\x20\x20\x0\x0\x0\x70\x2\x2\x0\x80\xbb\x0\x0\x9a\x40\x0\x0\x80\x1\x0\x0\xe\x0\x1\x0\x0\x10\x0\x0\x0\x0\x0\x0\x1\x0\x0\x0\x66\x61\x63\x74\x8\x0\x0\x0\x91\x81\x24\x1\x1b\x4\x0\x0\x64\x61\x74\x61\x88\xb3\x6d\x0"
    string NAME += ".at3"
    set RIFFSIZE SIZE
    math RIFFSIZE += 0x44
    if BITSIGN == 4 # 66kbps
        putVarChr MEMORY_FILE 0x1c 0x204d long
        putVarChr MEMORY_FILE 0x20 0xc0 long
    elif BITSIGN == 5 # 105 kbps
        putVarChr MEMORY_FILE 0x1c 0x3324 long
        putVarChr MEMORY_FILE 0x20 0x130 long
    elif BITSIGN == 6 # 132 kbps
        putVarChr MEMORY_FILE 0x1c 0x409a long
        putVarChr MEMORY_FILE 0x20 0x180 long
    endif
    putVarChr MEMORY_FILE 0x04 RIFFSIZE long
    putVarChr MEMORY_FILE 0x16 0x2 byte
    putVarChr MEMORY_FILE 0x18 FREQ long
    putVarChr MEMORY_FILE 0x48 SIZE long
    append
    log MEMORY_FILE OFFSET SIZE
    append
    math SIZE += 0x4c
    log NAME 0 SIZE MEMORY_FILE
    endian big
endfunction

_________________
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 ;)


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Fri Oct 08, 2010 11:08 pm 
Offline
double-veteran
double-veteran

Joined: Sun Apr 20, 2008 2:58 am
Posts: 823
Has thanked: 5 times
Have thanks: 32 times
Thanks for the MSF script :)


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Sat Oct 09, 2010 12:02 am 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 594 times
np :)

_________________
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 ;)


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Mon Oct 11, 2010 5:24 pm 
Offline
ultra-n00b

Joined: Sun Oct 03, 2010 2:07 pm
Posts: 8
Has thanked: 0 time
Have thanks: 0 time
thanks a lot AlphaTwentyThree for scripts. Im noob and until today i didn know about quickbms, but with Your scripts a had successful extracted tracks from Skate 3 on Xbox 360. I suggest better file naming - sorting in explorer doesnt work good with this filenames, but there is always search function ;) Also Your header script was useful for another rip. Is there any chance to make script which will combine WAV files? I combine one song manually and its painfull;


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Tue Oct 12, 2010 10:31 am 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 594 times
Glad you could use some of the scripts here. ;) Skate 3 was actually the game I wrote the EA script for. You can change the script if you want to use the information otherwise, I just throw all the info into the filename because it shows which segments belong together.
Combining segments is only easy when the files really match, i.e. if there's no silence or click at the transition. Try it first by combining the segments with Winamp. If you play the song and don't hear any transition: play and close your eyes to be unable to see where the transitions are - if you don't hear anything, the combining is ok. Then just switch to the old DiscWriter Plugin to write the merged file to disc. I think I also wrote this into the EA segments post. If you have any questions, just ask here. :)

_________________
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 ;)


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Tue Oct 12, 2010 11:24 am 
Offline
ultra-n00b

Joined: Sun Oct 03, 2010 2:07 pm
Posts: 8
Has thanked: 0 time
Have thanks: 0 time
AlphaTwentyThree wrote:
Glad you could use some of the scripts here. ;) Skate 3 was actually the game I wrote the EA script for. You can change the script if you want to use the information otherwise, I just throw all the info into the filename because it shows which segments belong together.
Combining segments is only easy when the files really match, i.e. if there's no silence or click at the transition. Try it first by combining the segments with Winamp. If you play the song and don't hear any transition: play and close your eyes to be unable to see where the transitions are - if you don't hear anything, the combining is ok. Then just switch to the old DiscWriter Plugin to write the merged file to disc. I think I also wrote this into the EA segments post. If you have any questions, just ask here. :)

I forgot about this winamp plugin, it much easier than cut& paste in wave editor;)


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Tue Oct 12, 2010 11:28 am 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 594 times
1212fg wrote:
I forgot about winamp plugin, it much easier than cut& paste in wave editor;)

Hehe ;)
The plugin is neat because it stream-dumps the data onto disk DIGITALLY - unlike loop-recording with your soundcard, which is always ANALOGUE!

_________________
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 ;)


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Tue Oct 12, 2010 12:12 pm 
Offline
double-veteran
double-veteran

Joined: Sun Apr 20, 2008 2:58 am
Posts: 823
Has thanked: 5 times
Have thanks: 32 times
The plugin is really useful however the segments im using are 36hz and there is no setting for that in there, is there someway i can change it or should i just use another program?


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Tue Oct 12, 2010 12:59 pm 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 594 times
The frequency is taken from the archive information, so you shouldn't change it in the first place.

_________________
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 ;)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 467 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8 ... 32  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: Vindis and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group