XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Mon Feb 20, 2017 5:03 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 465 posts ]  Go to page Previous  1 ... 11, 12, 13, 14, 15, 16, 17 ... 31  Next
Author Message
 Post subject: Re: My quickBMS scripts
PostPosted: Thu Feb 23, 2012 7:46 am 
Offline
double-veteran
double-veteran

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














You can make the ads go away by registering

And another update for the SDAT extractor.
This time I encountered a file where the number of file pointers was excessively higher than the actual files (Ace Attorney Investigations: Miles Edgeworth). But as the pointer to the file name was zero in those cases, I could just add another if case. ;)

_________________
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: 7 Wonders: Magical Mystery Tour (iPhone/iPad) - Contents.dat
PostPosted: Fri Feb 24, 2012 12:52 am 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 585 times
7 Wonders: Magical Mystery Tour (iPhone/iPad) - Contents.dat Extractor
The archive includes uncompiled *.lua scipts. =)

Code:
goto 8
get INFOPOS long
goto INFOPOS
get FILES long
set NAMEOFF FILES
math NAMEOFF *= 0x10
math NAMEOFF += INFOPOS
math NAMEOFF += 8
for i = 1 <= FILES # files and folders
   get IDENT long
   get OFFSET long
   get SIZE long
   get NAMEPOS long
   math NAMEPOS += NAMEOFF
   savepos MYOFF
   goto NAMEPOS
   get NAME string
   goto MYOFF
   if IDENT == 0 # file
      log NAME OFFSET SIZE
   endif
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: Hooligans: Storm Over Europe *.x13 extractor
PostPosted: Fri Feb 24, 2012 4:33 am 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 585 times
Hooligans: Storm Over Europe *.x13 extractor
Little known game. Only wrote this to get the music.

Code:
# game: Hooligans: Storm Over Europe
# archive type: *.x13
# (c) 2012-02-24 by AlphaTwentyThree of XeNTaX

idstring "PACK"
get INFO long
get FILES asize
math FILES -= INFO
math FILES /= 0x40
goto INFO
for i = 1 <= FILES
   getDstring NAME 0x38
   get OFFSET long
   get SIZE long
   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: Fri Feb 24, 2012 4:47 am 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 585 times
Hitman: Blood Money (PC) *.str extractor
I just merged the two scripts I wrote for the game some weeks ago, so the final script is quite big. Nice example for the use of functions and memory pre-allocation. I know I could have written this differently by using external functions but I'm too lazy to update this at the moment. ;)

Code:
# game: Hitman: Blood Money
# format: *.str
# (c) 2012-02-24 by AlphaTwentyThree of XeNTaX

idstring "IOISNDSTREAM"
goto 0x10
get INFO long
get FILES long
get HEADERSIZE long
goto INFO
for i = 1 <= FILES
   get FILENUMBER long
   get ZERO long
   get OFFSET long
   get ZERO long
   get SIZE long
   get ZERO long
   get INFOPOS long
   get ZERO long
   get INFOLENGTH long
   get UNK long
   get NAMEL long
   get ZERO long
   get NAMEPOS long
   get ZERO long
   get UNK long
   get UNK long
   get ZERO long
   get ZERO long
   savepos MYOFF
   goto NAMEPOS
   getDstring NAME NAMEL
   log MEMORY_FILE 0 0
   set HEADERSIZE INFOLENGTH
   math HEADERSIZE += 8
   PutVarChr MEMORY_FILE 0 0x56415752 long # RWAV
   PutVarChr MEMORY_FILE 4 HEADERSIZE long
   append
   log MEMORY_FILE INFOPOS INFOLENGTH
   log MEMORY_FILE OFFSET SIZE
   append
   callfunction RWAV 1
   goto MYOFF
next i


