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.

King of Figthers 2000 DC (DAT FILE)

Featured Replies

  • Author
  • Localization

domingo, posted Mon Jan 17, 2022 7:40 pm (69151)


Hello again, I need to extract the textures from these KOF 2000 data files.
These files are GRC compressed texture packs.
I have tried this script, but it only extracts and uncompresses the first texture.
Code:
comtype grc
get ZSIZE asize
xmath SIZE "ZSIZE * 10"
get NAME basename
clog NAME 0 ZSIZE SIZE


I have also found in this same forum the script to compress again, I don't know if it would be possible to adapt it for these rows.
Code:
log MEMORY_FILE 0 0
get SIZE asize
for i = 0 < SIZE
    get TMP byte
    if TMP >= 0xc0
        put 0xc1 byte MEMORY_FILE
    endif
    put TMP byte MEMORY_FILE
next i
get SIZE asize MEMORY_FILE
get NAME filename
string NAME -= "_uncompressed"
log NAME 0 SIZE MEMORY_FILE


file


Cheers
  • Author
  • Localization

aluigi, posted Fri Jan 21, 2022 2:14 am (69232)


Are you sure there is no other file with name name and different extension?
Or maybe another file that acts as index for all these DAT files?

Because that DAT is clearly a container of files without index, that explains the decompression of the first file only.
  • Author
  • Localization

domingo, posted Fri Jan 21, 2022 1:15 pm (69249)


Well, I can't find anything among the files, these files are inside a folder, and they are all texture packs.
In the root folder at the moment I have not seen anything. only GRC files, other DAT files for which I can't find any type of index, and OSB files that seem to be audio.
It is possible that they may be in other compressed files such as GRC in the root folder
In the binary I have only found the names of these DATs, but nothing of their content.
I have managed to extract a whole file, extracting the first entry and then deleting it, but if there are for example 50 textures, I have to do it 50 times.

Perhaps with a script to which the offsets of each texture can be added manually, it could be done faster.
At least that way it would only be to edit the offsets in the script and at once they could be extracted
  • Author
  • Localization

aluigi, posted Fri Jan 21, 2022 4:48 pm (69256)


I tried something lame like searching all the GBIX but the decompression crashes with some files, don't know why.
The crash happens even if you set the compressed size equal than the remaining part of the DAT file.

Anyway the lame scanner/dumper for testing is the following:
Code:
comtype grc
get DAT_SIZE asize
for OFFSET = 0 != DAT_SIZE
    getdstring SKIP 8

    findloc NEXT_OFF binary "GBIX" 0 ""
    if NEXT_OFF == ""
        math NEXT_OFF = DAT_SIZE
    else
        math NEXT_OFF - 2
    endif

    xmath ZSIZE "NEXT_OFF - OFFSET"
    xmath SIZE "ZSIZE * 32"
    #math SIZE = 0x10022 # is it ever the same?
    clog "" OFFSET ZSIZE SIZE

    math OFFSET = NEXT_OFF
    goto OFFSET
next
  • Author
  • Localization

domingo, posted Fri Jan 21, 2022 6:53 pm (69260)


I think it can help me, at least it makes the extraction much easier.
In any case, I will count the textures of each file in case one is left unextracted.

thank you aluigi ;)
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.