CEL (Cell Data)
Table of VRAM pointers to the cells that make up a BG surface.
| Extension | .CEL |
|---|---|
| ID | 0x22 |
| Version | 0x03 |
This is an old revision of this page, as edited by RemmyLee at 02:47, 23 October 2026. Edit this revision | Latest revision
Overview
The CEL format gives the table of VRAM pointers to the cells that make up the BG surface. A BGD map arranges these cells by their numbers. A CEL file has a header at the top and is divided into three blocks: HEADER, CELL and ATTR.12
HEADER
The file header is two words. CELL-H and CELL-W are used locally in the sprite editor.1
| Word | Bits | Field | Contents |
|---|---|---|---|
| 0 | 0..7 | ID | 0x22 |
| 0 | 8..15 | VERSION | 0x03 |
| 0 | 16..31 | FLAG | ATT and ATL |
| 1 | 0..15 | NCELL | Number of cell data items (in cells) |
| 1 | 16..23 | CELL-W | Width of the cell display window (in cells) |
| 1 | 24..31 | CELL-H | Height of the cell display window (in cells) |
The ATT bit of FLAG shows whether the file includes an ATTR block (0 not included, 1 included). The ATL bit gives the length of the ATTR data (0 8-bit, 1 16-bit).1
CELL
Cell data is the table of VRAM pointers to the cells of the BG. The text gives four bytes for one cell. However, Figure 186 shows two words for each cell:3
| Word | Bits | Field | Contents |
|---|---|---|---|
| 0 | 0..7 | u | Horizontal offset from the base address of the texture page (8 bits) |
| 0 | 8..15 | v | Vertical offset from the base address of the texture page (8 bits) |
| 0 | 16..31 | CBA | CLUT position |
| 1 | 0..15 | FLAG | Reversal information |
| 1 | 16..31 | TSB | Texture page information |
CBA holds CLY and CLX, which are the 9-bit Y coordinate and the 6-bit X coordinate of the start of the CLUT. From version 3 on it also holds ABE, which turns semi-transparency processing on.3
TSB holds TPF, ABR and TPN. From version 3 on it also holds BNO and CSN, which are the TIM bank number and the color set number of the sprite editor:4
| Field | Contents |
|---|---|
| TPF | Pixel depth of the texture pattern: 00 4-bit CLUT, 01 8-bit CLUT, 10 16-bit direct |
| ABR | Translucence rate (F foreground, B background): 00 0.50xF + 0.50xB, 01 1.00xF + 1.00xB, 10 -1.00xF + 1.00xB, 11 0.25xF + 1.00xB |
| TPN | Texture page number |
| BNO | TIM bank number (version 3 on) |
| CSN | Color set number (version 3 on) |
Files of earlier versions find the bank another way. In version 0 the banks 0 to 3 are TPN 12, 28, 8 and 24. In versions 1 and 2 the bank comes from the CBA coordinates in the same way as in ANM.45
The FLAG of a cell holds HLP and VLP, which are the horizontal and vertical reversal information.6
ATTR
Attribute data is additional information about each cell, and it is arranged in the same order as the cells. The ATL bit in the header gives its length of 8 bits or 16 bits.6
References
-
^ a b c Sony Computer Entertainment Inc. File Formats. November 1998. Page 3-23, Figures 183 to 185.
-
^ Sony Computer Entertainment Inc. File Formats. November 1998. Page 3-28.
-
^ a b Sony Computer Entertainment Inc. File Formats. November 1998. Page 3-24, Figures 186 and 187.
-
^ a b Sony Computer Entertainment Inc. File Formats. November 1998. Page 3-25, Figure 188.
-
^ Sony Computer Entertainment Inc. File Formats. November 1998. Page 3-20.
-
^ a b Sony Computer Entertainment Inc. File Formats. November 1998. Page 3-26, Figures 189 to 191.