- C 98.4%
- Makefile 1.6%
| testdata | Test image | |
| .editorconfig | Initial import | |
| .gitignore | Add gblogo | |
| bitpack.c | Initial import | |
| gbafix.c | Initial import | |
| gbalogo.c | Use binary mode | |
| gblogo.c | Add gblogo | |
| LICENSE.md | Initial import | |
| Makefile | Add gblogo | |
| pal2bin.c | Add pal2bin | |
| pal2vga.c | Initial import | |
| png2idx.c | Supply BG color for images with transparency | |
| png2tiles.c | Tweak map output for easy GB(C) loading | |
| README.md | Option to generate maps (-m) | |
| rl2.c | Initial import | |
romtools
Set of tools for dealing with bitmaps, color palettes, compression, etc. for 8 and 16-bit development.
Tools
rl2 [infile [outfile]]
Encoder for custom run-length encoding.
bitpack -b bits <infile >outfile
Takes the lower bits of every byte in input file and writes them, packed, to the output file.
gblogo file.gb logo.dat
Extracts the GB(C)) logo data from the given ROM and writes it to the given output file.
gbafix [-nv] file.gba
Calculates and sets the checksum field in the header of the given GBA ROM.
gbalogo file.gba logo.dat
Extracts the GBA logo data from the given ROM and writes it to the given output file.
png2idx [infile [outfile]]
Reads pixels from a PNG file that uses indexed colors, and writes them, raw (one pixel per byte) to the given output file.
png2tiles [-d] [-c crop] [-m mapfile] [infile [outfile]]
Reads 8x8 tiles from a PNG file that uses indexed colors and writes them to the output file, and optionally writes a map.
pal2vga [infile.pal [outfile]]
Reads a .PAL palette file and writes it out as raw RGB triplets, followed by a 0 byte. The colors are written 1 byte per component, in range 0-64, so 3 bytes per palette entry.
pal2bin [infile.pal [outfile]]
Reads a .PAL palette file and writes it out as raw RGB triplets. The colors are written 1 byte per component, in range 0-256.
Building
Requires a C opmiler, make, and libpng. For Debian:
sudo apt install build-essential libpng-dev
Then to build:
make
Author
Sijmen J. Mulder (ik@sjmulder.nl). Licensed under GPLv3, see LICENSE.md