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.

Wario Land The Shake Dimension (WII)

Featured Replies

  • Author
  • Localization

CriticalError, posted Mon Mar 23, 2015 5:23 pm (4039)


Hello guys, well I come here to ask for small help about this game, really I have a script and unpack some files, but when try unpack other files I got this small issue, maybe somebody can take a look into files?

Format: GFA

Quote:
# script for QuickBMS http://aluigi.org/papers.htm#quickbms
# Wario Land

Endian little

# Main header
IDString "GFAC"
Get HEADER_1_1 long
Get HEADER_1_2 long
If HEADER_1_1 != 1
Print "Strange HEADER_1_1 = %HEADER_1_1%, may crash..."
EndIf
If HEADER_1_2 != 1
Print "Strange HEADER_1_2 = %HEADER_1_2%, may crash..."
EndIf
Get FILE_TABLE_OFFSET long
Get FILE_TABLE_SIZE long
Get DATA_OFFSET long
Get DATA_SIZE long

# Read compressed data header
GoTo DATA_OFFSET

IDString "GFCP"
Get HEADER_1_1 long
Get CTYPE long
If HEADER_1_1 != 1
Print "Strange GFCP HEADER_1_1 = %HEADER_1_1%, may crash..."
EndIf
If CTYPE == 1
ComType bpe
ElseIf CTYPE == 2
ComType lz77wii_raw30
Else
Print "Unknown compression %CTYPE%"
Exit
EndIf

Get RAW_DATA_SIZE long
Get COMPRESSED_DATA_SIZE long

Set CDATA_OFFSET DATA_OFFSET
Math CDATA_OFFSET 0x14

# Decompress
Clog MEMORY_FILE CDATA_OFFSET COMPRESSED_DATA_SIZE RAW_DATA_SIZE

# Extract files
GoTo FILE_TABLE_OFFSET
Get FILE_COUNT long
SavePos READ_OFFSET

For I = 0 < FILE_COUNT
GoTo READ_OFFSET

# Read the file entry
Get CRC32 long # guess
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


https://cloud.mail.ru/public/c264c2cee688/__PACK__.gfa

and here I attach other samples from other game, use same format, is Kirby Epic Yarn, many thanks guys.

https://cloud.mail.ru/public/1e747f2cb3 ... amples.zip
  • Author
  • Localization

aluigi, posted Mon Mar 23, 2015 6:34 pm (4040)


Try adding "math NAME_OFFSET &= 0x7fffffff" before "GoTo NAME_OFFSET".
  • Author
  • Localization

CriticalError, posted Mon Mar 23, 2015 6:52 pm (4041)


aluigi wrote:
Try adding "math NAME_OFFSET &= 0x7fffffff" before "GoTo NAME_OFFSET".
well many thanks for try but I got this error now.

Image
  • Author
  • Localization

aluigi, posted Tue Mar 24, 2015 4:29 pm (4059)


BOSS090.gfa wasn't included in the samples you uploaded.
  • Author
  • Localization

CriticalError, posted Tue Mar 24, 2015 7:33 pm (4069)


ok here I upload couple of files, from this 2 games, here we go, thanks luigi.

Code:
https://cloud.mail.ru/public/62ab5d323cf9/Wario Land Player gfa (Samples).7z
https://cloud.mail.ru/public/84c53cf474dd/Kirby Epic Yarn boss gaf (Samples).7z
  • Author
  • Localization

aluigi, posted Tue Mar 24, 2015 9:31 pm (4071)


The good news is that it's not a problem of quickbms.
The bad news is that I don't know how to decompress these chunks.

In fact most of the files use an unique compressed file-system and the script works, but other files don't.
Take the file BOSS07_BULLET04.gfa, the compressed file-system starts from offset 0x94 but from offset 0x181c it's no longer compressed, in fact with bpe you can decompress the first 0x1788 bytes without problems.
I thought it was chunked data but that's not possible because there are no chunk_sizes in the archive.
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.