NCER (NITRO-System Cell for Runtime) files store OBJ cell data for the 2D engine. It follows the NNS G2D Binary File Format. NCER files use file signature 'NCER'.

CEBK Block#

The CEBK (Cell Bank) block defines the set of cells in this file. The structure is as follows:

OffsetTypeMeaning
0x00 u16 Number of cells
0x02 u16 Bank attributes. If the cell bank stores bounding rectangle info for each cell, this will be 1. Otherwise, this will be 0.
0x04 void * Pointer to cell data. This is relative to the start of this structure and fixed up at load time.
0x08 u32 Mapping mode. This can be 1D 32K (0), 1D 64K (1), 1D 128K (2), or 1D 256K (3), or 2D (4).
0x0C void * VRAM transfer data pointer relative to the start of this structure. and fixed up at load time. If VRAM transfer characters are not used, this will be NULL.
0x10 void * Pointer to string bank (fixed up at load time). This can be NULL.
0x14 void * Pointer to extra cell data (fixed up at load time). This can be NULL.

The cell data in the cell bank is structured as:

OffsetTypeMeaning
0x00 u16 Number of OAM attributes in this cell.
0x02 u16 Cell attributes.
0x04 void * Pointer to OAM attribute data relative to the start of the OAM data. The OAM data starts immediately after the cell array.
0x08 s16 *Max X
0x0A s16 *Max Y
0x0C s16 *Min X
0x0E s16 *Min Y

Here * denotes fields only present when bounding rectangle is specified in the CEBK structure. This alters the size of the cell data, and needs to be taken into account when calculating the offset to OAM data.

Some cell files use VRAM transfer characters for animation. This involves transferring graphics to VRAM on the fly. This allows all graphics not to be loaded into VRAM at a time. For these kinds of animation, the VRAM transfer data pointer will be non-NULL. The structure of the data this points to is:

OffsetTypeMeaning
0x00 u32 Maximum VRAM transfer size
0x04 void * Pointer to VRAM transfer entries relative to the start of the CEBK block. There will be one entry for each cell in the bank.

Each VRAM transfer entry takes this structure:

OffsetTypeMeaning
0x00 u32 Transfer source address
0x04 u32 Transfer Size

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-1) was last changed on 01-May-2024 20:02 by Garhoogin