Difference between revisions of "Amazing Spider-Man BIN"
(Add to Formats missing in FFmpeg category.)
|Line 44:||Line 44:|
Latest revision as of 05:22, 13 November 2007
- Extension: bin
- Company: Sega
- Samples: http://samples.mplayerhq.hu/game-formats/spiderman-segacd-bin/
All multi-byte numbers are big endian.
It is a chunked FourCC format with the following chunk structure:
bytes 0-3 chunk type bytes 4-7 chunk length (including this 8-byte preamble) bytes 8.. chunk payload
Chunk types include:
The CONF chunk is probably a configuration header. It has a length of 0x28 bytes but the payload always seems to be 0.
It appears that there are 5 separate chunks involved in the video coding scheme which likely map onto the Sega CD video hardware.
- IVRA: This is most likely a tile map encoded in the format that the Sega CD video hardware expects. If this is true then it acts as the codebook in a vector quantization-type compression scheme. Chunks of this type have variable lengths so the encoding could indicate that only certain tiles are replaced in a frame.
- SYNC: This chunk has an empty payload. It occurs between the IVRA chunk and the VRAM chunk, or between the AUDI chunk and the VRAM chunk if the IVRA chunk is not present.
- VRAM: This chunk likely defines how the screen is to be tiled. It is variable length so there are probably provisions for either skipping unchanged tiles, or there is an RLE scheme.
- CRAM: Color RAM-- this chunk stores the palette used for a particular video frame. This appears to always have a payload of 128 bytes consisting of 64 16-bit RGB color definitions. The Sega Genesis has a 512-color palette. The Sega CD might have expanded color capabilities. But it is unlikely that all 16 bits are used.
- CEND: This chunk marks the end of a video frame.
The AUDI chunk contains audio samples encoded as 8-bit sign/magnitude PCM samples as is typical on Sega CD titles. Each chunk appears to contain 2234 payload bytes. At 10 frames per second, this would equal 22340 samples per second, which is pretty close to the common sample rate of 22050 Hz.