Help With Tekken 2 Zeebo Archives

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
lordchrome
Posts: 25
Joined: Wed Oct 21, 2020 9:24 am

Help With Tekken 2 Zeebo Archives

Post by lordchrome »

Hey everyone, so I am trying to figure out how to extract and view these files but can't figure out how. Was wondering if anyone knows how to.


If you are wondering what zeebo is. It is the first Brazilian console that uses Brew to run and play games made for the console. The Zeebo system also supports OpenGL ES 1.0 and 1.1. You can read all about it here https://en.wikipedia.org/wiki/Zeebo

I feel like tekken 2 zeebo uses brew mp or brew 4.0 but most likely brew mp.

If anyone is interested, here is the link to the files: https://mega.nz/file/v4tADZIa#QInXbPkjB ... _UMOL7jFpc



File signature of each file and what they are:


Zeebo File
276731.mif: 11 00 01 00


Audio
soundbg0.dat: 00 00 00 0E
hit.dat: Possibly Audio 00 00 00 0E


Characters

arm1.dat: Armour King 00 00 01 C8
jun1.dat: Jun 00 00 01 D5
rog1.dat: Roger 00 00 01 E2
dev1.dat: Devil Kazuya 00 00 01 EF


How The Game Works

pack0.dat: 00 00 00 00


Possibly Characters:

aha1.dat: 00 00 01 BB


Language Settings?

i.dat: 03 00 07 45


Sound
soundsp.dat: 00 00 02 57


Stage
bgakrop.dat: 00 00 00 69



Unknown
comeff.dat: 00 00 00 1B
comshift.dat: 00 00 00 0E
table.dat: 00 00 00 4F
image.dat: 00 00 00 EB
gauge.dat: 00 00 42 05
tekken2.sig: 01 00 02 00
tekken2.mod: 04 E0 2D E5
tekken2.bar: 11 00 01 00
deflang.dat: 50 54


Edit: tekken2.sig: 01 00 02 00 has the same file signature as 25 to life and Disney Bolt for the ps2 but says it is encrypted. I'm not sure if it is encrypted or something happen in the code to think it is.
Shokoniraya
Posts: 416
Joined: Sat Sep 15, 2018 5:22 am

Re: Help With Tekken 2 Zeebo Archives

Post by Shokoniraya »

no, this is not 25 to life archive at all

Tekken 2 Zeebo .dat bms script

Code: Select all

endian big
get TABLE_SIZE long
get FILES_COUNT byte
xmath HEADER_SIZE "TABLE_SIZE + 4"
savepos START_TABLE
for i = 0 < FILES_COUNT
get FILE_TYPE byte
savepos FILE_NAME_STRING_START
getdstring HEADING 8
math NAME_CHECK_PASS = 0
for c = 0 < 8
savepos CURRENT_LOCATION
math CURRENT_LOCATION - 1
goto CURRENT_LOCATION
get NAME_STRING_CHARACTER byte
if NAME_STRING_CHARACTER != 0x00 & NAME_STRING_CHARACTER != 0x20 & NAME_CHECK_PASS = 0
savepos FILE_NAME_STRING_END
math NAME_CHECK_PASS = 1
endif
goto CURRENT_LOCATION
next c
xmath FILE_NAME_STRING_LENGTH "FILE_NAME_STRING_END - FILE_NAME_STRING_START"
xmath REST_OF_FILE_NAME_STRING_LENGTH "8 - FILE_NAME_STRING_LENGTH"
goto FILE_NAME_STRING_START
getdstring FILE_NAME_STRING FILE_NAME_STRING_LENGTH
getdstring HEADING REST_OF_FILE_NAME_STRING_LENGTH
get FILE_OFFSET long
math FILE_OFFSET + HEADER_SIZE
savepos CHECKPOINT
goto START_TABLE
get CLOSEST_FILE_OFFSET asize
for p = 0 < FILES_COUNT
getdstring HEADING 8
get NEXT_POSSIBLE_FILE_OFFSET long
math NEXT_POSSIBLE_FILE_OFFSET + HEADER_SIZE
if NEXT_POSSIBLE_FILE_OFFSET > FILE_OFFSET & NEXT_POSSIBLE_FILE_OFFSET < CLOSEST_FILE_OFFSET
math CLOSEST_FILE_OFFSET = NEXT_POSSIBLE_FILE_OFFSET
endif
next p
goto CHECKPOINT

