XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Wed May 24, 2017 1:37 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 465 posts ]  Go to page Previous  1 ... 16, 17, 18, 19, 20, 21, 22 ... 31  Next
Author Message
 Post subject: Re: My quickBMS scripts
PostPosted: Fri Jun 29, 2012 1:48 am 
Offline
double-veteran
double-veteran

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

XEN archive extractor

Found this in an XBLA game. A little bit more elaborate format, but not much. ;)

Code:
# extract *.xen archives
# supported games:
# - Are You Smarter Than A 5th Grader: Make the Mark (XBLA)
#
# (c) 2012-06-29 by AlphaTwentyThree of XeNTaX

endian big
get UNK long
get DATASTART long
get UNK long
get FILES long

get POS_INFO long
math POS_INFO *= 0x1000
get POS_UNK long
get UNK long
get COMP_SIZE long

goto 0x28
get POS_NAMES long
math POS_NAMES *= 0x1000

get FNAME basename
string FNAME += "/"
goto 0x3c
get DEC_SIZE long
if DEC_SIZE != 0 # compressed data
   get OFFSET asize
   math OFFSET -= COMP_SIZE
   putVarChr MEMORY_FILE 0x15f 0 byte # produce bias of 0x160 bytes
   append
   clog MEMORY_FILE OFFSET COMP_SIZE DEC_SIZE
   append
else
   get SIZE asize
   append
   log MEMORY_FILE 0 SIZE
   append
endif
goto POS_INFO MEMORY_FILE
for i = 1 <= FILES
   get OFFSET long MEMORY_FILE
   math OFFSET *= 0x1000
   get CRC long MEMORY_FILE
   get SIZE long MEMORY_FILE
   get NAMEPOS long MEMORY_FILE
   math NAMEPOS += POS_NAMES
   get UNK long MEMORY_FILE # 0 or 1
   get UNK long MEMORY_FILE # multiple of 4 or 0
   get ZSIZE long MEMORY_FILE
   get ZERO long MEMORY_FILE
   savepos MYOFF MEMORY_FILE
   goto NAMEPOS MEMORY_FILE
   get NAME string MEMORY_FILE
   goto MYOFF MEMORY_FILE
   if SIZE != 0
      set WNAME FNAME
      string WNAME += NAME
      log WNAME OFFSET SIZE MEMORY_FILE
   endif
next i


You can make the ads go away by registering


_________________
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: Sun Jul 01, 2012 3:47 pm 
Offline
double-veteran
double-veteran

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

Will need to further compare this with the Quake 4 X360 version, maybe there's some identifier and I can join the two scripts.
I guess there are other games that use this format. I'll update the script info at the start as soon as I encounter more so this script can be found when searching for a game inside XeNTaX. :)

Code:
# extract *.xpr archives
# (note: these are different than the ones from Quake 4 X360)
#
# games that use XPR2 archives:
# Astropop XBLA
# Bejeweled 2 XBLA
# Contra XBLA
#
# (c) 2012-07-01 by AlphaTwentyThree of XeNTaX

IDSTRING "XPR2"
endian big
get FILESIZE long # minus 0xc
get FSIZE asize
math FSIZE -= 0xc
if FSIZE != FILESIZE
   print "XPR archive not supported. Please contact me on XeNTaX!"
   cleanexit
endif
get ZERO long
get FILES long

for i = 1 <= FILES
   getDstring UNK 4
   get OFFSET long
   math OFFSET += 0xc
   get SIZE long
   get NAMEPOS long
   math NAMEPOS += 0xc
   savepos MYOFF
   goto NAMEPOS
   get NAME string
   goto MYOFF
   log NAME OFFSET SIZE
next i

_________________
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 Sat Jul 07, 2012 11:57 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Mon Jul 02, 2012 2:53 am 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 590 times
Backbreaker: Vengeance (XBLA) pkd extractor

Code:
# extract pkd/pkh archive pairs from Backbreaker: Vengeance (XBLA)
# (c) 2012-07-02 by AlphaTwentyThree of XeNTaX

open FDDE pkh 0
open FDDE pkd 1
get FILES long 0
get UNK long 0
for i = 1 <= FILES
   get NAMEL long 0
   getDstring NAME NAMEL 0
   get OFFSET long 0
   get SIZE long 0
   log NAME OFFSET SIZE 1
next i

_________________
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 Jul 02, 2012 6:55 pm 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 590 times
POD archive extractor

