1
0
Fork
You've already forked romtools
0
Tools for 8 and 16-bit development
  • C 98.4%
  • Makefile 1.6%
Find a file
2026年06月14日 22:47:44 +02:00
testdata Test image 2026年06月09日 23:10:33 +02:00
.editorconfig Initial import 2026年06月06日 20:48:44 +02:00
.gitignore Add gblogo 2026年06月07日 15:29:20 +02:00
bitpack.c Initial import 2026年06月06日 20:48:44 +02:00
gbafix.c Initial import 2026年06月06日 20:48:44 +02:00
gbalogo.c Use binary mode 2026年06月07日 15:29:08 +02:00
gblogo.c Add gblogo 2026年06月07日 15:29:20 +02:00
LICENSE.md Initial import 2026年06月06日 20:48:44 +02:00
Makefile Add gblogo 2026年06月07日 15:29:20 +02:00
pal2bin.c Add pal2bin 2026年06月07日 02:12:15 +02:00
pal2vga.c Initial import 2026年06月06日 20:48:44 +02:00
png2idx.c Supply BG color for images with transparency 2026年06月06日 22:05:35 +02:00
png2tiles.c Tweak map output for easy GB(C) loading 2026年06月14日 22:47:44 +02:00
README.md Option to generate maps (-m) 2026年06月09日 23:10:33 +02:00
rl2.c Initial import 2026年06月06日 20:48:44 +02:00

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