[Coco] tape format and .cas file problems
Darren A
mechacoco at gmail.com
Wed Nov 19 15:28:20 EST 2008
On 11/19/08, Roger Taylor wrote:
> At 08:38 AM 11/19/2008, you wrote:
>
>>So, could you come up with a client/server system where you CLOADM a
>>small routine at 1MHz from the host PC which auto-executes, patches
>>BASIC's cassette routine (assuming CoCo 3 or RAM-able 64K CoCo) for the
>>faster protocol, and optionally switches the computer to 2MHz? Then
>>subsequent loads would zip.
>
>
> Probably overkill. Also, CLOADM only supports one start address as
> far as I recall. This means the entire ML program has to be
> contiguous, unlike the multi-record LOADM format which can jump all
> around RAM doing what it wants.
>
> I remember back in the 80's seeing Rainbow magazine ads selling CoCo
> tricks like "Auto executing tape programs" but I could be wrong. I'd
> like to know how a lowly 16k or even 4k CoCo 1 could do this just by
> typing CLOADM. I don't see anything in the tape format that allows
> for such a trick.
>
Roger,
Color Basic does not support muti-segment CLOADM files, but Extended
Basic does add that capability. These multi-segment files must have
the Gap Flag byte in the Name block set to "use gaps" instead of
"contiguous" because the multi-segment loader calls CONSOLE IN to read
one byte at a time from the file (like a data file). The downside of
this is that it takes much longer to read the file since there is an
additional 0.5 seconds of silence and a series of sync bytes between
every 255 bytes of data.
One trick I've seen is to use this muti-segment format to load a few
non-contiguous blocks at the beginning, including a segment that
patches the RAM vector for the error handler and a final segment that
loads a byte at address $FFFF. Since $FFFF can't be modified, that
triggers an IO error which ends up calling the patched RAM vector
which jumps to the CLOADM command again to load a normal (contiguous)
file which immediately follows. This requires that no End-Of-File
block be present for the first (multi-segment) file.
By the way, I too have written a utility to convert CAS files to audio
and vise-versa. However, mine currently works on Mac OS only and uses
the AIFF audio file format (which is very similar to WAV).
Darren
More information about the Coco
mailing list