Every Nitro resource lives inside a RESO
TOC entry with the corresponding reversed-ASCII type_tag.
Magic identifiers on disk are little-endian 4-byte words; the reversed
form spells the intuitive name (e.g. RGCN on disk β
NCGR read forward).
NCGR (RGCN) β tile graphics
Type tag rgcn. 4,337 instances.
| Offset | Size | Type | Field |
|---|---|---|---|
0x00 | 4 | char[4] | magic = "RGCN" |
0x04 | 2 | u16 | byte_order_mark (0xFEFF) |
0x06 | 2 | u16 | version |
0x08 | 4 | u32 | file_size |
0x0C | 2 | u16 | header_size (0x10) |
0x0E | 2 | u16 | section_count |
0x10 | 4 | char[4] | section magic = "RAHC" (CHAR) |
0x14 | 4 | u32 | section_size |
0x18 | 2 | u16 | tiles_h or 0xFFFF |
0x1A | 2 | u16 | tiles_w or 0xFFFF |
0x1C | 4 | u32 | bpp_code (3 = 4bpp / 16-color, 4 = 8bpp / 256-color) |
0x20 | 4 | u32 | mapping_type (1D / 2D OBJ mapping) |
0x24 | 4 | u32 | linear_flag (0 = 8Γ8 tiled, 1 = linear NCBR) |
0x28 | 4 | u32 | tile_data_size |
0x2C | 4 | u32 | tile_data_offset (typically 0x18, relative to RAHC start + 0x18) |
0x30 | β | u8[] | tile pixels |
Tile order in 4bpp tiled mode: 8Γ8 tiles stored row-major, 4 bits per pixel (two pixels per byte, lo-nibble first). Tile-bank index appears in the NSCR/NCER reference (10-bit field).
0xFFFF dimensions mean "deferred" β for OBJ sprites the
canvas comes from a paired NCER; for BG screens it comes from a paired
NSCR (typically 256Γ192 = 32Γ24 tiles).
NCLR (RLCN) β palette
Type tag rlcn. 2,600 instances.
| Offset | Size | Type | Field |
|---|---|---|---|
0x00 | 4 | char[4] | magic = "RLCN" |
0x10 | 4 | char[4] | section magic = "TTLP" (PLTT) |
0x14 | 4 | u32 | section_size |
0x18 | 4 | u32 | bpp_code (3 = 16-color, 4 = 256-color) |
0x1C | 4 | u32 | unknown |
0x20 | 4 | u32 | palette_data_size |
0x24 | 4 | u32 | palette_data_offset (typically 0x10, relative) |
0x28 | β | u16[] | BGR555 colors |
Color word layout (16-bit LE): 0BBBBB GGGGG RRRRR β 5 bits per
channel, top bit ignored on hardware. Slot 0 is conventionally transparent
in OBJ palettes.
When section_count β₯ 2, a "PMCP" section follows
at 0x10 + ttlp_size. It maps each 16-color bank to a VRAM
bank index β when absent, banks are assumed sequential 0..N-1.
NCER (RECN) β cells / OAM
Type tag recn. 1,553 instances.
| Offset | Size | Type | Field |
|---|---|---|---|
0x00 | 4 | char[4] | magic = "RECN" |
0x10 | 4 | char[4] | section magic = "KBEC" (CEBK) |
0x14 | 4 | u32 | section_size |
0x18 | 2 | u16 | cell_count |
0x1A | 2 | u16 | cell_attr (0 = 8-B entries, 1 = 16-B entries with bbox) |
0x1C | 4 | u32 | cell_data_offset (relative to KBEC+8) |
0x20 | 4 | u32 | mapping_type |
Cell entry (8 or 16 bytes):
| Offset | Size | Type | Field |
|---|---|---|---|
+0x00 | 2 | u16 | obj_count |
+0x02 | 2 | u16 | attrs |
+0x04 | 4 | u32 | obj_offset (relative to OAM block) |
+0x08 | 2 | s16 | xmax (only if cell_attr=1) |
+0x0A | 2 | s16 | ymax |
+0x0C | 2 | s16 | xmin |
+0x0E | 2 | s16 | ymin |
OAM entry (6 bytes per OBJ):
| Word | Bits | Field |
|---|---|---|
attr0 (u16) | 0..7 | y (signed 8-bit, screen coord) |
| 8 | rotscale | |
| 9 | double_size / disable | |
| 10..11 | obj_mode (normal/blend/window/bitmap) | |
| 12 | mosaic | |
| 13 | depth (0 = 4bpp, 1 = 8bpp) | |
| 14..15 | shape (square / wide / tall / forbidden) | |
attr1 (u16) | 0..8 | x (signed 9-bit) |
| 9..11 | rotscale index / unused | |
| 12..13 | hflip, vflip (when rotscale=0) | |
| 14..15 | size | |
attr2 (u16) | 0..9 | tile index (10 bits β into NCGR tilebank) |
| 10..11 | priority | |
| 12..15 | palette_bank (4 bits β selects NCLR 16-color bank) |
(shape, size) β (width_px, height_px) lookup
(square 0..3: 8 16 32 64; wide 0..3: 16 32 32 64; tall 0..3: 8 8 16 32).
Reference: src/translator/_sprite_decode.OBJ_SIZE_LUT.
Optional extra sections after KBEC: "LBAL" (1,778 instances β
cell state labels like "TAB1_off", "TAB1_on") and "TXEU"
(1,778 β user extension metadata).
NSCR (RCSN) β BG screen / tilemap
Type tag rcsn. 1,128 instances.
| Offset | Size | Type | Field |
|---|---|---|---|
0x00 | 4 | char[4] | magic = "RCSN" |
0x10 | 4 | char[4] | section magic = "NRCS" (SCRN) |
0x14 | 4 | u32 | section_size |
0x18 | 2 | u16 | width_px (typically 256) |
0x1A | 2 | u16 | height_px (typically 192) |
0x1C | 4 | u32 | bpp_code (often 0 β actual bpp comes from paired NCGR) |
0x20 | 4 | u32 | screen_data_size |
0x24 | β | u16[] | screen cells, row-major (32Γ24 = 768 cells for 256Γ192) |
Screen-cell bit layout (16-bit LE, per BG cell):
| Bits | Field |
|---|---|
| 0..9 | tile_index (10 bits β into NCGR tilebank) |
| 10 | hflip |
| 11 | vflip |
| 12..15 | palette_bank (4 bits β only used for 4bpp tilesets) |
NANR (RNAN) β animation
Type tag rnan. 225 instances.
| Offset | Size | Type | Field |
|---|---|---|---|
0x00 | 4 | char[4] | magic = "RNAN" |
0x10 | 4 | char[4] | section magic = "KNBA" (ABNK) |
+0x08 | 2 | u16 | bank_count |
+0x0A | 2 | u16 | frame_count_total |
Per-bank entry: frame_count, loop mode, frame data offset. Per-frame entry: cell_idx, flag, dx, dy, duration. Animation playback is not yet decoded by the project tooling (each cell renders as a static frame).
Section-magic census
| Section magic | Resource | Occurrences |
|---|---|---|
RAHC | NCGR CHAR data | 4,338 |
TTLP | NCLR PLTT colors | 2,600 |
PMCP | NCLR palette-bank map | 2,600 |
LBAL | NCER cell labels | 1,778 |
TXEU | NCER user extension | 1,778 |
KBEC | NCER cell block | 1,553 |
NRCS | NSCR screen data | 1,128 |
KNBA | NANR animation bank | 225 |
Cross-format references
A composed image requires resolving references across formats:
- NSCR cell.tile_index (10 bits) β tile in NCGR tilebank
- NSCR cell.palette_bank (4 bits) β bank in NCLR (Γ16 colors)
- NCER OBJ.attr2.tile (10 bits) β tile in NCGR (OBJ mapping aware)
- NCER OBJ.attr2.palette_bank (4 bits) β bank in NCLR
- NCGR β NCLR pairing rules: see palette resolution
Source
src/translator/_sprite_decode.pyβparse_ncgr,parse_nclr,parse_ncer,parse_nscr,compose_*src/translator/_sprite_encode.pyβ NCGR re-encoder (template-based)notes/asset_extraction_methodology.mdβ full pipeline writeup