[Coco] (Simple?) Binary File Compression

CoCo Mongrel cocomongrel at googlemail.com
Tue Feb 12 13:16:13 EST 2008


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.)

The goal is to make the game run in 128K, but take advantage of more memory
if it is present by caching pictures or parts of pictures (as 8K blocks) in
RAM.  The game will have a separate set=up program which will allow the user
to patch DECB for 40 tracks and 2 sides if the hardware supports it and the
DOS isn't already patched.  It should also write out some config files to
tell the main program where to look for graphics.  I think I can just fit
everything on two sides of a 40-track floppy, but a little compression would
make it more comfortable.

Any ideas?

CoCo Mongrel



More information about the Coco mailing list