startfunction RWAV
   savepos TEMP_OFF
   goto 0 MEMORY_FILE
   idstring "RWAV" MEMORY_FILE
   get OFFSET long MEMORY_FILE
   get SIZE asize MEMORY_FILE
   math SIZE -= OFFSET
   get TYPE long MEMORY_FILE
   get UNK long MEMORY_FILE
   get CH long MEMORY_FILE
   get FREQ long MEMORY_FILE
   get BITS long MEMORY_FILE
      
   if TYPE == 2 # uncompressed PCM, 0x18 header
      set TYPE "WAV"
   elif TYPE == 0x11
      set TYPE "WAV"
   elif TYPE == 3 # IMA ADPCM, 0x20 header
      set TYPE "IMA"
   elif TYPE == 4 # ogg
      set TYPE "OGG"
   endif

   if TYPE == "WAV"
      get BLOCKALIGN long MEMORY_FILE
      callfunction PCM 1
      get SIZE asize MEMORY_FILE2
      string NAME += ".wav"
      log NAME 0 SIZE MEMORY_FILE2
   elif TYPE == "IMA"
      get INTERLEAVE long MEMORY_FILE
      get UNK long MEMORY_FILE
      callfunction IMA 1
      get SIZE asize MEMORY_FILE2
      string NAME += ".lwav"
      log NAME 0 SIZE MEMORY_FILE2
   elif TYPE == "OGG"
      string NAME += ".ogg"
      log NAME OFFSET SIZE MEMORY_FILE
   endif
endfunction

startfunction PCM
   set PRE SIZE
   math PRE += 0x2c
   putVarChr MEMORY_FILE2 PRE 0
   log MEMORY_FILE2 0 0
   set MEMORY_FILE2 binary "\x52\x49\x46\x46\x00\x00\x00\x00\x57\x41\x56\x45\x66\x6d\x74\x20\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x64\x61\x74\x61\xff\xff\xff\xff"
   append
   log MEMORY_FILE2 OFFSET SIZE MEMORY_FILE
   append
   set RIFFSIZE SIZE
   math RIFFSIZE += 36
   set AVGBYTES FREQ
   math AVGBYTES *= BLOCKALIGN

   putvarchr MEMORY_FILE2 4 RIFFSIZE long
   putvarchr MEMORY_FILE2 20 1 short          # wFormatTag: Microsoft PCM Format (0x0001)
   putvarchr MEMORY_FILE2 22 CH short   # wChannels
   putvarchr MEMORY_FILE2 24 FREQ long   # dwSamplesPerSec
   putvarchr MEMORY_FILE2 28 AVGBYTES long    # dwAvgBytesPerSec
   putvarchr MEMORY_FILE2 32 BLOCKALIGN short # wBlockAlign
   putvarchr MEMORY_FILE2 34 BITS short       # wBitsPerSample
   putvarchr MEMORY_FILE2 40 SIZE long
endfunction

startfunction IMA
   set PRE SIZE
   math PRE += 0x2c
   putVarChr MEMORY_FILE2 PRE 0
   log MEMORY_FILE2 0 0
   set MEMORY_FILE2 binary "\x52\x49\x46\x46\x28\xCC\x0B\x00\x57\x41\x56\x45\x66\x6D\x74\x20\x14\x00\x00\x00\x11\x00\x01\x00\x44\xAC\x00\x00\x94\x83\x01\x00\x00\x04\x04\x00\x02\x00\x40\x00\x64\x61\x74\x61\x00\xCC\x0B\x00"
   set RIFFSIZE SIZE
   math RIFFSIZE += 0x28
   putVarChr MEMORY_FILE2 0x4 RIFFSIZE long
   putVarChr MEMORY_FILE2 0x16 CH short
   putVarChr MEMORY_FILE2 0x18 FREQ long
   putVarChr MEMORY_FILE2 0x20 INTERLEAVE short
   putVarChr MEMORY_FILE2 0x2C SIZE long
   append
   log MEMORY_FILE2 OFFSET SIZE
   append
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 Feb 24, 2012 5:12 am 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 585 times
func_header_PCM.bms

Adds a PCM header to any data. Resulting wave file is stored in MEMORY_FILE and can easily be written (see example script below). Thans for the "include" update Luigi! =)
Needed variables: SIZE, OFFSET, FREQ, CH, BITS

Code:
# add a wave pcm header to any data and write to disk
# input variables: SIZE, OFFSET, FREQ, CH, BITS, BLOCKALIGN (?), NAME (optional), CODEC (optional)
# (c) 2012-04-16 by AlphaTwentyThree of XeNTaX

