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.

.PAK File From JALECO Classic Game

Featured Replies

  • Author
  • Localization

indrasudo, posted Sat Dec 04, 2021 4:23 pm (67920)


The Archive from japanese game by JALECO 1998
  • Author
  • Localization

aluigi, posted Sat Dec 04, 2021 5:50 pm (67927)


Do you know the exact name of that game?

It looks like all the files are compressed with lzss and there are no filenames:
Code:
# JALECO Classic Game of 1998

comtype lzss0
get FILES long
for i = 0 <= FILES
    get OFFSET long
    putarray 0 i OFFSET
next i
for i = 0 < FILES
    getarray OFFSET 0 i
    math i 1
    getarray SIZE   0 i
    math SIZE - OFFSET

    goto OFFSET
    get ZSIZE long
    math OFFSET 4
    math SIZE   - 4
    clog "" OFFSET ZSIZE SIZE
next
  • Author
  • Localization

BloodRaynare, posted Sat Dec 04, 2021 10:23 pm (67933)


Well what a coincidence, I was working with these files yesterday as well, these files were from "Bakusou Kyoudai Let's & Go!! Eternal Wings". And this is just the glimpse of one of the formats.
For some reason, in this game Jaleco uses a varying format with a simple headers (Some are nested archives, then some files starts with only one ZSIZE field without any FILES or OFFSET fields preceding it, probably because it only holds one file, or my favorite, one of the files inside the archive was uncompressed, without any flags to indicate it), making it bit confusing to write a extraction scripts.

Here's my own spin of the extraction scripts:

Code:
# Bakusou Kyoudai Let's & Go!! Eternal Wings
# Extraction scripts by BloodRaynare

math EXTRACTION_MODE = 0

comtype lzss0

get FNAME basename

if EXTRACTION_MODE == 2
   get ZSIZE long
   string NAME p "%s." FNAME
   clog NAME 4 ZSIZE 0x1000000
else
   get FILES long
   for i = 0 < FILES
      get OFFSET long
      putarray 0 i OFFSET
   next i
   get ENDSIZE long
   
   for i = 0 < FILES
      getarray OFFSET 0 i
      math i 1
      if EXTRACTION_MODE == 1
         if FILES == i
            xmath SIZE "ENDSIZE - OFFSET"
         else
            getarray NEXT_OFFSET 0 i
            xmath SIZE "NEXT_OFFSET - OFFSET"
         endif
         string NAME p "%s.i" FNAME i
         log NAME OFFSET SIZE
      else
         goto OFFSET
         get ZSIZE long
         if ZSIZE == 0
            savepos CURRPOS
            if CURRPOS >= ENDSIZE
               break
            endif
            get ZSIZE_TEST2 long
            if ZSIZE_TEST2 == 0
               math EXTRACTION_MODE == 3
            else
               continue
            endif
         endif
         math ZSIZE x 2
         if EXTRACTION_MODE != 3
            math OFFSET 4
         endif
         string NAME p "%s.i" FNAME i
         if EXTRACTION_MODE == 3
            if ZSIZE_TEST2 == 0
               if FILES == i
                  xmath SIZE "ENDSIZE - OFFSET"
               else
                  getarray NEXT_OFFSET 0 i
                  xmath SIZE "NEXT_OFFSET - OFFSET"
               endif
            else
               math SIZE = ZSIZE
            endif
            log NAME OFFSET SIZE
         else
            clog NAME OFFSET ZSIZE 0x1000000
         endif
      endif
   next
endif


Yeah, the scripts was a bit messy and could be a bit cleaner, but this is the best I can do.
Also notice that I added a variable to set the extraction mode along with the condition to accommodate it, it's because of the variations of the files inside the disc.
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.