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.

Renpy Switch Game

Featured Replies

  • Author
  • Localization

Kono, posted Sun Nov 28, 2021 12:02 pm (67733)


I was just looking through some switch game, and I found a Renpy game. There is some graphic file in it, some seem to be compressed.

I can read the header, but I can't determine the compression algorithm. It's build as
Code:
0x00 -> 0x04 = Unknown number, maybe magic number
0x04 -> 0x08 = Supposedly bit per color
0x08 -> 0x0C = height (1080p)
0x0C -> 0x0F = width (1920p)

After that there is a stream which seem to be compressed. I can't figure what is the compression algorithm as there is no magic number. I uploaded few sample images.



Thank you for your time !
  • Author
  • Localization

Allen, posted Sun Nov 28, 2021 1:49 pm (67739)


They are double-layer LZ4 compression.

Code:
# Renpy Switch Game
# script for quickbms
# by Allen

comtype lz4
get magic long
get bpp long
get width long
get height long
get SIZE long
get ZSIZE long
get name basename

string name ".dcmp"
savepos OFFSET
log MEMORY_FILE 0 0
clog MEMORY_FILE OFFSET ZSIZE SIZE
get SIZE long MEMORY_FILE
get ZSIZE long MEMORY_FILE
savepos OFFSET MEMORY_FILE
clog name OFFSET ZSIZE SIZE MEMORY_FILE
  • Author
  • Localization

Kono, posted Tue Nov 30, 2021 2:03 pm (67769)


Indeed, it works ! Thank you :D
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.