Welcome to Data Crystal's new home! Data Crystal is now part of the TCRF family (sort of).
The wiki has recently moved; please report any issues in Discord. Pardon the dust.

EarthBound/ASM/Decompression Routine

From Data Crystal
< EarthBound
Revision as of 20:22, 16 May 2023 by Esorth (talk | contribs) (→‎Subroutine Inputs: Add note about lack of size parameters.)
Jump to navigation Jump to search

This is a sub-page of EarthBound/ASM.

This subroutine takes a section of ROM that is compressed and outputs decompressed data to WRAM.

Subroutine Inputs

  • 0E-11 = Compressed data start (long pointer)
  • 12-15 = Decompressed output WRAM location (long pointer)

Note: There is no input parameter for size of compressed input or length available for decompressed output. The routine will read compressed data until encountering an encoded end, and it is up to the caller to understand the decompressed size of the data to ensure there is enough space at the output location.

Compression Format

Data is compressed using a hybrid compression scheme common to many HAL Laboratories games of the NES/SNES/GB era.

Libraries/Tools

  • exhal/inhal by Devin Acker (Revenant). Decompression and compression tools, generally able to compress data to at least as small of a data size as that found in the EarthBound ROM. As of 2023, used internally by CoilSnake.
  • KompreSS by Sukasa. One of the oldest libraries (a .NET DLL), mostly only supporting decompression.
  • kirbyLzRle by Griever. Decompression and compression tools, written in Haskell.
So very stubbly.
This page is rather stubbly and could use some expansion.
Are you a bad enough dude to rescue this article?