Example #1
0
        private void WriteDataBlocks(DragonFile file)
        {
            int  blocks     = (file.Length + 254) / 255;            // number of data blocks to write
            int  offset     = 0;
            bool firstblock = true;                                 // make sure to create a long leader for the first data block

            for (int i = 0; i < blocks; i++)
            {
                var block = new DragonTapeDataBlock(file.GetData(), offset, Math.Min(255, file.Length - offset));
                block.WriteBlock(Tape, !(firstblock || file.IsGapped));
                offset    += 255;
                firstblock = false;
            }
        }
Example #2
0
        private void WriteEndOfFileBlock(DragonFile file)
        {
            var block = new DragonTapeEofBlock();

            block.WriteBlock(Tape, !file.IsGapped);
        }
Example #3
0
        private void WriteHeaderBlock(DragonFile file)
        {
            var block = new DragonTapeHeaderBlock(file.Name, file.FileType, file.IsAscii, file.IsGapped, file.LoadAddress, file.StartAddress);

            block.WriteBlock(Tape, false);
        }
Example #4
0
 private void WriteHeaderBlock(DragonFile file)
 {
     var block = new DragonTapeHeaderBlock(file.Name, file.FileType, file.IsAscii, file.IsGapped, file.LoadAddress, file.StartAddress);
     block.WriteBlock(Tape, false);
 }
Example #5
0
 private void WriteEndOfFileBlock(DragonFile file)
 {
     var block = new DragonTapeEofBlock();
     block.WriteBlock(Tape, !file.IsGapped);
 }
Example #6
0
 private void WriteDataBlocks(DragonFile file)
 {
     int blocks = (file.Length + 254)/255;                   // number of data blocks to write
     int offset = 0;
     bool firstblock = true;                                 // make sure to create a long leader for the first data block
     for (int i = 0; i < blocks; i++ )
     {
         var block = new DragonTapeDataBlock(file.GetData(), offset, Math.Min(255, file.Length - offset));
         block.WriteBlock(Tape, !(firstblock || file.IsGapped));
         offset += 255;
         firstblock = false;
     }
 }