3

For the Dragon 32 and the TRS-80 Color Computer I've found two documents describing how loading from cassette tape works:Dragon 32 doc, CoCo doc.

They both say that a standard program consists of a leader, a "name block", a second leader, many data blocks, and an end block.

The three kinds of blocks all have a length. So you keep loading the next block until you get to the end block.

The "name block" contains both the load address and the execution address for machine code files.

But some .cas tape image files, which are just byte-for-byte the data that the audio modulations represent, actually put blocks in other places, presumably for copy protection. For false end blocks near the beginning or missing end blocks it's easy to guess what to do.

But when there are multiple "name blocks" it is not clear. Of course I can reset the load address that's in each name block and load all subsequent data there until the next name block changes it. But each name block also has a "default EXEC address" or "machine code starting address".

When that happens, do the latter entry addresses just overwrite the previous ways, which presumably have some decoy code to throw a red herring to crackers back in the day? Or does each code block get executed? Or maybe even the first one is the real one and the latter ones are decoys?

I can't find this behaviour documented but perhaps some of the emulators load .cas files directly without fully emulating the audio system, or some file conversion tools dealt with it? The two emulators that I have both do seem to use the audio system though, even when you select a .cas file from the menu rather than from the native BASIC OS.

I did find this commented ROM disassembly and I'm trying to figure out what it does, but I haven't been able to understand it well enough. The machine code tape loading code is at A4FE and labelled CLOADM, the name of the BASIC command for loading a machine code program.

1

Since the coco cassette interface used 1200 baud psk audio encoding in it, the tape format of the coco was 4X faster loading files from the tape and the tape files were 1/4th the size of similar files on atari and commodore systems, which used 300 baud afsk encoding.

it became common to stack multiple files on a single tape. many magazines sold software collections on stacked tapes an some added a program that would provide a list of files of the tape and use the SKIPF command find file.

You probably have an audio image of one of these tapes.

| improve this answer | |
  • I might do, but I haven't done any work with audio format tape images. I might at some point but for now I've only been looking at the digital image formats, which are a lot easier from a programming perspective. – hippietrail Jul 5 at 3:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.