Skip to content

Instantly share code, notes, and snippets.

@furrtek
Created January 20, 2025 21:44
Show Gist options
  • Save furrtek/71f799d2ba0bb15f5de8704fbf95a376 to your computer and use it in GitHub Desktop.
Save furrtek/71f799d2ba0bb15f5de8704fbf95a376 to your computer and use it in GitHub Desktop.
Konami 4bpp sprite tile format
Konami 4bpp sprite tile format
16-bit graphics ROMs go in pairs
One 32-bit word describes a row of eight 4bpp pixels
Each byte is a bitplane
ROM UUUUUUUUUUUUUUUULLLLLLLLLLLLLLLL
Bit 3322222222221111111111
10987654321098765432109876543210
Pixel 01234567012345670123456701234567 (0=left)
Plane 33333333222222221111111100000000
Subtiles are 8x8 pixels (32 bytes)
The minimum addressable tile is 16x16 pixels, rendered as 4 subtiles arranged like this:
0 1
2 3
Sprites larger than 1 tile follow the same arrangement recursively
For example, a 32x32 pixel sprite (2x2 tiles) will be made of the following subtiles:
0 1 4 5
2 3 6 7
8 9 C D
A B E F
Note that the hardware addresses those subtiles automatically given a single base tile
number for the sprite, by replacing the lower bits (no addition !)
For example, providing a base tile number of 0, 1, 2 or 3 for a
2x2 tile sprite like above will give identical results.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment