Back when I was decoded Cinepak for Sega CD, I made this spreadsheet of all the Cinepak movies I decoded which include their resolution among many other characteristics (many of them require understanding the cinepak format but there are things like palettes used, frames per second, compression ratio that are useful):
https://www.dropbox.com/s/x8m8yb1ai6...files.xls?dl=0
That is absolutely amazing bgvanbur! have you got the codec working out of interest?
Here is the Cinepak source along with a PDF that details how the codec works, summary of how it is used at a high level and brief overview of a few games usage. It also includes the source the most widely used version of cinepak for sega cd (since it went under several revisions).
https://www.romhacking.net/documents/740/
I have posted links to various sample Cinepak for Sega CD examples but they are out of date since dropbox changed it URLs for sharing files. So here is an example with all the source I used to build it (I built it with my SCDTools) featuring Nyan Cat.
https://www.dropbox.com/s/wid6ts4cls...ATSRC.ZIP?dl=0
If this worked with C and the Megadrive alone I'd use it in the blink of an eye. I'll have a look at your examples and see if they make sense to me.
The Sherlock Holmes: Consulting Detective games use some tricks to get up to 32 colors per tile, but in a limited way.
The game displays video using three palettes, three layers, and highlight/shadow mode. A full 4-bpp frame goes on Plane B, and then an identical frame (with the bottom 4 lines of each tile made transparent) goes on top of it on Plane A. This allows for two palettes to be used on a single 8x8 block. The layers are displayed in shadow mode. On top of that goes a layer of 1bpp sprites in highlight mode to brighten up certain areas of the image. The max number of colors seems to be around 52 using this method, so it allows for more than what's available in the 3 palettes.
As for the actual data, you've got 1024 bytes of 8-bit unsigned audio @15360Hz, then 6144 bytes of uncompressed 4bpp pattern data shared by Layers A and B, 1536 bytes of 1bpp pattern data for the sprite layer, 48 bytes of 2-bit palette map data for Layer B, 48 bytes of 2-bit palette map data for Layer A, and then 96 bytes of palette data in standard 16-bit 0BGR format. A total of 8896 bytes/frame. At 15 fps, that's 133,440 bytes/sec, which is near the maximum bandwidth of a single-speed CD-ROM drive.
The Digital Pictures games use a lot of interesting tricks, too. If you're interested to see how they work, you can check out the source code for my program SCAT. It can convert any video from any Digital Pictures game on any platform, as far as I know.
Media in DP games are stored in chunks spread out across multiple sectors, and in lots of cases (notably Sewer Shark, Prize Fighter, and Supreme Warrior), there are multiple streams going on at once. Here's a list of the different types of chunks (when I started writing the program, I only had info on chunk types $A1 and $C1. :-)):
The games that use type $C2 probably have the best looking video of the 16-bit ports, but the codec is also really complicated. It uses a combination of macroblock encoding, self-modifying code, and the Sega CD's built-in pattern generator feature to decode tile data. Basically, you write some pattern and color data to a specific address in memory, and then the Sega CD spits out a tile at another address. It took me a while to reverse-engineer it, and I had to learn Motorola 68000 assembly to do it. :-)Code:Video81 = &H81 'Macroblock encoded indexed 8bpp video (All 32-bit Digital Pictures ports) [!] Video82 = &H82 'Macroblock encoded indexed 8bpp video (extensionless files in DOS and Mac ports) [?!] 'NOTE: These chunks actually have no type code -- it was added by me FileHeader85 = &H85 'Appears at beginning of extensionless files in DOS and Mac ports [?!] Video8A = &H8A 'Macroblock encoded indexed 8bpp video (Night Trap DOS .AVC files) [?!] Tileset99 = &H99 'LZ-compressed 15 bpp tile set with 8192-byte window size and base 1 copy count (Saturn ports) [!] AudioA1 = &HA1 '8-bit sign/magnitude PCM [!] AudioA2 = &HA2 '8-bit sign/magnitude PCM (3DO and Saturn ports) [!] AudioA3 = &HA3 '8-bit unsigned PCM (extensionless files in DOS and Mac ports) [!] AudioAA = &HAA '8-bit sign/magnitude PCM (Night Trap DOS .AVC files) [?!] VideoC1 = &HC1 'Raw (Night Trap SCD, Sewer Shark, Corpse Killer SCD) [!] VideoC2 = &HC2 'Pattern generator encoded (Corpse Killer SCD, Slam City, Supreme Warrior, Kids on Site) [!?] VideoC4 = &HC4 'Interframe version of C2 (Slam City) [!?] VideoC6 = &HC6 'LZ compressed version of C1 with 8192-byte window size and base 0 copy count (Night Trap SCD, Sewer Shark, Make My Video) [!] VideoC7 = &HC7 'Same as C6 but with base 1 copy count (Prize Fighter) [!] VideoC8 = &HC8 'Same as C6 but with pixels swapped on even lines for better compression (Sewer Shark, Make My Video) [!] VideoC9 = &HC9 'Same as C8 but with base 1 copy count (Double Switch) [!] VideoCB = &HCB 'Same as C6 but with 4096-byte window size and base 1 copy count (Prize Fighter, Double Switch "DPLOGO", Corpse Killer 32X) [!] VideoCD = &HCD 'Same as C8 but with 4096-byte window size and base 1 copy count (Double Switch) [!] VideoD1 = &HD1 'Raw with encoded tile map, and no palette data, used for enemy death animations (Sewer Shark) [!] VideoD2 = &HD2 'Same as D1 but with palette data (Slam City, Supreme Warrior) [!] VideoD3 = &HD3 'Raw animation frame with palette and pixel offset data (Corpse Killer SCD / 32X, Slam City) [!] VideoD4 = &HD4 'LZ compressed version of D3 with 4096-byte window size and base 1 copy count (Corpse Killer SCD / 32X, Slam City) [!] VideoD5 = &HD5 'LZ compressed version of D2 with 4096-byte window size and base 1 copy count (Supreme Warrior) [!] VideoD7 = &HD7 'Macroblock encoded version of D3 (Corpse Killer Saturn) [!] VideoE7 = &HE7 'Raw/LZ Compressed tri-frame with 4096-byte window size and base 1 copy count (Make My Video series "*BIG.SGA" files) [!] VideoE8 = &HE8 'Special compressed keyframe (Ground Zero Texas) [!] VideoE9 = &HE9 'Special compressed interframe (Ground Zero Texas) [!] HeaderF0 = &HF0 'Sequence header (Slam City) [!?] ContainerF1 = &HF1 'Container for other chunks (Slam City, Supreme Warrior) [!] HeaderF2 = &HF2 'Video chunks (Slam City, and in other games as *.F2 files) [?] 'HeaderF2 = &HF2 'Header for multi-part chunks of type $99 (Saturn ports) [!] ContainerF3 = &HF3 'Container for multi-part $99 chunks in Saturn ports [!] ContainerF9 = &HF9 'Container for $8A and $AA chunks in (Night Trap DOS .AVC files) [?!] FooterFF = &HFF 'Appears after last chunk in a clip (Supreme Warrior, others) [!]
Hope this info helps.
That is one massive brain dump! Intrigued by the suggestions you're making about the codec! I've turned on and off layers / sprites and seen no noticeable differences in the Sherlock games.
Will need to have a real nose now!
What codec does Adv Of Batman on the Mega CD use? That's IMO the best quality FMV on the Mega CD along with EA intro to Fifa on the Mega CD
Panzer Dragoon Zwei is
one of the best 3D shooting games available
Presented for your pleasure
There are currently 1 users browsing this thread. (0 members and 1 guests)