TXR Zero specific .DAT data extraction

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Argonaut
Posts: 46
Joined: Sat Sep 27, 2014 10:24 pm

TXR Zero specific .DAT data extraction

Post by Argonaut »

Yes, I have returned after a long hiatus for more specific extraction of TXR data, more specifically the map/car files (can't determine which one this is).

After using the script, the biggest file produced is 44MB which could 1) consist of 700kb-1MB car models which is reasonable for the games age, or 2) the entire Map model, which is another plausible explanation.

These files were produced after the script you so thankfully provided aluigi, now I would use the Model rip feature of PCSX2 but of two small problems. 1)- the Model rip feature was removed after a certain version and 2)- The game doesn't function on the version of the emulator which can rip models, but it works on the later ones PLUS this is assumed the only game which does not use backface culling as past this game, all the TXR games use it.

Sample files:


https://www.dropbox.com/s/r46016d9ztpme ... e.zip?dl=0

Cheers! :P
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: TXR Zero specific .DAT data extraction

Post by aluigi »

I don't know what compression algorithm is that one, but the rest of the script is the following:

Code: Select all

comtype ??? # what algorithm?

get FILES long
    get OFFSET long
for i = 2 <= FILES
    if i == FILES
        get NEXT_OFFSET asize
    else
        get NEXT_OFFSET long
    endif
    xmath ZSIZE "NEXT_OFFSET - OFFSET"
    savepos TMP
    goto OFFSET
    get ZIP byte
    if ZIP == 0
        math OFFSET += 1
        math ZSIZE  -= 1
        log "" OFFSET ZSIZE
    else
        get SIZE threebyte
        reverselong SIZE
        math SIZE >>= 8
        math OFFSET += 4
        math ZSIZE  -= 4
        clog "" OFFSET ZSIZE SIZE
    endif
    goto TMP
    math OFFSET = NEXT_OFFSET
next i
Argonaut
Posts: 46
Joined: Sat Sep 27, 2014 10:24 pm

Re: TXR Zero specific .DAT data extraction

Post by Argonaut »

aluigi wrote:I don't know what compression algorithm is that one, but the rest of the script is the following:

Code: Select all

comtype ??? # what algorithm?

get FILES long
    get OFFSET long
for i = 2 <= FILES
    if i == FILES
        get NEXT_OFFSET asize
    else
        get NEXT_OFFSET long
    endif
    xmath ZSIZE "NEXT_OFFSET - OFFSET"
    savepos TMP
    goto OFFSET
    get ZIP byte
    if ZIP == 0
        math OFFSET += 1
        math ZSIZE  -= 1
        log "" OFFSET ZSIZE
    else
        get SIZE threebyte
        reverselong SIZE
        math SIZE >>= 8
        math OFFSET += 4
        math ZSIZE  -= 4
        clog "" OFFSET ZSIZE SIZE
    endif
    goto TMP
    math OFFSET = NEXT_OFFSET
next i


Thanks for this, but it returns the error:

the variable index is invalid (-1), there is an error in QuickBMS


Any help? Cheers

(PS: beginning to understand abit of the code thanks to learning Python :) )
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: TXR Zero specific .DAT data extraction

Post by aluigi »

That's normal, there is no compression algorithm because I don't know it :)

Code: Select all

comtype ???
Argonaut
Posts: 46
Joined: Sat Sep 27, 2014 10:24 pm

Re: TXR Zero specific .DAT data extraction

Post by Argonaut »

aluigi wrote:That's normal, there is no compression algorithm because I don't know it :)

Code: Select all

comtype ???


Alright, no probs, thanks for clearing this up. :idea: