OBJ file: Difference between revisions

From NeoGeo Development Wiki
Jump to navigation Jump to search
m (1 revision: Import from wikkii)
No edit summary
Line 1: Line 1:
OBJ files are treated like [[SPR file]]s (at least by emulators).
OBJ files contain the [[sprites]] graphics (equivalent to the [[C ROM]]s on [[:Category:cartridge systems|cartridge systems]]). Data is compressed however using a simple RLE compression removing runs with a value of 0x00000000. Once decompressed the format is described here: [[sprite graphics format]].
 
RLE compression.
 
* First long word value is the compressed file length (/4-1).
* The system works by checking single long words at a time.
* When a 0x00000000 value is found it is stored and the next long word value is checked. If a non value value is found a fill of 0x000000 is created to match the value read.
 
Example.
 
compressed:
 
0x00000007, 0x11111111, 0x00000000, 0x00000003, 0x22222222, 0x00000000, 0x00000000, 0x33333333, 0x44444444
 
decompressed:
 
0x11111111, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x22222222, 0x00000000, 0x33333333, 0x44444444


[[Category:CD systems]]
[[Category:CD systems]]

Revision as of 10:28, 8 December 2013

OBJ files contain the sprites graphics (equivalent to the C ROMs on cartridge systems). Data is compressed however using a simple RLE compression removing runs with a value of 0x00000000. Once decompressed the format is described here: sprite graphics format.

RLE compression.

  • First long word value is the compressed file length (/4-1).
  • The system works by checking single long words at a time.
  • When a 0x00000000 value is found it is stored and the next long word value is checked. If a non value value is found a fill of 0x000000 is created to match the value read.

Example.

compressed:

0x00000007, 0x11111111, 0x00000000, 0x00000003, 0x22222222, 0x00000000, 0x00000000, 0x33333333, 0x44444444

decompressed:

0x11111111, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x22222222, 0x00000000, 0x33333333, 0x44444444