startfunction PCM
   endian little
   set BLOCKALIGN 1
   set PRE SIZE
   math PRE += 0x2c
   putVarChr MEMORY_FILE PRE 0
   log MEMORY_FILE 0 0
   set MEMORY_FILE binary "\x52\x49\x46\x46\x20\xC0\xB1\x00\x57\x41\x56\x45\x66\x6D\x74\x20\x10\x00\x00\x00\x01\x00\x02\x00\x44\xAC\x00\x00\x10\xB1\x02\x00\x04\x00\x10\x00\x64\x61\x74\x61\xFC\xBF\xB1\x00"
   append
   log MEMORY_FILE OFFSET SIZE
   append
   set RIFFSIZE SIZE
   math RIFFSIZE += 36
   set AVGBYTES FREQ
   math AVGBYTES *= BLOCKALIGN
   
   putvarchr MEMORY_FILE 0x04 RIFFSIZE long
   putvarchr MEMORY_FILE 0x14 CODEC short          # wFormatTag: Microsoft PCM Format (0x0001)
   putvarchr MEMORY_FILE 0x16 CH short   # wChannels
   putvarchr MEMORY_FILE 0x18 FREQ short   # dwSamplesPerSec
   putvarchr MEMORY_FILE 0x1c AVGBYTES long    # dwAvgBytesPerSec
   putvarchr MEMORY_FILE 0x20 BLOCKALIGN short # wBlockAlign
   putvarchr MEMORY_FILE 0x22 BITS short       # wBitsPerSample
   putvarchr MEMORY_FILE 0x28 SIZE long
   if NAME == ""
      get NAME basename
      string NAME += ".wav"
   endif
   get SIZE asize MEMORY_FILE
   log NAME 0 SIZE MEMORY_FILE
endfunction


PCM header adder (example):
Code:
include "func_header_PCM.bms"
set OFFSET 0
get SIZE asize
math SIZE -= OFFSET
set FREQ 44100
set CH 2
set BITS 16
set CODEC 0x1 # see codec list for others
callfunction PCM 1
get SIZE asize MEMORY_FILE
get NAME basename
string NAME += ".wav"
log NAME 0 SIZE MEMORY_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 ;)


Last edited by AlphaTwentyThree on Tue Jul 03, 2012 3:45 am, edited 3 times in total.

Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Fri Feb 24, 2012 6:32 am 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 585 times
As some of you may have noticed already, I've begun to update some scripts to function and stand-alone usage. If you're using my scripts, stay tuned, update the scripts and put them in a central location!
Just updated:
  • XMA RIFF header adder to func_XMA_header.bms
  • str2num function to func_str2num.bms
I'll post here whenever I've made an update. :)

_________________
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 Feb 28, 2012 4:18 am 
Offline
ultra-veteran
ultra-veteran

Joined: Thu Aug 12, 2010 8:15 am
Posts: 327
Has thanked: 54 times
Have thanks: 67 times
Alpha23, could you update your SoundNode2XMA script to search for these XMA flags as well:

FC038000
FC03C001 - Usually Mono but can also be Stereo


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Fri Mar 16, 2012 1:07 am 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 585 times
Just updated my NDS bank.bin script by three games.

_________________
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 Mar 18, 2012 7:27 pm 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 585 times
Another important update for the NDS sdat extractor: now the files in th "Group" directory have the correct extension. =)

_________________
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 Mar 18, 2012 8:24 pm 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 585 times
Just encountered a DS game where the main music isn't stored in the sound_data.sdat but in a Glob.bin that holds all other game files. As I guess that this format is used by other DS games I'll take a look at in the future I wrote this script. Took me unusually long because the needed information have to be gathered by workarounds.

Code:
# Extracts the contents of the Glob.bin from NDS games
# that only consist of this very file and the sound_data.sdat
#
# supported games:
# - Are You Smarter than a 5th Grader? Back to School
#
# (c) 2012-03-18 by AlphaTwentyThree of XeNTaX

