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.

Asphalt Urban GT 2 (PSP) - edit.mfd

Featured Replies

  • Author
  • Localization

AlphaTwentyThree, posted Mon Jun 20, 2022 5:30 am (72174)


Hi there!
Easy format but somehow I can't figure out the data inside the TOC. Can somebody tell me what the fields represent? First long is number of files, then the variables have lengths of 4,2,4,4 - the short variable supposedly a type ID.
Here are the first 5MB: https://www.mediafire.com/file/n3ne3uu0 ... t2.7z/file (file has total size of 0x30431c8e).
A crude script is all I need, I'll enhance it with heuristics afterwards. Just looking for something that gives me correct offset/size pairs...
Thanks for your help!
  • Author
  • Localization

h3x3r, posted Wed Jun 22, 2022 9:52 pm (72247)


Almost got bored but figured it out. But strangely unpacked files have 460 MB instead of ~700 MB. No idea, maybe another TOC somewhere.

EDiT: Fixed thanks to DKDave!
Code:
####################################
get FILENAME basename
get FILES long
savepos TABLE_STARTOFF
getdstring FILES_TMP FILES*14
get TABLECOUNT long
savepos TABLE_ENDOFF
getdstring SKIPTABLE TABLECOUNT*4
savepos DATA_OFF

goto TABLE_STARTOFF
for i = 0 < FILES
   get FILEID long
   get TABLENUM short
   get OFFSET long
   get SIZE long
   savepos TMP
   string NAME p= "%s/%u.dat" FILENAME OFFSET
   if TABLENUM == 1
      log NAME OFFSET SIZE
   else
      goto TABLE_ENDOFF
      getdstring TEMP OFFSET*4
      for x = 0 < TABLENUM
         get TMP_OFFSET long
         string NAME p= "%s/%u.dat" FILENAME TMP_OFFSET
         log NAME TMP_OFFSET SIZE
      next x
   endif
   goto TMP
next i
  • Author
  • Localization

DKDave, posted Wed Jun 22, 2022 11:27 pm (72249)


Just to add to the above:

If your "TABLENUM" value = 1, then OFFSET and SIZE are just that for 1 file within the archive.

If "TABLENUM" > 1, then OFFSET is a start index into TABLE 2 (which is just file offsets preceded by a count value for the whole table) and TABLENUM is the number of file offsets to read. SIZE is then the size of every file in this entry, e.g. the first entry has 0xf4 files at index 0, all of size 0xe6

And that should give you full coverage of the archive (approx. 771 MB), and you should have 43797 files in total.
  • Author
  • Localization

h3x3r, posted Thu Jun 23, 2022 9:04 am (72251)


Image
Thanks for hints Dave! It is as you said. Now it unpacks all.
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.