Indexing Images for unLZ-gba: Decompressing LZ77 Graphics in GBA ROMs
unLZ-gba is a tool to decompress LZ77-compressed graphics in Game Boy Advance ROMs. "Indexing" means creating a text file that tells the tool where the compressed data starts and the image dimensions.
Prerequisites
- Confirm the target data is LZ77-compressed (use a hex editor or GBA graphics viewer like GBAGE or Tile Molester)
- Find the ROM offset (address) of the compressed block
- Know the width and height in pixels (usually multiples of 8)
Create an Index File (e.g., index.txt)
romoffset=0x08000000
width=256
height=192
Optional: lz77header=1 if the data includes the standard LZ77 header byte.
Run unLZ-gba (Command Line)
unLZ-gba -i index.txt -o output.bmp rom.gba
-i index file
-o output image (BMP, PNG, etc.)
rom.gba your ROM file (work on a copy!)
Tips
- Use GBA Graphics Editor or NSE (Nameless Sprite Editor) for visual browsing—they auto-detect many images.
- Documentation for the specific game (e.g., Pokémon ROM maps) often lists known offsets.
- If the image uses a palette, you may need to extract the palette separately (offset + size).