callfunction checkBIN 1 # check if bin correct
callfunction getNAMEPOS 1 # determine offset of GlobFiles.txt
# string NAMEPOS p= "%08x" NAMEPOS
# print "namepos: %NAMEPOS%"
# cleanexit
goto 0
get FILES long
math FILES -= 1 # last variable in list is file size (to get last offset)
math FILES /= 0x4
goto 0
get FOLDER basename
string FOLDER += "/"

for i = 1 <= FILES
   get OFFSET long
   savepos MYOFF
   get SIZE long
   math SIZE -= OFFSET
   goto NAMEPOS         # comment these lines
   getCT NAME string 0x20   # in first run and
   math NAMEPOS += 0x40   # adjust number at beginning
   
   # get NAME basename      # uncomment
   # string NAME += "_"     # in first
   # string NAME += i       # run
   goto MYOFF
   set FNAME FOLDER
   string FNAME += NAME
   log FNAME OFFSET SIZE
next i

startfunction checkBIN
   get FSIZE asize
   get SIZEOFF long
   math SIZEOFF -= 4
   goto SIZEOFF
   get TESTSIZE long
   if TESTSIZE != FSIZE
      print "ERROR: not a valid NDS *.bin file!"
      cleanexit
   endif
endfunction

startfunction getNAMEPOS
   FindLoc GLOBFILES string "GlobFiles.txt" 0 ""
   goto 0
   do
      savepos NAMEOFF
      get TESTOFF long
   while TESTOFF < GLOBFILES
   math NAMEOFF -= 4
   goto NAMEOFF
   get NAMEPOS long
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: Sun Mar 18, 2012 10:47 pm 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 585 times
Found three NDS games with this format so far. Don't forget the func_getTYPE.bms for this!

Code:
# extracts contents of *.pac files with the IM00 identifier
#
# supported games so far:
# - Anpanman to Asobo: ABC Kyoushitsu (NDS)
# - Anpanman to Asobo: Aiueo Kyoushitsu (NDS)
# - Bunnyz (NDS)
#
# (c) 2012-03-20 by AlphaTwentyThree of XeNTaX

include "func_getTYPE.bms"
idstring "IM00"
get FILES long
for i = 1 <= FILES
   get OFFSET long
   if i != FILES
      savepos MYOFF
      get SIZE long
      
   else
      get SIZE asize
   endif
   math SIZE -= OFFSET
   get NAME basename
   string NAME += "_"
   string NAME += i
   log MEMORY_FILE 0 0
   log MEMORY_FILE OFFSET SIZE
   callfunction getTYPE 1
   string NAME += EXT
   log NAME 0 SIZE MEMORY_FILE
   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 Tue Mar 20, 2012 3:54 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Sun Mar 18, 2012 11:06 pm 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 585 times
Another one where I don't know if it's game-specific. Will post it under this category until I find another game with this format.

Code:
# extract contents of *. pb GRAFs with PAK0 signature
#
# supported games:
# - Anpanman to Touch de Waku Waku Training (DS)
#
# (c) 2012-03-18 by AlphaTwentyThree of XeNTaX

idstring "PAK0"
set NAMEPOS ""
get INFOSIZE short
get FILES short
get FNAME basename
if FNAME == "Sound"
   get NAMEPOS long
   goto 8
elif FNAME == "flxResource"
   get NAMEPOS long
   goto 8
endif
for i = 1 <= FILES
   get OFFSET long
   savepos MYOFF
   get SIZE long
   math SIZE -= OFFSET
   if NAMEPOS == ""
      get NAME basename
      string NAME += "_"
      string NAME += i
   else
      if i == 1
         set NAME "#NAME_INFO"
      else
         goto NAMEPOS
         getCT NAME string 0x0a
         savepos NAMEPOS
      endif
   endif
   log NAME OFFSET SIZE
   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 ;)


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Mon Mar 19, 2012 1:22 am 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 585 times
func_getTYPE.bms

