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.

dat unpacker [Ys: Memories of Celceta]

Featured Replies

  • Author
  • Localization

Rainx, posted Sat Nov 21, 2020 3:43 pm (60514)


Hello there.
Can anyone make a script for attached file?

Header:
10 08 13 50 magic
0x0C - compressed data size
0x18 - first compressed block
0x02F975 - next compressed data size
0x02F981 - second compressed block
etc

comtype falcom


It's difficult to convert this file manually and then combine all the parts.
Game: Ys Celceta

Thanks.
  • Author
  • Localization

aluigi, posted Thu Nov 26, 2020 9:58 am (60616)


There is something missing in the information you provided since falcom can't work from that offset 0x18.

I tried something and one chunk worked during my tests, anyway feel free to do your tests and let me know when you have the correct offset, compressed and uncompressed size of each chunk so I can fix it:
Code:
# Ys: Memories of Celceta

comtype falcom
idstring "\x10\x08\x13\x50"
get DUMMY long  # 0x200
get DUMMY long  # 0x200

get DAT_SIZE asize
for i = 0
    savepos TMP
    if TMP == DAT_SIZE
        break
    endif

    get TMP basename
    string NAME p "%s_%d." TMP i
    log NAME 0 0

    append
    get ZSIZE long
    get CHUNK_SIZE long # 0x40000
    get CHUNKS long
    for x = 0 < CHUNKS
        get CHUNK_ZSIZE long
        math CHUNK_ZSIZE & 0xffffff
        math CHUNK_ZSIZE - 3

        savepos CHUNK_OFF
        clog NAME CHUNK_OFF CHUNK_ZSIZE CHUNK_SIZE

        math CHUNK_OFF CHUNK_ZSIZE
        goto CHUNK_OFF

        #get DUMMY byte  # ever 1 except for the last chunk
    next x
    append
next i
  • Author
  • Localization

aluigi, posted Thu Nov 26, 2020 10:10 am (60617)


This one works but I have some doubts:
Code:
# Ys: Memories of Celceta

comtype falcom
idstring "\x10\x08\x13\x50"
get DUMMY long  # 0x200
get DUMMY long  # 0x200

get DAT_SIZE asize
for i = 0
    savepos TMP
    if TMP == DAT_SIZE
        break
    endif

    get TMP basename
    string NAME p "%s_%d." TMP i

    get ZSIZE long
    get SIZE long
    get CHUNKS long

    math SIZE 1   # bug in the decompression code?

    math ZSIZE - 8

    savepos OFFSET
    clog NAME OFFSET ZSIZE SIZE
    goto ZSIZE 0 SEEK_CUR
next i
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.