Dinosaur Resurrection

This is a place to post tech details and informative documents about romhacking PC games.
Post Reply
flamethrower
Programmer
Posts: 995
Joined: Mon Mar 09, 2015 3:03 pm

Dinosaur Resurrection

Post by flamethrower » Mon Jul 11, 2016 12:07 am

I managed to get it decompressed. Compressed files have half-word with the compressed length plus 1. From there, it's straight-up FALCOM2.
1. QuickBMS: This script: http://zenhax.com/viewtopic.php?t=60
I modified it like this:

Code: Select all

# The Legend of Heroes: Trails in the Sky (DAT/DIR format)
# 
# Written by Ekey (h4x0r)
# 
# open DIR file for unpack
# script for QuickBMS http://quickbms.aluigi.org

open FDDE DAT 0
open FDDE DIR 1

idstring "LB DIR" 1
goto 0x10 1

for
    getdstring NAME 16 1
    get ZSIZE long 1
    get SIZE long 1
    get SIZE2 long 1
    get CRC32 long 1
    get OFFSET long 1
   
   if NAME == "/_______.___"
      cleanexit
   endif
   
    if ZSIZE == 0
        log NAME OFFSET SIZE2 0
    else if ZSIZE == SIZE
        log NAME OFFSET SIZE2 0
    else
        #unknown compression :/
        log NAME OFFSET ZSIZE 0
    endif
next
Changed SIZE to SIZE2 on the "log" lines near the bottom. The reason? There are some dummy files in there - there's an index entry for them but they're not actually in the archive at all. You will see "0" for size for these files. Ekey's script did not decompress all the files because it was running into a "not enough data" error.

The files you need to unpack using QuickBMS are \lib\event.dir and \lib\system.dir

2. This is my FALCOM2 decompression tool: http://pastebin.com/WpWJHu6B
Here's the example usage:

Code: Select all

if __name__ == '__main__':
    with open('ITEM    ._AS', 'rb') as f:
        with open('output.unc', 'wb') as g:
            f.seek(2)
            g.write(decompress_FALCOM2(f.read()))
I dumped the items too and translated the first two. "Dagger" is not a very good test because Ash starts with the "Short Sword."
Here's the Dinosaur Resurrection Item Dump: https://docs.google.com/spreadsheets/d/ ... sp=sharing
There are surprisingly few items in this game. Just 96. Zero no Kiseki has around 600 items.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest