[Coco] tape format

Roger Taylor operator at coco3.com
Wed Nov 19 20:06:44 EST 2008


Darren,

Take a look at this and then CLOADM the .wav file at this URL:
www.coco3.com/test.wav

For some reason the first segment has a byte missing, a * character 
on the last line.  The character is definately in the string.
The second segment loads the whole line.  The same code is used to 
create the blocks.


procedure MakeTestBinary;
begin MakeTestBinary;

         SineOuts($55, 128);     // block leader

         // create FILENAME block data
         NewBlock();
         SaveStr("FILENAME");
         SaveData($02);  // $00=BASIC  $01=data  $02=binary/ML
         SaveData($00);  // $00=binary  $ff=ASCII
         SaveData($ff);  // $00=continuous  $ff=gaps
         SaveData($00);  // ML EXEC
         SaveData($00);
         SaveData($00);  // ML LOAD
         SaveData($00);
         // block type  $00=filename  $01=data  $ff=EOF
         StreamBlock(&buffer, $00);      // memory, block type, data 
size, checksum

         InsertSilence(9000); // 12000 hz/9000 = 3/4 second
         SineOuts($55, 128);     // block leader
         NewBlock();
         SaveData($00);
         SaveData($00);
         SaveData(224);
         SaveData(4);
         SaveData(0);
         SaveStr("********************************");
         SaveStr("                                ");
         SaveStr("                                ");
         SaveStr("                                ");
         SaveStr("     IT WORKS!! .. BY GOLLY     ");
         SaveStr("                                ");
         SaveStr("********************************");
         StreamBlock(&buffer, $01);

         InsertSilence(9000); // 12000 hz/9000 = 3/4 second
         SineOuts($55, 128);     // block leader
         NewBlock();
         SaveData($00);
         SaveData($00);
         SaveData(224);
         SaveData(4);
         SaveData(0);
         SaveStr("********************************");
         SaveStr("                                ");
         SaveStr("     BY GOLLY... IT WORKS!!     ");
         SaveStr("                                ");
         SaveStr("                                ");
         SaveStr("                                ");
         SaveStr("********************************");
         StreamBlock(&buffer, $01);

         // post amble
         InsertSilence(9000);
         SineOuts($55, 128);     // block leader
         NewBlock();
         SaveData($ff);
         SaveData($00);
         SaveData($00);
         SaveData($00);
         SaveData($00);
         StreamBlock(&buffer, $01);

         // End of File
         InsertSilence(9000);
         SineOuts($55, 128);     // block leader
         NewBlock();
         StreamBlock(&buffer, $ff);

end MakeTestBinary;



-- 
Roger Taylor

http://www.wordofthedayonline.com



More information about the Coco mailing list