First off, many places that talk about Cinepak for Sega and it seems like they make up things with little or no evidence. Cinepak uses 16276 Hz 8-bit PCM (this is fixed) but the code thinks it is 16000 Hz (so it plays faster than the code expects). It has a max of 61 unique colors in one frame since it only uses one plane with the possibility of 1 to 4 palettes. It is not 128 or 256 colors as many places suggest (including Sega Mega CD - Sega Retro). It is double buffered in both the Word RAM and the VDP RAM (so when seeing if a tile has changed, you need to check if was the same from two frames ago, and do not check it against the last frame). There is no necessity for ordered dithering to be used, but it is typically used since ordered dithering typically produces smaller frame data due to the way 4x2 or 2x2 pixel blocks are encoded and reused (and better compression means you can have a larger picture or faster frame rate). When two palettes are used, the palette map uses two bits to encode each palette for a tile. And many places claim a movie is or is not Cinepak For Sega and are wrong.
I have been working on disassemblies of both the MAIN and SUB CPU code, a detailed list of Cinepak games and notes about each one, a Cinepak encoder, and a Cinepak decoder. The MAIN code went through a couple of revisions but not much changed between revisions. The SUB code went through several revisions and had much larger changes (which makes sense since it was more complex than the MAIN code). I plan to release all of these as they get more refined and finalized.
For now, I am excited to provide my Nyan Cat Cinepak Demo (it uses unmodified Cinepak revision 1.2 with some small startup MAIN/SUB code to start the movie). I was real happy when this finally worked in Gens (and worked first try on hardware last night).
Collection of files released in this thread:
Nyan Cat Cinepak Demo ISO
Bad Apple Cinepak Demo ISO and source
Glenn Miller In The Mood Cinepak Demo ISO and source
Nyan Cat Cinepak Demo ISO and source
Star Wars Chess Reencoded Cinepak Demo ISO and source
Cinepak 68k Disassemblies
Cinepak Movie Reseach (ods)
Cinepak Movie Research (xls)


00
