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.

Legend of heroes - Sora no kiseki BMS script

Featured Replies

  • Author
  • Localization

sigroon365, posted Sun May 10, 2015 1:20 am (5165)


Actually, it was discussed on other thread.
http://zenhax.com/viewtopic.php?f=9&t=60&hilit=Trails
But Ekey's bms script didn't support uncompress, so I wrote it.
It works on all *.dir files but reimporting is not work.

Script Samples https://www.sendspace.com/file/dhcb7h
Result.
Image

Reimport Error.
Image

Code:
#Select *.dir or *.dat files to unpack.
comtype falcom
open FDDE DIR 0
open FDDE DAT 1

idstring "LB DIR"
goto 0x10

Do
    savepos tmp
    getdstring name 0x10
    get ZSIZE long
    get UNK long     #This is NOT SIZE
    get ZSIZE2 long
    get CRC32 long
    get OFFSET long
    savepos tmp2

    get packname filename
    string packname = _unpacked/
    string packname = name

    if ZSIZE == 0

    xmath tmp "tmp 0x24"
    goto tmp
   
    elif tmp2 = EOF       #For ED6_DT09.dat
    cleanexit

    elif ZSIZE = UNK   #For *._X2, *.wave and *._DS(dds file).

    log packname OFFSET ZSIZE 1

    elif ZSIZE = ZSIZE2
    clog packname OFFSET ZSIZE 0x1000000 1
    endif

While name != "/_______.___"


I read document and it seems that quickbms support falcom_compress.
What did I do wrong?
Image
  • Author
  • Localization

aluigi, posted Sun May 10, 2015 4:45 pm (5190)


The falcom_compress works perfectly.
In this case the problem is simply that your file when recompressed (even if untouched) occupies 1 byte more than the original (2023 against the 2022 of the original one).

The algorithm has not been written by me and I have no idea of how to improve it (maybe by modifying some constants like the back value).
  • Author
  • Localization

sigroon365, posted Mon May 11, 2015 10:06 am (5202)


aluigi wrote:
The falcom_compress works perfectly.
In this case the problem is simply that your file when recompressed (even if untouched) occupies 1 byte more than the original (2023 against the 2022 of the original one).

The algorithm has not been written by me and I have no idea of how to improve it (maybe by modifying some constants like the back value).


Hmm.. Ok. :roll:
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.