Originally Posted by robcfg
The CAS file for Dragon/CoCo is just a bit dump, nothing else.

I proposed an extension to the format to the author of the XRoar emulator that consist on some data appended at the end of the CAS file (named CUE extension), so it's transparent for machines and emulator and allow for some better reconstruction of the wave.

So, the CAS format is dead simple.

If the CAS format is "dead simple", then why did you need to submit anything to better reconstruct the wave?

It is correct to say that it is a "bit dump", in that it is a bit dump of the logical file, but it does not directly translate to a waveform. I know this from experience.

As food for thought, I present to the reader a sample from the XRoar source code, specifically tape.c. The fact that any so-called "tape rewriting" is necessary at all is why CAS is a problematic file format.
Code
// Tape rewriting intercepts the returns from various ROM calls to interpret
// the loading state - whether a leader is expected, etc.

static struct machine_bp bp_list_rewrite[] = {
	BP_DRAGON_ROM(.address = 0xb94d, .handler = DELEGATE_INIT(rewrite_sync, NULL) ),
	BP_COCO_ROM(.address = 0xa719, .handler = DELEGATE_INIT(rewrite_sync, NULL) ),
	BP_COCO3_ROM(.address = 0xa719, .handler = DELEGATE_INIT(rewrite_sync, NULL) ),
	BP_DRAGON_ROM(.address = 0xbdac, .handler = DELEGATE_INIT(rewrite_bitin, NULL) ),
	BP_COCO_ROM(.address = 0xa75c, .handler = DELEGATE_INIT(rewrite_bitin, NULL) ),
	BP_COCO3_ROM(.address = 0xa75c, .handler = DELEGATE_INIT(rewrite_bitin, NULL) ),
	BP_DRAGON_ROM(.address = 0xbdeb, .handler = DELEGATE_INIT(rewrite_tape_on, NULL) ),
	BP_COCO_ROM(.address = 0xa780, .handler = DELEGATE_INIT(rewrite_tape_on, NULL) ),
	BP_COCO3_ROM(.address = 0xa780, .handler = DELEGATE_INIT(rewrite_tape_on, NULL) ),
	BP_DRAGON_ROM(.address = 0xb97e, .handler = DELEGATE_INIT(rewrite_end_of_block, NULL) ),
	BP_COCO_ROM(.address = 0xa746, .handler = DELEGATE_INIT(rewrite_end_of_block, NULL) ),
	BP_COCO3_ROM(.address = 0xa746, .handler = DELEGATE_INIT(rewrite_end_of_block, NULL) ),
};

Last edited by Bletch; 11/16/21 05:39 PM.