4

I've been looking into the format of .cas files for Tandy Color Computer and Dragon32 emulators. These files are almost exactly byte for byte representations of the data/audio/bit pattern of the actual tapes. We have a nice breakdown of that in another question on our site where it is stated that the length of the "leaders" is 128 bytes.

But some other sites on the .cas format, and some books with documentation on the Dragon32's tape format, state that the length of the "leader block" is actually specified by a system variable (or is it a ROM address?) at location $90/$91.

Dragon 32 Information for Machine Code Users!

Dragon 32 Information for Machine Code Users!

The Dragon 32 Dragon Companion

second source

I PEEKed these addresses on a CoCo emulator and they didn't match at all.

So is this a difference between the Dragon and the CoCo? On the CoCo is it hard-coded to be 128 bytes, or is there a memory address to read to get the value that just differs to the address the Dragon uses?

The few .cas files I have are CoCo ones and have use 128 as the length so it's probably safe to use in my code, but I'd still like to satisfy my curiosity.

  • Oops I left some search highlighting on in my screengrabs. Didn't notice that (-: – hippietrail Jun 6 at 4:53
2

I've made a couple of discoveries after a night's sleep.

The CoCo still reads the leader length from a RAM address, but its address is two bytes higher in memory than in the Dragon 32:

0199 ** THESE BYTES ARE MOVED DOWN FROM ROM
0200 *** INIT DESCRIPTION
0201 * VALUE
0202 008F CMPMID RMB 1 18 *PV 1200/2400 HERTZ PARTITION
0203 0090 CMP0 RMB 1 24 *PV UPPER LIMIT OF 1200 HERTZ PERIOD
0204 0091 CMP1 RMB 1 10 *PV UPPER LIMIT OF 2400 HERTZ PERIOD
0205 0092 SYNCLN RMB 2 128 *PV NUMBER OF $55'S TO CASSETTE LEADER
0206 0094 BLKCNT RMB 1 11 *PV CURSOR BLINK DELAY
0207 0095 LPTBTD RMB 2 88 *PV BAUD RATE CONSTANT (600)

The other discovery is that the Dragon 32 and Dragon 64 used different leader lengths. 128 bytes on the Dragon 32 and 256 bytes on the Dragon 64:

$0090:0091  Cassette leader byte count - number of 0x55 bytes written
      as sync leader (D32 - 0x0080, D64 - 0x0100)

As for the .cas tape image format, I've found quite some variance. Some might be due to ROM quirks, others due to quirks, speed-ups, or bugs in Emulator code or retrocomputing format conversion tool code. And some seem to be due to copy protection tricks. Leaders of length 128 and 256 are common and are often a byte short or a byte long. Lengths of 14 bytes and 1 byte are also common, perhaps for speeding up loading on emulators. There's more leader length variation in Dragon .cas files than CoCo ones and I guess it's because the CoCo retro scene is more focused on disks whereas the Dragon retro scene is more focused on playing nostalgic games from 30 years ago, which came on cassette.

| improve this answer | |

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.