Compression DLLs for BMP2Tile
BMP2Tile supports plug-in compressors, somewhat inspired by Winamp. This repo holds all the ones I've written, plus some that were contributed by others. As far as is possible, I try to also include decompressors for use in homebrew and ROM hacks.
Automated builds are available on the Releases page.
DLL name | Short name | Longer name | Description | Tiles supported | Tilemap supported |
---|---|---|---|---|---|
1bppraw | 1bpp | 1bpp raw (uncompressed) binary | One bit per pixel tiles - discards upper bits | ✅ | |
2bppraw | 2bpp | 2bpp raw (uncompressed) binary | Two bits per pixel tiles - discards upper bits | ✅ | |
3bppraw | 3bpp | 3bpp raw (uncompressed) binary | Three bits per pixel tiles - discards upper bit | ✅ | |
aPLib | aPLib | aPLib | aPLib compression library | ✅ | ✅ |
apultra | apultra | aPLib (apultra) | apultra aPLib compressor - better compression for the same format | ✅ | ✅ |
exe | (configurable) | (configurable) | Wraps arbitrary external programs, passing data via files. This is useful if you do not want to implement your algorithm in the form of a DLL. | ✅ | ✅ |
exomizerv2 | exomizer | Exomizer v2 | Exomizer v2 compression ⚠ Seems to crash on some inputs | ✅ | ✅ |
highschoolkimengumi | hskcompr | High School Kimengumi RLE | Compression from the game High School! Kimengumi | ✅ | ✅ |
lsb | lsbtilemap | LSB-only tilemap | Least significant byte of tilemap data | ✅ | |
lz4 | lz4 | LZ4 (raw) | LZ4 compression library | ✅ | ✅ |
lzsa1 | lzsa1 | LZSA1 | LZSA compression library | ✅ | ✅ |
lzsa2 | lzsa2 | LZSA2 | LZSA compression library | ✅ | ✅ |
oapack | oapack | aPLib (oapack) | oapack aPLib compressor - better compression for the same format | ✅ | ✅ |
phantasystar | pscompr | Phantasy Star RLE | Compression from the game Phantasy Star | ✅ | ✅ |
psgaiden | psgcompr | PS Gaiden | Compression from the game Phantasy Star Gaiden | ✅ | |
pucrunch | pucrunch | Pucrunch | Pucrunch algorithm | ✅ | ✅ |
raw | bin | Raw (uncompressed) binary | Does no compression at all | ✅ | ✅ |
sonic1 | soniccompr | Sonic 1 | Tile compression from the game Sonic the Hedgehog | ✅ | |
sonic2 | sonic2compr | Sonic 2 | Tile compression from the game Sonic the Hedgehog 2 | ✅ | |
stc0 | stc0compr | Simple Tile Compression 0 | @sverx's stc0 | ✅ | |
zx0 | zx0 | ZX0 | ZX0 compression library | ✅ | ✅ |
zx7 | zx7 | ZX7 (8-bit limited) | Variant of ZX7 compression library tweaked for performance | ✅ | ✅ |
All are for emitting data direct to VRAM on Master System, using Z80 decompressors. Decompression to RAM will generally be smaller.
Description | ROM (bytes) | RAM (bytes, not including stack) |
---|---|---|
aPLib | 303 | 5 |
aPLib (fast) | 333 | 0 |
Exomizer v2 (⚠ Broken) | 208 | 156 |
LZ4 | 136 | 0 |
LZSA1 | 207 | 0 |
LZSA2 | 332 | 0 |
Phantasy Star RLE | 188 | 0 |
PS Gaiden | 223 | 34 |
PS Gaiden (fast) | 1028 | 32 |
Pucrunch (⚠ Broken) | 412 | 44 |
Sonic | 162 | 8 |
Sonic 2 | 289 | 39 |
ZX0 | 157 | 0 |
ZX0 (fast) | 274 | 0 |
ZX7 | 117 | 0 |
Note that the technologies marked with ⚠ above fail the automated benchmark tests, with crashes in the compressor or incorrect decompressed output. They could be fixed but as they are rather old, they are probably not competitive with newer compressors.
Based on a benchmark corpus made of tilesets and title screens, here's a scatter of the results.
How to read:
- Further to the right is faster
- Further up is better compression
- The scatter for a particular colour group is across a corpus of realistic Master System tile data
- Each colour group has an ellipse showing the standard deviation, with a + in the middle showing the mean, across the test corpus.
There can be wide variation in performance between compressors depending on your data; you may want to try a few options for your specific use case.
Here's some other compressors people have made.
Name | Link | Description | Tiles supported | Tilemap supported |
---|---|---|---|---|
ShrunkTileMap | https://github.com/sverx/STMcomp | Compresses tilemaps with specific support for sequential tile indices | ✅ |