xmath FILE_SIZE "CLOSEST_FILE_OFFSET - FILE_OFFSET"

string FILE_NAME = ""
string FILE_NAME + FILE_NAME_STRING
string FILE_NAME + ".bin"

log FILE_NAME FILE_OFFSET FILE_SIZE
next i


you can use this script on bin files

Code: Select all

endian big
math COUNT_NUMBER = 0
get TOTAL_SIZE asize
for i
math COUNT_NUMBER + 1
get FILE_SIZE long
savepos FILE_OFFSET
string FILE_NAME = ""
string FILE_NAME + COUNT_NUMBER
string FILE_NAME + "."
log FILE_NAME FILE_OFFSET FILE_SIZE
savepos JUMPBYTE
math JUMPBYTE + FILE_SIZE
goto JUMPBYTE
if JUMPBYTE = TOTAL_SIZE
cleanexit
endif
next i
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Help With Tekken 2 Zeebo Archives

Post by aluigi »

Regarding BAR and MIF try the following:

Code: Select all

# Tekken 2 Zeebo BAR and maybe MIF

comtype lzss0
get DUMMY short
get DUMMY short
get DUMMY short
get DUMMY short
get DUMMY long
get OFFSET1 long
get OFFSET2 long
get FILES long
goto OFFSET2
for i = 0 < FILES
    get OFFSET long
    putarray 0 i OFFSET
next i
math FILES - 1  # last is the end of archive

for i = 0 < FILES
    getarray OFFSET   0 i
    math i + 1
    getarray NEXT_OFF 0 i

    goto OFFSET
    get NAMESZ short
    math NAMESZ - 2
    getdstring TYPE NAMESZ

    # there is no way to know if a file is compressed or not!
    get XSIZE long
    if XSIZE u>= 0x00100000
        math XSIZE = 0
        goto -4 0 SEEK_CUR
    endif

    savepos OFFSET
    xmath SIZE "NEXT_OFF - OFFSET"

    string NAME p "%s/" TYPE
    if XSIZE == 0
        log NAME OFFSET SIZE
    else
        clog NAME OFFSET SIZE XSIZE
    endif
next
It's going to fail with the MIF you provided because there are only 3 files instead of the 9 referenced... yeah these archives are a mess probably because they are not real archives.
Anyway you can at least enjoy some extracted images ;)
lordchrome
Posts: 25
Joined: Wed Oct 21, 2020 9:24 am

Re: Help With Tekken 2 Zeebo Archives

Post by lordchrome »

Thank you, both of you. I'm using the code for all files to see if there are any errors. I found some errors but I will study and address all of them before I say it so it will make things easier to identify and fix. This will take awhile. Will let you know when I find out all the issues.
lordchrome
Posts: 25
Joined: Wed Oct 21, 2020 9:24 am

Re: Help With Tekken 2 Zeebo Archives

Post by lordchrome »

Finally got done scanning and extracting all the files.

After looking at each files closely I saw some of the same issues happening with the other files. Decided to add some of the files in folders and listed the name of the files and issues on notepad. So if you want to see the name of the file and location of the file. You can see all of that in this link https://mega.nz/file/K08GVSIR#hjBecVeq6 ... bKjUYRXS9E
lordchrome
Posts: 25
Joined: Wed Oct 21, 2020 9:24 am

Re: Help With Tekken 2 Zeebo Archives

Post by lordchrome »

I forgot to mention this since I found this out some days ago but I realized that after you get the dat files. The soundbg.dat files can have the format changed to .mp3 since it uses lame3. But I think its better to extract that file to and then rename the .bin file .mp3 since it will actually be the file that it's supposed to be. Still trying to learn the other formats while I try to figure out how to run BrewMP on my windows 10 laptop.