TKMK00 is a format for some compressed textures used in the Mario Kart 64 title screen and menus.
The TKMK00 decoder function is located at 800405D0/0411D0 in the Mario Kart 64 (U) ROM. It takes 4 parameters:
Param | Type | Description |
---|---|---|
A0 | u8* | pointer to input TKMK00 compressed data |
A1 | u8* | pointer to output buffer (1 byte per pixel) |
A2 | u16* | pointer to RGBA16 texture output buffer (2 bytes per pixel) |
A3 | u16 | RGBA mask to clear alpha bit for in output (usually 0x0001 or 0x00BE) |
Offset | Length | Description |
---|---|---|
0x00 | 0x6 | File signature “TKMK00” |
0x06 | 0x1 | Bit mask used for offsets at 0xC |
0x07 | 0x1 | Unused? (always 0x0F) |
0x08 | 0x2 | Output texture width in pixels |
0x0A | 0x2 | Output texture height in pixels |
0x0C | 0x20 | Array of 8 offsets, used with bitmask at 0x06 |
C: tkmk00: https://github.com/queueRAM/tkmk00
C#: TKMK00Encoder:https://github.com/mib-f8sm9c/MiscellaneousHacks/blob/master/BetaTools/MarioKartTestingTool/TKMK00Encoder.cs