[Coco] (Simple?) Binary File Compression

Robert Gault robert.gault at worldnet.att.net
Tue Feb 12 15:41:25 EST 2008


CoCo Mongrel wrote:
> Hi Folks,
> 
> I'm working on a freeware game for the CoCo 3.  I'm doing it mostly in
> Urbane BASIC.  The game will have some graphics that will be loaded from
> floppy at various times during play.  The pictures used during most of the
> game will be 320x150x16, (to make room for the UI) but there will also be
> higher quality, full-screen versions of the same images using the
> palette-switching 64-color mode from Sockmaster's Hi-color program that can
> be viewed at the player's option, as an intermission from gameplay.
> 
> I want to mildly compress the images on disk, both to squeeze more pictures
> on a floppy (image) and also to deter casual peeking that would spoil the
> game.  Any ideas for something that is fairly easily implemented from a
> BASIC program (a short ML routine is fine, especially if it is small enough
> that it can be squeezed into some seldom-used cranny of memory, like BASIC's
> cassette buffer, or something.)
 ><snip>

Writing a compression program is not that difficult. The problem is what 
type of compression scheme would be of any practical use. Presumably you 
want the compression for the Hi-color screens. That is going to be a 
real problem with the memory and speed constraints of the Color computer.

Images worth using with Hi-color won't compress worth a damn with 
anything short of jpeg. That's a major undertaking on the Coco. Gif is 
not likely to be worth the effort nor will run-length encoding.

I'd suggest you look at the source code for Roger's Projector-3 since he 
has made it public. You will see how Roger handle several compression 
schemes.



More information about the Coco mailing list