Compression and decompression tools for NES, SNES, and Game Boy games by HAL Laboratory
Find a file
2013-11-14 00:03:30 -05:00
.gitattributes misc cleanup for real release 2013-10-22 17:02:37 -04:00
.gitignore http://www.jerkcity.com/_jerkcity490.html 2013-11-12 17:07:14 -05:00
compress.c more consistent types, some bounds checking 2013-11-13 22:31:06 -05:00
compress.h more consistent types, some bounds checking 2013-11-13 22:31:06 -05:00
COPYING.txt uppercase doc names 2/2 2013-06-05 23:00:10 -04:00
exhal.c use stderr for info/error messages 2013-11-14 00:03:30 -05:00
gamenotes.txt this is where I try out the github windows client 2013-06-04 21:56:07 -04:00
inhal.c use stderr for info/error messages 2013-11-14 00:03:30 -05:00
makefile http://www.jerkcity.com/_jerkcity490.html 2013-11-12 17:07:14 -05:00
README.md Merge branch 'master' of https://github.com/devinacker/exhal 2013-10-24 22:12:55 -04:00
README.txt Merge branch 'master' of https://github.com/devinacker/exhal 2013-10-24 22:12:55 -04:00

exhal / inhal

HAL Laboratory NES/SNES/GB (de)compression tools
(version 1.10)
by Devin Acker (Revenant), 2013
https://github.com/devinacker

exhal and inhal are tools designed to decompress and recompress/insert data used by several NES, SNES and Game Boy games developed by HAL Laboratory.

Due to the design of the original decompression algorithm (and hardware limitations), the size of a file to be compressed is limited to 64 kilobytes (65,536 bytes). Please note that depending on which system you are working with, the actual useful limit may be much smaller.

Files compressed using exhal can often be smaller than their original compressed forms in the source ROMs, likely due to some shortcuts taken by the original development tools. In addition, version 1.10 nicely optimizes the compression process and is about 4x faster than before.

Source code is available at https://github.com/devinacker and is released under the terms of the MIT license. See COPYING.txt for legal info.

To use exhal (the decompressor):
exhal romfile offset outfile

To insert compressed data into a ROM:
inhal [-fast] infile romfile offset

To write compressed data to a new file:
inhal [-fast] -n infile outfile

Offsets can be specified in either hexadecimal (recommended) or decimal.

Using the -fast switch results in compression which is about 3 to 4 times faster, but with slightly larger output data. Use this if you don't care about data sizes being 100% identical to the original compressed data.

This is a list of games which are known to use the supported compression method, or are assumed to, based on a binary search of the games' ROMs:

  • Adventures of Lolo (NES/GB)
  • Adventures of Lolo 2 (NES)
  • Adventures of Lolo 3 (NES)
  • Alcahest (SNES)
  • Arcana / Card Master (SNES)
  • EarthBound / Mother 2 (SNES)
  • Ghostbusters II (GB)
  • HAL's Hole in One Golf / Jumbo Ozaki no Hole in One (SNES)
  • HyperZone (SNES)
  • Itoi Shigesato no Bass Tsuri No. 1 (SNES)
  • Kirby no KiraKira Kids (SNES)
  • Kirby Super Star (SNES)
  • Kirby's Adventure (NES)
  • Kirby's Dream Course / Kirby Bowl (SNES)
  • Kirby's Dream Land (GB)
  • Kirby's Dream Land 2 (GB)
  • Kirby's Dream Land 3 (SNES)
  • Kirby's Pinball Land (GB)
  • Kirby's Star Stacker / KiraKira Kids (GB)
  • NES Open Tournament Golf (NES)
  • New Ghostbusters II (NES)
  • Othello World (SNES)
  • Okamoto Ayako to Match Play Golf (SNES)
  • Revenge of the Gator / 66 Hiki no Wani Daikoushin (GB)
  • SimCity (SNES) [unused?]
  • SimCity 2000 (SNES)
  • Special Tee Shot (BS-X)
  • Super Famicom Box BIOS (SNES)
  • Trax / Totsugeki! Ponkotsu Tank (GB)
  • Vegas Stakes (SNES/GB)

Also note, unfortunately, that exhal cannot automatically detect or locate compressed data. The included file "gamenotes.txt" contains an incomplete list of decompression routine addresses to make searching easier.

These tools were originally used in the development of my Kirby's Dream Course editor. I hope you find your own exciting use for them. (I'm not the only Kirby hacker in the West, right? sob)

Contact me

Special thanks to

  • andlabs for helping me make the list of supported games
  • BMF54123 for naming the programs
  • Tiiffi for misc. Mac OS X build fixes
  • You for downloading (and using?) my software