Ok, this post is extremely long overdue. When extracting files there's often no extension given, so I normally would test for the extensions that exist in the archive and just adjust a function at the end of the script. Lately I've run into too many GRAFs with no names or extensions and I think it's time to get some automation going here. ;)
I'll slowly update the below script with different heuristics as I encounter more and more file types. I know that there are file scanners for all kinds of types but I need this to determine the type inside MEMORY_FILE to adjust the extension on-the-fly.
So you can go from
Code:
...
log NAME OFFSET SIZE
...

to
Code:
include "func_getTYPE.bms"
...
log MEMORY_FILE OFFSET SIZE
callfunction getTYPE 1
string NAME += EXT
log NAME 0 SIZE MEMORY_FILE
...

There's also the ZNAME variable which holds the filename in some file types (e.g. *.vag). Obviously, add
Code:
...
if ZNAME != ""
    string NAME += "_"
    string NAME += ZNAME
endif
string NAME += EXT
...
for this (or just "set NAME ZNAME" if you want to leave out theID/CRC/TOC name).

Of course there are thousands of file types and many of them cannot be identified clearly, e.g. txt/inf/log/lua etc.

If you encounter any file type that isn't included in this script, just PM me and I'll see what I can do.


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


Last edited by AlphaTwentyThree on Fri Dec 12, 2014 10:02 pm, edited 29 times in total.

Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Mon Mar 19, 2012 2:34 am 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 585 times
I guess that's something CRI specific but as always, I'm not sure until I find another game with this structure.
Also supports those *.snd files without a shd header file.
Note that it needs the func_getTYPE.bms!

Code:
# extract sounds from *.snd/*.shd pairs (CRI engine)
#
# supported games:
# - Arasuji de Kitaeru Hayamimi no Susume DS
#
# (c) 2012-03-19 by AlphaTwentyThree of XeNTaX

include "func_getTYPE.bms"
open FDDE SHD 0 EXISTS
open FDDE SND 1
if EXISTS == 1 # diff qualities
   set QUALPOS 0
   set INFOPOS 0x20
   for i = 1 <= 4
      log MEMORY_FILE 0 0
      goto QUALPOS 0
      get OFFSET long   0
      get SIZE long 0
      savepos QUALPOS 0
      log MEMORY_FILE2 OFFSET SIZE 1
      goto INFOPOS 0
      get STARTPOS long 0
      get FILES long 0
      math FILES /= 8
      savepos INFOPOS 0
      math STARTPOS += 0x20
      goto STARTPOS 0
      
      for j = 1 <= FILES
         get OFFSET long 0
         get SIZE long 0
         log MEMORY_FILE OFFSET SIZE MEMORY_FILE2
         callfunction getname 1
         callfunction getTYPE 1
         string NAME += EXT
         log NAME 0 SIZE MEMORY_FILE
      next j
   next i
else
   open FDDE SND 0
   get FILES long
   math FILES /= 8
   goto 0
   for i = 1 <= FILES
      get OFFSET long
      get SIZE long
      log MEMORY_FILE OFFSET SIZE
      callfunction getTYPE 1
      get NAME basename
      string NAME += "_"
      string NAME += i
      string NAME += EXT
      log NAME 0 SIZE MEMORY_FILE
   next i
endif

startfunction getname
   get NAME basename 0
   string NAME += "_"
   string NAME += i
   string NAME += "_"
   string NAME += j
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: Mon Mar 19, 2012 2:41 am 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 74 times
Have thanks: 585 times
func_testvariables.bms
Checks if needed variables are set (used in various functions).

Code:
startfunction testvariables
   if CH == ""
      print "ERROR: channels (CH) not given"
      cleanexit
   elif FREQ == ""
      print "ERROR: frequency (FREQ) not given"
      cleanexit
   elif INTERL == ""
      print "ERROR: interleave (INTERL) not given"
      cleanexit
   elif BITS == ""
      print "ERROR: bits (BITS) not given"
      cleanexit
   elif SIZE == ""
      print "ERROR: size (SIZE) not given"
      cleanexit
   elif OFFSET == ""
      print "ERROR: offset (OFFSET) not given"
      cleanexit
   endif
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  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 465 posts ]  Go to page Previous  1 ... 11, 12, 13, 14, 15, 16, 17 ... 31  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: futuretime23 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