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.

Help with error "Returned output size is negative" and missing last file

Featured Replies

  • Author
  • Localization

Vuze, posted Thu Jul 16, 2015 7:27 pm (6422)


Hey,

I've tried to get my first QuickBMS script up and running today (I later found out that there is already a script for an older, slightly different version of the archive type I've been messing with... :roll: Good to gain some experience anyway) but neither mine nor an adapted version of the script I found fully work.

Issue a) the last file in an archive doesn't get extracted for some reason.
Issue b) for larger files, I get the "Returned output size is negative (-1)" error and I just don't know why. The structure looks just like the files that work fine (sans issue a).

Here is the script (adapted some stuff from the other one):
Code:
idstring GFAC
get version long
get unknown1 long

get table_offset long
get table_size long
get data_offset long
get data_size long

goto data_offset
idstring GFCP
get unknown2 long
get unknown3 long
get extracted_size long
get compressed_size long

set compressed_offset data_offset
math compressed_offset 0x14
comtype bpe

clog memory_file compressed_offset compressed_size extracted_size
goto table_offset
get file_count long
savepos read_offset

for i = 0 goto read_offset
get unknown4 long
get name_offset long
get file_size long
get file_offset long
savepos read_offset

math file_offset - data_offset
goto name_offset
get file_name string
log file_name file_offset file_size memory_file
next i


Here are some example archives that work and some that don't. https://mega.co.nz/#!JYYXxb7Y!jYpbZa1tT ... ZMLKSpXWH0
I'd really appreciate your help :)
  • Author
  • Localization

aluigi, posted Thu Jul 16, 2015 8:32 pm (6423)


That's the kirby file format and my script works perfectly.
Are you sure you were not using an old version of that script?
The current one is 0.2: http://aluigi.org/papers/bms/others/kirby_epic_yarn.bms

Anyway, in reference to your script, the problem is simply that name_offset sometimes has the 0x80000000 flag used to tag some files.
"math name_offset & 0x00ffffff" solves the problem.
  • Author
  • Localization

Vuze, posted Thu Jul 16, 2015 9:24 pm (6426)


Ah fantastic!
No, I used a completely different script for some Wii game but everything except for the used compression seemed the same.
Thanks for the reply, everything works fine now

E: No, it doesn't -- all the example files that didn't work for me before still return output size is negative (-1) with your Kirby script. Or is something wrong with my QuickBMS setup?
E: Nevermind... I shouldn't have multiple versions of the same tool on my harddrive :oops:
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.