CGA Video player source code

Everything about vintage DOS based Palmtops goes in here...
Post Reply
Site Admin
Posts: 235
Joined: Fri May 15, 2015 7:33 pm

CGA Video player source code

Post by Kyodai »

Well this one looks quite impressive on a DOS palmtop - full screen video. Back in the mid 90s even the "big" CD-ROM games usually only had a small video somewhere in the center of the screen as even 486 were fighting hard to get the video to play smoothly. So what's the trick to play back full screen video at 30 fps on an 8086 with 640KB RAM?

The trick here: Uncompressed frames, no sound, no colors. A whole 640x200 1-Bit (Black&White, no greyscale) frame would be exactly 128,000 pixel. That is exactly 16,000 Bytes - or 16KB (Roughly... 1024...Cough). So each frame is in reality a 16KB Picture (BSAV format) file. So the 43 frames test animation is a whooping 671 KB.

So before you drool and convert a movie - keep in mind 1 second takes somewhere around 500KB disc space @ 30 fps. Also converting every single frame with PC PAINT 3.1 manually is not much fun. So for a few seconds of animation maybe OK.

On some palmtops it runs a bit too fast - so the command line argument accepts a number - the higher the number the more computations it does before each frame, slightly slowing down the output. So "VIDTEST.EXE 0" would run this at maximum speed while "VIDTEST.EXE 50000" runs it significantly slower. It runs way too fast in DOSBOX, so preferably run it on real hardware.

Anyways - here is the source code in "Visual Basic for MS-DOS" format.

And here's a Youtube video to see it in action:

Post Reply