SNES 4BPP file format
From SMWiki
This article is about the SNES's 4BPP graphics format.
One tile is 32 bytes.
Bytes 1, 3, 5, 7, 9, 11, 13, and 15: A1 B1 C1 D1 E1 F1 G1 H1
Bytes 2, 4, 6, 8, 10, 12, 14, and 16: A2 B2 C2 D2 E2 F2 G2 H2
Bytes 17, 19, 21, 23, 25, 27, 29, and 31: A3 B3 C3 D3 E3 F3 G3 H3
Bytes 18, 20, 22, 24, 26, 28, 30, and 32: A4 B4 C4 D4 E4 F4 G4 H4
A1, A2, A3 and A4 in bytes 1, 2, 17, and 18 forms the pixel in the top left corner of the tile (A1 is the lowest bit, A4 is the highest), H1, H2, H3 and H4 in the same bytes forms the rightmost pixel of the top line.
The second row consists of the same bits in bytes 3, 4, 19, and 20. 8 lines makes an 8x8 tile.
128 tiles makes a regular 4KB (Ex)GFX file.
