Official Cinepak Sample Code (Currently only SBL)


Established Member
I've been playing with sample code in Sega's official Cinepak libraries and I figured as I get them compiling, running, and the comments roughly translated with DeepL I'd share the examples here. This way if people want to incorporate FMV into their projects they have some examples to work with. Currently I've only played with the SBL samples, but there are SGL samples as well included in the official Movie Tools disc. For encoding Cinepak Files please see the guide I made.

The first one here is the Cinepak Demo 6. This one is probably the easiest to understand and work with. It plays a 24-bit RGB video on VDP2 with PCM audio playback. The program will auto-adjust to account for different resolutions, frame rates, and audio settings. This program doesn't use the more complicated Stream Library and just plays an individual file from the data track. However it doesn't load it into RAM but instead plays it off the disc. So you're not limited to whatever can fit into RAM.

In order to use it with SBL, you'll need to do the following:
  1. Unzip the file.
  2. Copy the contained CINEPAK folder into your SBL directory.
  3. Update your Make files and linker scripts to include the cinepak library in your build (Look at the included Makefile, SAMPLE.CFG, and SMPSLC1.SHC files for what to do.)
  4. You will need to use the official sound driver and the BOOTSND.MAP file. The correct versions are included in the cd directory of the demo along with a sample Cinepak File and the compiled 0.bin file.
For step 3 I am not really a master of C Make files or Project setups so some of that may or may not be required, but it's what I did to get it to build.

It may be possible to get this working with other sound drivers and with out the BOOTSND.MAP file, with significant modifications of the source code. I just don't know enough about SBL to know what would need swapped out.

I have also included a built ISO for an example of what the compiled code does.


  • SBL Cinepak Demo
    46.1 MB · Views: 33


Established Member
One bit I forgot to mention in the previous demo. It is set to only use the Master CPU and the Slave CPU is disabled. If you want to use the 2nd CPU you can uncomment this line of code:

/* Define this when you want the Cinepac library to use a slave CPU. */
/* #define DUAL_CPU */