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.

Astonia - Compressed Archives (.pak/zlib/libpng) [gfx.c conversion]

Featured Replies

  • Author
  • Localization

DJMD713, posted Wed Aug 15, 2018 1:56 pm (37545)


Copying a post I had made to another forum:

I have been working on figuring out Astonia's .pak files but have not had much success. The game is now open source (see Github below). So far I have determined the following:

- It takes folders with .png files and converts them to .pak files. (Examples - https://drive.google.com/open?id=1Ej6O0 ... 7zRcTq5jL1)
- The code for the .pak conversion process is here (Function - gfx_make_pak - https://github.com/AstoniaDev/Astonia-3 ... moac/gfx.c)
- The app is written in C and uses zlib and libpng.
- I have tried accessing the files using multiple applications with no luck (MultiEx Commander, Game Extractor, etc)


I am trying to learn more about C to figure out a way to reverse the process but it is currently beyond what I am capable of. Does anyone have suggested guides or tutorials I can learn from? If anyone else is up to the task of deconstructing the files that would be much appreciated as well.


Someone had suggested using Offzip to open the .pak

chrrox wrote:
use offzip
offzip.exe -a c:\file.pak c:\extractDir 0x0



Thanks for the suggestion. It seems to extract the correct number of files but does not get the correct data. Here is a screenshot with the extracted files (left) vs the expected output (right). Not sure what to make of this. Is it an offset issue or is there more to it?

Image
  • Author
  • Localization

DJMD713, posted Thu Aug 16, 2018 11:00 pm (37597)


aluigi wrote:
http://aluigi.org/bms/astonia.bms


Unfortunately this does not output correct files. If I rename them as .png files and attempt to open them it is unsuccessful.
  • Author
  • Localization

aluigi, posted Fri Aug 17, 2018 1:14 am (37602)


Because the data is not the original image "as-is", it's a custom format as in fact it's visible in that gfx.c code you have there.
The script and the suggestion of chrrox are correct and the data is correctly extracted.
Converting the extracted data in a "readable" format is a completely different thing, even with that source code it's probably a long work to do and I'm not sure if someone is interested (maybe there is some hope since the source code is available but time is precious for everybody).

Now I'm going to move the topic in the Graphics section since it's not a problem related to extraction.
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.