CGA Video player source code

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

CGA Video player source code

Post by Kyodai » Wed Mar 14, 2018 2:08 pm

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.

http://www.tankraider.com/userup/1521063248.zip


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

https://www.youtube.com/watch?v=7cFeUQcIjyA

Post Reply