Just encountered a POD2 archive and decided to merge the existing scripts I coded for POD archives so far into one single script. :)
If anyone has a POD1 or POD4 sample, please PM me.

Code:
# POD extractor
# supported games:
# Blair Witch Vol.I - Vol.III (PC) v2
# BloodRayne (PS2) v3
# Country Dance All-Stars (X360, 2012) v5
# Kinect Star Wars (X360, 2012) v5
# Toy Story Mania (X360, 2012) v5
# The Walking Dead: Survival Instinct (2013) v5
#
# (c) 2012-11-05 by AlphaTwentyThree of XeNTaX

idstring "POD"
getDstring VER 1
if VER == "1"
   print "POD version not supported yet! Please contact me via PM!"
   cleanexit
elif VER == "4"
   print "POD version not supported yet! Please contact me via PM!"
   cleanexit
endif
goto 0x58
get FILES long
if VER == "2"
   set HEADER 0x60
else
   goto 0x108
   get HEADER long
endif
set NAMEBIAS FILES
if VER == "5"
   math NAMEBIAS *= 0x1c
else
   math NAMEBIAS *= 0x14
endif
math NAMEBIAS += HEADER
goto HEADER

for i = 1 <= FILES
   get NAMEPOS long
   math NAMEPOS += NAMEBIAS
   get SIZE long
   get OFFSET long
   if VER == "5"
      get ZSIZE long
      get ZERO long
   else
      set ZSIZE SIZE
   endif
   get UNK long
   get UNK long
   savepos MYOFF
   goto NAMEPOS
   get NAME string

   if SIZE == ZSIZE
      log NAME OFFSET SIZE
   else
      clog NAME OFFSET SIZE ZSIZE
   endif
   goto MYOFF
next i

_________________
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 Sep 08, 2013 9:02 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Tue Jul 03, 2012 3:37 am 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 590 times
Ace Combat Zero: The Belkan War (PS2) - npsf to ss2 converter

Split the BGM.PAC with my generic splitter ("NPSF") and convert them with this script to ss2 afterwards (playable with Winamp & vgmstream). Luckily, NPSF files contain song names. :)

Code:
# convert Ace Combat Zero: The Belkan War (PS2) npsf to ss2
# (c) 2012-07-03 by AlphaTwentyThree of XeNTaX

include "func_header_SS2.bms"
idstring "NPSF"
goto 0x10
get INTERLEAVE long
get UNK long
get FREQ long
set CH 2
goto 0x34
getCT NAME string 0x2e
string NAME += ".ss2"
set OFFSET 0x800
get SIZE asize
math SIZE -= OFFSET
callfunction SS2 1

_________________
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: Wed Jul 04, 2012 1:31 pm 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 590 times
SDF to SS2 converter

Request from mauzerX. ;)
Needs func_header_SS2.bms in the same folder.
Don't forget to run the files through my 0x10 bytes reinterleaver before playing!

Code:
# convert *.sfd files to playable *.ss2 files
#
# supported games:
# - Doomsday Racers (PS2)
# - Obliterate (PS2)
# - X-Treme Quads (PS2)
#
# (c) 2012-07-04 by AlphaTwentyThree of XeNTaX

include "func_header_SS2.bms"
idstring "SDF"
goto 8
get SIZE long
get FREQ long
get CH long
get INTERLEAVE long
set OFFSET 0x18
set NAME ""
callfunction SS2 1

_________________
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 Wed Jul 04, 2012 3:32 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Wed Jul 04, 2012 1:59 pm 
Offline
advanced

Joined: Thu Jul 01, 2010 1:48 pm
Posts: 56
Has thanked: 22 times
Have thanks: 10 times
Great! Thanks :up:


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Wed Jul 04, 2012 3:30 pm 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 590 times
mauzerX wrote:
Great! Thanks :up:

You're welcome - just ask. :)

_________________
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: Wed Jul 04, 2012 3:31 pm 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 590 times
Beyond Good & Evil HD (XBLA) - bf extractor

Extracts the main archive. Careful, more than 8000 files in this archive. ;)

Code:
# extract the Sally_PC_POLISH.bf from Beyond Good & Evil HD (XBLA)
# (c) 2012-07-04 by AlphaTwentyThree of XeNTaX

