Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.
Zero Tolerance for Disrespect

Jane's Combat Simulations: Advanced Tactical Fighters - compression

Featured Replies

  • Author
  • Localization

AlphaTwentyThree, posted Tue Jun 09, 2015 4:12 pm (5637)


Hi!
I've written a script for the game that extracts the contents of the EALIB archives but I cannot find the compression used in the *.11k files. Can somebody help me out here? Here's a sample including the script: http://*USE_ANOTHER_FILEHOSTING*/9557887 ... 5/EALIB.7z
Thanks!
  • Author
  • Localization

aluigi, posted Tue Jun 09, 2015 5:15 pm (5642)


You have cut 2 bytes from the filenames, that's not a short there.
I don't know if it's a compression algorithm because there are no info about the decompressed size.

I used my scanner on a file from both offset 0 and 2 but I have no idea of how should look the decompressed file because it's not a known format.
  • Author
  • Localization

AlphaTwentyThree, posted Tue Jun 09, 2015 9:59 pm (5645)


You're right about the file names, I was confused there.
The UNK byte is a depictor for compression (4=compressed, 0=uncompressed). The first 4 bytes of each compressed file hold the decompressed size as it looks like.
The uncompressed *.11k files should be 8bit mono raw PCM streams with 11025 Hz.
  • Author
  • Localization

Ekey, posted Tue Jun 09, 2015 11:10 pm (5646)


pkware implode / explode
  • Author
  • Localization

aluigi, posted Wed Jun 10, 2015 5:29 am (5648)


My fault, I was using an old script that was available on xentax.

The updated script: http://aluigi.org/papers/bms/others/ealib.bms
Would be cool to have also the files with a ZIP value different than 4 to know what algorithm they use.
  • Author
  • Localization

AlphaTwentyThree, posted Wed Jun 10, 2015 9:53 am (5650)


Hey cool! Hehe, now you've decided to use the first two as path? Looking into the other archives, the file name is really stored as 0xd, otherwise it wouldn't make any sese. Same with the expansion "NATO Fighters". Sadly there's only 0x00 and 0x04 available as compression identifier. :\
  • Author
  • Localization

aluigi, posted Wed Jun 10, 2015 10:00 am (5651)


I'm not totally sure if they are a path/folder so I just used the name and commented the line to build the PATH NAME string.
  • Author
  • Localization

AlphaTwentyThree, posted Wed Jun 10, 2015 11:57 am (5653)


I've added a clumsy part that automatically converts the 11k files to valid wave files.
Can you tell me if there's a smarter option for the splitname function? All I want to do is split the name and the extension into two separate variables...

Code:
comtype pkware
idstring "EALIB"
get FILES short
for i = 1 <= FILES
   getDstring NAME 0xd
   # getDstring PATH 2
   # getDstring NAME 0xb
   get ZIP byte
   get OFFSET long
   putArray 0 i NAME
   putArray 1 i OFFSET
   putArray 2 i ZIP
next i
for i = 1 <= FILES
   getArray NAME   0 i
   getArray OFFSET 1 i
   getArray ZIP    2 i
   if i != FILES
      xmath n "i 1"
      getArray SIZE 1 n
   else
      get SIZE asize
   endif
   math SIZE -= OFFSET
   set FNAME basename NAME
   set EXT extension NAME
   
   if EXT != "11k"
      if ZIP == 0
         log NAME OFFSET SIZE
      else
         goto OFFSET
         get XSIZE long
         math OFFSET 4
         math SIZE   - 4
         clog NAME OFFSET SIZE XSIZE
      endif
   else
      callfunction process11k 1
   endif
next i

startfunction process11k
   set CODEC 1
   set FREQ 11025
   set CH 1
   set BITS 8
   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
   if ZIP == 0
      log MEMORY_FILE OFFSET SIZE
   else
      set CSIZE SIZE
      goto OFFSET
      get SIZE long
      math OFFSET 4
      math CSIZE   - 4
      clog MEMORY_FILE OFFSET CSIZE SIZE
   endif
   append
   
   set RIFFSIZE SIZE
   math RIFFSIZE = 36
   set AVGBYTES FREQ
   if CODEC != 2
      math AVGBYTES *= BLOCKALIGN
   endif
   
   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
   
   set NAME FNAME
   string NAME = ".wav"
   get SIZE asize MEMORY_FILE
   log NAME 0 SIZE MEMORY_FILE
endfunction
  • Author
  • Localization

AlphaTwentyThree, posted Wed Jun 10, 2015 12:31 pm (5654)


Here's also a script that demultiplexes the *.cb8 videos (possibly for other Jane's Combat Simulation games too)
Code:
# demultiplex *.cb8 movies from Jane's Combat Simulation games
# (c) 2015-06-10 by AlphaTwentyThree
# script for QuickBMS http://quickbms.aluigi.org

idstring "DRBC"
get CH long
get UNK short
get FREQ short
get UNK long
get FSIZE asize
putVarChr MEMORY_FILE FSIZE 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"
putVarChr MEMORY_FILE2 FSIZE 0
putVarChr MEMORY_FILE3 FSIZE 0
log MEMORY_FILE2 0 0
log MEMORY_FILE3 0 0
set OFFSET 0x40
set FIRST 1
do
   goto OFFSET
   getDstring IDENT 4
   get SIZE long
   math SIZE -= 0x8
   savepos OFFSET
   if IDENT == "MRFA"
      math OFFSET = 0x10
      math SIZE -= 0x10
      if FIRST == 1
         math OFFSET = 0x10
         math SIZE -= 0x10
         set FIRST 0
      endif
      append
      log MEMORY_FILE OFFSET SIZE
      append
   elif IDENT == "VooM"
      append
      log MEMORY_FILE2 OFFSET SIZE
      append
   elif IDENT == "MRFI"
      append
      log MEMORY_FILE3 OFFSET SIZE
      append
   else
      print "%IDENT%"
      cleanexit
   endif
   math OFFSET = SIZE
while OFFSET != FSIZE

get NAME basename

string WNAME p= "%s.wav" NAME
get SIZE asize MEMORY_FILE
set RIFFSIZE SIZE
math RIFFSIZE = 36
set AVGBYTES FREQ
if CH == 1
   set BLOCKALIGN 1
else
   set BLOCKALIGN 2
endif
set CODEC 1
set BITS 8
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
log WNAME 0 SIZE MEMORY_FILE

string WNAME p= "%s.VooM" NAME
get SIZE asize MEMORY_FILE2
log WNAME 0 SIZE MEMORY_FILE2

string WNAME p= "%s.mrfi" NAME
get SIZE asize MEMORY_FILE3
log WNAME 0 SIZE MEMORY_FILE3
  • Author
  • Localization

aluigi, posted Wed Jun 10, 2015 1:04 pm (5655)


set EXT extension NAME
set NAME basename NAME
  • Author
  • Localization

AlphaTwentyThree, posted Wed Jun 10, 2015 1:29 pm (5656)


haha LOL! ;)
Updated the script.
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.