idstring "BIG"
goto 0x8
get FILES long
set OFF_INFO 0x15abc
goto 0x44
for i = 1 <= FILES
   get OFFSET long
   math OFFSET += 4
   get UNK short
   get UNK short
   savepos MYOFF
   goto OFF_INFO
   get UNK byte # always 0xfc
   get SIZE threebyte
   math SIZE *= 0x100
   get ID1 long
   get ID2 long
   get CAT short # category
   get ZERO short
   get UNK long
   getDstring NAME 0x40
   get UNK long
   savepos OFF_INFO
   goto MYOFF
   log NAME OFFSET SIZE
next i

_________________
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: Wed Jul 04, 2012 11:42 pm 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 590 times
Just updated the PCM wave header adder because it had an error. You can now also change codecs, but beware: sometimes it won't work. Stay with PCM to be safe. ;)

_________________
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: Wed Jul 04, 2012 11:43 pm 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 590 times
XNB to WAV

Be sure you have the newest func_header_PCM.bms (viewtopic.php?f=13&t=4450&p=71565#p71565)

Code:
# converts Microsoft XNA Framework *.xnb files to *.wav if included
# (c) 2012-10-14 by AlphaTwentyThree of XeNTaX

include "func_header_PCM.bms"
idstring "XNBw"
goto 0x47
get CODEC short
get CH short
get FREQ long
get UNK long
get BLOCKALIGN short
get BITS short
get JUMP short
savepos MYOFF
math MYOFF += JUMP
goto MYOFF
get SIZE long
savepos OFFSET
set NAME ""
callfunction PCM 1

_________________
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 Oct 14, 2012 7:37 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Thu Jul 05, 2012 1:20 am 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 590 times
Breach xsp/spd extractor

I first thought that some ID sorting was referring to the names so I hazzled around to get it right - only to realize that it's something game-internal and apparently not needed for extraction. ;)
Works for PC and XBLA version. The archives are the same except for the extension.

Code:
# extract *.xsp/*.spd sound archives from Breach (XBLA)
# (c) 2012-07-05 by AlphaTwentyThree of XeNTaX

open FDDE spd 0
idstring "SPDv1.04" 0
open FDDE xsp 1 EXIST
if EXIST == 0
   open FDDE psp 1 EXIST
   if EXIST == 0
      cleanexit
   endif
endif

endian big
get SIZE_HEADER long 0
get ZERO long 0
get FILES long 0
get OFF_INFO long 0
set OFF_IDS FILES # sorting of info above (game-internal)
math OFF_IDS *= 0x38
math OFF_IDS += OFF_INFO
set OFF_NAMEPOS FILES # pointer to file name
math OFF_NAMEPOS *= 4
math OFF_NAMEPOS += OFF_IDS
set OFFBIAS_NAMES FILES
math OFFBIAS_NAMES *= 4
math OFFBIAS_NAMES += OFF_NAMEPOS

goto 0 1
endian little
get DUMMY long 1 # FILES again
for i = 1 <= FILES
   get OFFSET long 1
   savepos MYOFF 1
   if i < FILES
      get SIZE long 1
      goto MYOFF 1
   else
      get SIZE asize 1
   endif
   math SIZE -= OFFSET
   goto OFFBIAS_NAMES 0
   get NAME string 0
   string NAME += ".wav"
   savepos OFFBIAS_NAMES 0
   log NAME OFFSET SIZE 1
next i

_________________
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 Jul 07, 2012 6:24 am 
Offline
mega-veteran
mega-veteran

Joined: Fri Jun 11, 2010 12:08 pm
Posts: 310
Has thanked: 75 times
Have thanks: 20 times
Try use Beyond Good & Evil HD (XBLA) - bf extractor on TMNT.bf(ABE header). I think archive format is similar, but need fix something in script for work:

Image


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Sat Jul 07, 2012 4:25 pm 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 590 times
The general problem with this format is that I couldn't find a way to calculate the OFF_INFO and had to manually set it to 0x15abc just for this one archive. So it won't work for any other .bf file.

_________________
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 Jul 07, 2012 7:34 pm 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Sat Aug 05, 2006 2:04 pm
Posts: 327
Location: Hungary
Has thanked: 1 time
Have thanks: 129 times
Older BGEHD script: viewtopic.php?f=10&t=7886&hilit=evil+hd+good+and+evil+hd+beyond+good+hd



Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 465 posts ]  Go to page Previous  1 ... 16, 17, 18, 19, 20, 21, 22 ... 31  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 4 guests


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