2016-07-28 18:13:49 +01:00
// /***************************************************************************
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : TeleDisk.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : Disc image plugins.
//
// --[ Description ] ----------------------------------------------------------
//
// Manages Sydex TeleDisk disk images.
//
// --[ License ] --------------------------------------------------------------
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
2017-05-19 20:28:49 +01:00
// Copyright © 2011-2017 Natalia Portillo
2016-07-28 18:13:49 +01:00
// ****************************************************************************/
2014-04-19 21:21:08 +01:00
using System ;
using System.IO ;
using System.Collections.Generic ;
2015-10-18 22:04:03 +01:00
using DiscImageChef.Console ;
2015-11-23 21:44:58 +00:00
using DiscImageChef.CommonTypes ;
2016-09-05 17:37:31 +01:00
using DiscImageChef.Filters ;
2015-10-18 22:04:03 +01:00
2014-06-15 23:39:34 +01:00
namespace DiscImageChef.ImagePlugins
2014-04-19 21:21:08 +01:00
{
2016-07-28 22:25:26 +01:00
// Created following notes from Dave Dunfield
// http://www.classiccmp.org/dunfield/img54306/td0notes.txt
2017-07-01 02:49:09 +01:00
public class TeleDisk : ImagePlugin
2014-04-19 21:21:08 +01:00
{
#region Internal Structures
2014-08-25 05:00:25 +01:00
2014-04-19 21:21:08 +01:00
struct TD0Header
{
2015-12-06 07:37:20 +00:00
/// <summary>"TD" or "td" depending on compression</summary>
2016-07-28 22:25:26 +01:00
public ushort signature ;
2015-12-06 07:37:20 +00:00
/// <summary>Sequence, but TeleDisk seems to complaing if != 0</summary>
2014-04-19 21:21:08 +01:00
public byte sequence ;
2015-12-06 07:37:20 +00:00
/// <summary>Random, same byte for all disks in the same set</summary>
2014-04-19 21:21:08 +01:00
public byte diskSet ;
2015-12-06 07:37:20 +00:00
/// <summary>TeleDisk version, major in high nibble, minor in low nibble</summary>
2014-04-19 21:21:08 +01:00
public byte version ;
2015-12-06 07:37:20 +00:00
/// <summary>Data rate</summary>
2014-04-19 21:21:08 +01:00
public byte dataRate ;
2015-12-06 07:37:20 +00:00
/// <summary>BIOS drive type</summary>
2014-04-19 21:21:08 +01:00
public byte driveType ;
2015-12-06 07:37:20 +00:00
/// <summary>Stepping used</summary>
2014-04-19 21:21:08 +01:00
public byte stepping ;
2015-12-06 07:37:20 +00:00
/// <summary>If set means image only allocates sectors marked in-use by FAT12</summary>
2014-04-19 21:21:08 +01:00
public byte dosAllocation ;
2015-12-06 07:37:20 +00:00
/// <summary>Sides of disk</summary>
2014-04-19 21:21:08 +01:00
public byte sides ;
2015-12-06 07:37:20 +00:00
/// <summary>CRC of all the previous</summary>
2016-07-28 22:25:26 +01:00
public ushort crc ;
2014-04-19 21:21:08 +01:00
}
struct TDCommentBlockHeader
{
2015-12-06 07:37:20 +00:00
/// <summary>CRC of comment block after crc field</summary>
2016-07-28 22:25:26 +01:00
public ushort crc ;
2015-12-06 07:37:20 +00:00
/// <summary>Length of comment</summary>
2016-07-28 22:25:26 +01:00
public ushort length ;
2014-04-19 21:21:08 +01:00
public byte year ;
public byte month ;
public byte day ;
public byte hour ;
public byte minute ;
public byte second ;
}
struct TDTrackHeader
{
2015-12-06 07:37:20 +00:00
/// <summary>Sectors in the track, 0xFF if end of disk image (there is no spoon)</summary>
2014-04-19 21:21:08 +01:00
public byte sectors ;
2015-12-06 07:37:20 +00:00
/// <summary>Cylinder the head was on</summary>
2014-04-19 21:21:08 +01:00
public byte cylinder ;
2015-12-06 07:37:20 +00:00
/// <summary>Head/side used</summary>
2014-04-19 21:21:08 +01:00
public byte head ;
2015-12-06 07:37:20 +00:00
/// <summary>Lower byte of CRC of previous fields</summary>
2014-04-19 21:21:08 +01:00
public byte crc ;
}
struct TDSectorHeader
{
2015-12-06 07:37:20 +00:00
/// <summary>Cylinder as stored on sector address mark</summary>
2014-04-19 21:21:08 +01:00
public byte cylinder ;
2015-12-06 07:37:20 +00:00
/// <summary>Head as stored on sector address mark</summary>
2014-04-19 21:21:08 +01:00
public byte head ;
2015-12-06 07:37:20 +00:00
/// <summary>Sector number as stored on sector address mark</summary>
2014-04-19 21:21:08 +01:00
public byte sectorNumber ;
2015-12-06 07:37:20 +00:00
/// <summary>Sector size</summary>
2014-04-19 21:21:08 +01:00
public byte sectorSize ;
2015-12-06 07:37:20 +00:00
/// <summary>Sector flags</summary>
2014-04-19 21:21:08 +01:00
public byte flags ;
2015-12-06 07:37:20 +00:00
/// <summary>Lower byte of TeleDisk CRC of sector header, data header and data block</summary>
2014-04-19 21:21:08 +01:00
public byte crc ;
}
struct TDDataHeader
{
2015-12-06 07:37:20 +00:00
/// <summary>Size of all data (encoded) + next field (1)</summary>
2016-07-28 22:25:26 +01:00
public ushort dataSize ;
2015-12-06 07:37:20 +00:00
/// <summary>Encoding used for data block</summary>
2014-04-19 21:21:08 +01:00
public byte dataEncoding ;
}
#endregion
2014-08-25 05:00:25 +01:00
2014-04-19 21:21:08 +01:00
#region Internal Constants
// "TD" as little endian uint.
2016-07-28 22:25:26 +01:00
const ushort tdMagic = 0x4454 ;
2014-04-19 21:21:08 +01:00
// "td" as little endian uint. Means whole file is compressed (aka Advanced Compression)
2016-07-28 22:25:26 +01:00
const ushort tdAdvCompMagic = 0x6474 ;
2014-04-19 21:21:08 +01:00
// DataRates
const byte DataRate250kbps = 0x00 ;
const byte DataRate300kbps = 0x01 ;
const byte DataRate500kbps = 0x02 ;
// TeleDisk drive types
const byte DriveType525HD_DDDisk = 0x00 ;
const byte DriveType525HD = 0x01 ;
const byte DriveType525DD = 0x02 ;
const byte DriveType35DD = 0x03 ;
const byte DriveType35HD = 0x04 ;
const byte DriveType8inch = 0x05 ;
const byte DriveType35ED = 0x06 ;
// Stepping
const byte SteppingSingle = 0x00 ;
const byte SteppingDouble = 0x01 ;
const byte SteppingEvenOnly = 0x02 ;
// If this bit is set, there is a comment block
const byte CommentBlockPresent = 0x80 ;
// CRC polynomial
2016-07-28 22:25:26 +01:00
const ushort TeleDiskCRCPoly = 0xA097 ;
2014-04-19 21:21:08 +01:00
// Sector sizes table
const byte SectorSize128 = 0x00 ;
const byte SectorSize256 = 0x01 ;
const byte SectorSize512 = 0x02 ;
const byte SectorSize1K = 0x03 ;
const byte SectorSize2K = 0x04 ;
const byte SectorSize4K = 0x05 ;
const byte SectorSize8K = 0x06 ;
// Flags
// Address mark repeats inside same track
const byte FlagsSectorDuplicate = 0x01 ;
// Sector gave CRC error on reading
const byte FlagsSectorCRCError = 0x02 ;
// Address mark indicates deleted sector
const byte FlagsSectorDeleted = 0x04 ;
// Sector skipped as FAT said it's unused
const byte FlagsSectorSkipped = 0x10 ;
// There was an address mark, but no data following
const byte FlagsSectorDataless = 0x20 ;
// There was data without address mark
const byte FlagsSectorNoID = 0x40 ;
// Data block encodings
// Data is copied as is
const byte dataBlockCopy = 0x00 ;
// Data is encoded as a pair of len.value uint16s
const byte dataBlockPattern = 0x01 ;
// Data is encoded as RLE
const byte dataBlockRLE = 0x02 ;
#endregion
2014-08-25 05:00:25 +01:00
2014-04-19 21:21:08 +01:00
#region Internal variables
2014-08-25 05:00:25 +01:00
2014-04-21 17:23:35 +01:00
TD0Header header ;
TDCommentBlockHeader commentHeader ;
byte [ ] commentBlock ;
2014-08-25 05:00:25 +01:00
// LBA, data
2016-07-28 22:25:26 +01:00
uint totalDiskSize ;
2014-08-25 05:00:25 +01:00
bool ADiskCRCHasFailed ;
2016-07-28 22:25:26 +01:00
List < ulong > SectorsWhereCRCHasFailed ;
2017-09-27 12:37:03 +01:00
// Cylinder by head, sector data matrix
byte [ ] [ ] [ ] [ ] sectorsData ;
2014-08-25 05:00:25 +01:00
2017-09-27 12:37:03 +01:00
#endregion
2014-08-24 17:46:29 +01:00
2017-09-27 12:37:03 +01:00
public TeleDisk ( )
2014-04-19 21:21:08 +01:00
{
Name = "Sydex TeleDisk" ;
PluginUUID = new Guid ( "0240B7B1-E959-4CDC-B0BD-386D6E467B88" ) ;
2014-08-28 19:29:18 +01:00
ImageInfo = new ImageInfo ( ) ;
ImageInfo . readableSectorTags = new List < SectorTagType > ( ) ;
2016-01-16 03:54:55 +00:00
ImageInfo . readableMediaTags = new List < MediaTagType > ( ) ;
2014-08-28 19:29:18 +01:00
ImageInfo . imageHasPartitions = false ;
ImageInfo . imageHasSessions = false ;
ImageInfo . imageApplication = "Sydex TeleDisk" ;
ImageInfo . imageComments = null ;
ImageInfo . imageCreator = null ;
2016-01-16 03:54:55 +00:00
ImageInfo . mediaManufacturer = null ;
ImageInfo . mediaModel = null ;
ImageInfo . mediaSerialNumber = null ;
ImageInfo . mediaBarcode = null ;
ImageInfo . mediaPartNumber = null ;
ImageInfo . mediaSequence = 0 ;
ImageInfo . lastMediaSequence = 0 ;
2014-08-28 19:29:18 +01:00
ImageInfo . driveManufacturer = null ;
ImageInfo . driveModel = null ;
ImageInfo . driveSerialNumber = null ;
2016-08-18 00:05:24 +01:00
ImageInfo . driveFirmwareRevision = null ;
2014-08-25 05:00:25 +01:00
ADiskCRCHasFailed = false ;
2016-07-28 22:25:26 +01:00
SectorsWhereCRCHasFailed = new List < ulong > ( ) ;
2014-04-19 21:21:08 +01:00
}
2014-04-21 17:23:35 +01:00
2016-09-05 17:37:31 +01:00
public override bool IdentifyImage ( Filter imageFilter )
2014-04-19 21:21:08 +01:00
{
2014-04-21 17:23:35 +01:00
header = new TD0Header ( ) ;
2014-04-19 21:21:08 +01:00
byte [ ] headerBytes = new byte [ 12 ] ;
2016-09-05 17:37:31 +01:00
Stream stream = imageFilter . GetDataForkStream ( ) ;
stream . Seek ( 0 , SeekOrigin . Begin ) ;
2014-04-19 21:21:08 +01:00
stream . Read ( headerBytes , 0 , 12 ) ;
header . signature = BitConverter . ToUInt16 ( headerBytes , 0 ) ;
2016-04-19 02:11:47 +01:00
if ( header . signature ! = tdMagic & & header . signature ! = tdAdvCompMagic )
2014-04-19 21:21:08 +01:00
return false ;
header . sequence = headerBytes [ 2 ] ;
header . diskSet = headerBytes [ 3 ] ;
header . version = headerBytes [ 4 ] ;
header . dataRate = headerBytes [ 5 ] ;
header . driveType = headerBytes [ 6 ] ;
header . stepping = headerBytes [ 7 ] ;
header . dosAllocation = headerBytes [ 8 ] ;
header . sides = headerBytes [ 9 ] ;
header . crc = BitConverter . ToUInt16 ( headerBytes , 10 ) ;
2014-04-21 17:23:35 +01:00
byte [ ] headerBytesForCRC = new byte [ 10 ] ;
Array . Copy ( headerBytes , headerBytesForCRC , 10 ) ;
2016-07-28 22:25:26 +01:00
ushort calculatedHeaderCRC = TeleDiskCRC ( 0x0000 , headerBytesForCRC ) ;
2014-04-21 17:23:35 +01:00
2015-10-18 22:04:03 +01:00
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "header.signature = 0x{0:X4}" , header . signature ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "header.sequence = 0x{0:X2}" , header . sequence ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "header.diskSet = 0x{0:X2}" , header . diskSet ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "header.version = 0x{0:X2}" , header . version ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "header.dataRate = 0x{0:X2}" , header . dataRate ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "header.driveType = 0x{0:X2}" , header . driveType ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "header.stepping = 0x{0:X2}" , header . stepping ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "header.dosAllocation = 0x{0:X2}" , header . dosAllocation ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "header.sides = 0x{0:X2}" , header . sides ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "header.crc = 0x{0:X4}" , header . crc ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "calculated header crc = 0x{0:X4}" , calculatedHeaderCRC ) ;
2014-04-19 21:21:08 +01:00
2014-04-21 17:23:35 +01:00
// We need more checks as the magic is too simply.
// This may deny legal images
// That would be much of a coincidence
2016-04-19 02:11:47 +01:00
if ( header . crc = = calculatedHeaderCRC )
2014-04-21 17:23:35 +01:00
return true ;
2016-04-19 02:11:47 +01:00
if ( header . sequence ! = 0x00 )
2014-04-21 17:23:35 +01:00
return false ;
2016-04-19 02:11:47 +01:00
if ( header . dataRate ! = DataRate250kbps & & header . dataRate ! = DataRate300kbps & & header . dataRate ! = DataRate500kbps )
2014-04-21 17:23:35 +01:00
return false ;
2016-04-19 02:11:47 +01:00
if ( header . driveType ! = DriveType35DD & & header . driveType ! = DriveType35ED & & header . driveType ! = DriveType35HD & & header . driveType ! = DriveType525DD & &
2014-04-21 17:23:35 +01:00
header . driveType ! = DriveType525HD & & header . driveType ! = DriveType525HD_DDDisk & & header . driveType ! = DriveType8inch )
return false ;
2014-04-19 21:21:08 +01:00
return true ;
}
2014-08-25 05:00:25 +01:00
2016-09-05 17:37:31 +01:00
public override bool OpenImage ( Filter imageFilter )
2014-04-19 21:21:08 +01:00
{
2014-04-21 20:27:50 +01:00
header = new TD0Header ( ) ;
byte [ ] headerBytes = new byte [ 12 ] ;
2016-09-05 17:37:31 +01:00
Stream stream = imageFilter . GetDataForkStream ( ) ;
stream . Seek ( 0 , SeekOrigin . Begin ) ;
2016-04-19 02:11:47 +01:00
2014-04-21 20:27:50 +01:00
stream . Read ( headerBytes , 0 , 12 ) ;
2016-04-19 02:11:47 +01:00
2014-04-21 20:27:50 +01:00
header . signature = BitConverter . ToUInt16 ( headerBytes , 0 ) ;
2016-04-19 02:11:47 +01:00
if ( header . signature ! = tdMagic & & header . signature ! = tdAdvCompMagic )
2014-04-21 20:27:50 +01:00
return false ;
2016-04-19 02:11:47 +01:00
2014-04-21 20:27:50 +01:00
header . sequence = headerBytes [ 2 ] ;
header . diskSet = headerBytes [ 3 ] ;
header . version = headerBytes [ 4 ] ;
header . dataRate = headerBytes [ 5 ] ;
header . driveType = headerBytes [ 6 ] ;
header . stepping = headerBytes [ 7 ] ;
header . dosAllocation = headerBytes [ 8 ] ;
header . sides = headerBytes [ 9 ] ;
header . crc = BitConverter . ToUInt16 ( headerBytes , 10 ) ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
2016-09-05 17:37:31 +01:00
ImageInfo . imageName = Path . GetFileNameWithoutExtension ( imageFilter . GetFilename ( ) ) ;
2016-07-28 22:25:26 +01:00
ImageInfo . imageVersion = string . Format ( "{0}.{1}" , ( header . version & 0xF0 ) > > 4 , header . version & 0x0F ) ;
2014-08-28 19:29:18 +01:00
ImageInfo . imageApplication = ImageInfo . imageVersion ;
2014-08-24 17:46:29 +01:00
2014-04-21 20:27:50 +01:00
byte [ ] headerBytesForCRC = new byte [ 10 ] ;
Array . Copy ( headerBytes , headerBytesForCRC , 10 ) ;
2016-07-28 22:25:26 +01:00
ushort calculatedHeaderCRC = TeleDiskCRC ( 0x0000 , headerBytesForCRC ) ;
2016-04-19 02:11:47 +01:00
2015-10-18 22:04:03 +01:00
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "header.signature = 0x{0:X4}" , header . signature ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "header.sequence = 0x{0:X2}" , header . sequence ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "header.diskSet = 0x{0:X2}" , header . diskSet ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "header.version = 0x{0:X2}" , header . version ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "header.dataRate = 0x{0:X2}" , header . dataRate ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "header.driveType = 0x{0:X2}" , header . driveType ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "header.stepping = 0x{0:X2}" , header . stepping ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "header.dosAllocation = 0x{0:X2}" , header . dosAllocation ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "header.sides = 0x{0:X2}" , header . sides ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "header.crc = 0x{0:X4}" , header . crc ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "calculated header crc = 0x{0:X4}" , calculatedHeaderCRC ) ;
2014-04-21 20:27:50 +01:00
// We need more checks as the magic is too simply.
// This may deny legal images
2016-04-19 02:11:47 +01:00
2014-04-21 20:27:50 +01:00
// That would be much of a coincidence
2016-04-19 02:11:47 +01:00
if ( header . crc ! = calculatedHeaderCRC )
2014-08-25 05:00:25 +01:00
{
ADiskCRCHasFailed = true ;
2015-10-18 22:04:03 +01:00
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "Calculated CRC does not coincide with stored one." ) ;
2014-08-25 05:00:25 +01:00
}
2014-04-21 20:27:50 +01:00
2016-04-19 02:11:47 +01:00
if ( header . sequence ! = 0x00 )
2014-04-21 20:27:50 +01:00
return false ;
2016-04-19 02:11:47 +01:00
if ( header . dataRate ! = DataRate250kbps & & header . dataRate ! = DataRate300kbps & & header . dataRate ! = DataRate500kbps )
2014-04-21 20:27:50 +01:00
return false ;
2016-04-19 02:11:47 +01:00
if ( header . driveType ! = DriveType35DD & & header . driveType ! = DriveType35ED & & header . driveType ! = DriveType35HD & & header . driveType ! = DriveType525DD & &
2014-04-21 20:27:50 +01:00
header . driveType ! = DriveType525HD & & header . driveType ! = DriveType525HD_DDDisk & & header . driveType ! = DriveType8inch )
return false ;
2016-04-19 02:11:47 +01:00
if ( header . signature = = tdAdvCompMagic )
2014-04-21 20:27:50 +01:00
throw new NotImplementedException ( "TeleDisk Advanced Compression support not yet implemented" ) ;
2014-08-28 19:29:18 +01:00
ImageInfo . imageCreationTime = DateTime . MinValue ;
2014-04-21 20:27:50 +01:00
2016-04-19 02:11:47 +01:00
if ( ( header . stepping & CommentBlockPresent ) = = CommentBlockPresent )
2014-04-21 20:27:50 +01:00
{
commentHeader = new TDCommentBlockHeader ( ) ;
byte [ ] commentHeaderBytes = new byte [ 10 ] ;
byte [ ] commentBlockForCRC ;
stream . Read ( commentHeaderBytes , 0 , 10 ) ;
commentHeader . crc = BitConverter . ToUInt16 ( commentHeaderBytes , 0 ) ;
commentHeader . length = BitConverter . ToUInt16 ( commentHeaderBytes , 2 ) ;
commentHeader . year = commentHeaderBytes [ 4 ] ;
commentHeader . month = commentHeaderBytes [ 5 ] ;
commentHeader . day = commentHeaderBytes [ 6 ] ;
commentHeader . hour = commentHeaderBytes [ 7 ] ;
commentHeader . minute = commentHeaderBytes [ 8 ] ;
commentHeader . second = commentHeaderBytes [ 9 ] ;
commentBlock = new byte [ commentHeader . length ] ;
stream . Read ( commentBlock , 0 , commentHeader . length ) ;
commentBlockForCRC = new byte [ commentHeader . length + 8 ] ;
Array . Copy ( commentHeaderBytes , 2 , commentBlockForCRC , 0 , 8 ) ;
Array . Copy ( commentBlock , 0 , commentBlockForCRC , 8 , commentHeader . length ) ;
2016-07-28 22:25:26 +01:00
ushort cmtcrc = TeleDiskCRC ( 0 , commentBlockForCRC ) ;
2014-04-21 20:27:50 +01:00
2015-10-18 22:04:03 +01:00
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "Comment header" ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "\tcommentheader.crc = 0x{0:X4}" , commentHeader . crc ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "\tCalculated CRC = 0x{0:X4}" , cmtcrc ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "\tcommentheader.length = {0} bytes" , commentHeader . length ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "\tcommentheader.year = {0}" , commentHeader . year ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "\tcommentheader.month = {0}" , commentHeader . month ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "\tcommentheader.day = {0}" , commentHeader . day ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "\tcommentheader.hour = {0}" , commentHeader . hour ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "\tcommentheader.minute = {0}" , commentHeader . minute ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "\tcommentheader.second = {0}" , commentHeader . second ) ;
2014-04-21 20:27:50 +01:00
2014-08-25 05:00:25 +01:00
ADiskCRCHasFailed | = cmtcrc ! = commentHeader . crc ;
2016-04-19 02:11:47 +01:00
for ( int i = 0 ; i < commentBlock . Length ; i + + )
2014-04-21 20:27:50 +01:00
{
// Replace NULLs, used by TeleDisk as newline markers, with UNIX newline marker
2016-04-19 02:11:47 +01:00
if ( commentBlock [ i ] = = 0x00 )
2014-08-25 05:00:25 +01:00
commentBlock [ i ] = 0x0A ;
2014-04-21 20:27:50 +01:00
}
2014-08-28 19:29:18 +01:00
ImageInfo . imageComments = System . Text . Encoding . ASCII . GetString ( commentBlock ) ;
2014-04-21 20:27:50 +01:00
2015-10-18 22:04:03 +01:00
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "Comment" ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "{0}" , ImageInfo . imageComments ) ;
2014-04-21 20:27:50 +01:00
2014-08-28 19:29:18 +01:00
ImageInfo . imageCreationTime = new DateTime ( commentHeader . year + 1900 , commentHeader . month + 1 , commentHeader . day ,
2014-08-25 05:00:25 +01:00
commentHeader . hour , commentHeader . minute , commentHeader . second , DateTimeKind . Unspecified ) ;
2014-04-21 20:27:50 +01:00
}
2016-04-19 02:11:47 +01:00
if ( ImageInfo . imageCreationTime = = DateTime . MinValue )
2016-09-05 17:37:31 +01:00
ImageInfo . imageCreationTime = imageFilter . GetCreationTime ( ) ;
ImageInfo . imageLastModificationTime = imageFilter . GetLastWriteTime ( ) ;
2014-04-21 20:27:50 +01:00
2015-10-18 22:04:03 +01:00
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "Image created on {0}" , ImageInfo . imageCreationTime ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "Image modified on {0}" , ImageInfo . imageLastModificationTime ) ;
2014-04-21 20:27:50 +01:00
2015-10-18 22:04:03 +01:00
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "Parsing image" ) ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
totalDiskSize = 0 ;
2014-08-28 19:29:18 +01:00
ImageInfo . imageSize = 0 ;
2017-09-27 12:37:03 +01:00
int totalCylinders = - 1 ;
int totalHeads = - 1 ;
int maxSector = - 1 ;
int totalSectors = 0 ;
long currentPos = stream . Position ;
ImageInfo . sectorSize = uint . MaxValue ;
ImageInfo . sectorsPerTrack = uint . MaxValue ;
// Count cylinders
while ( true )
{
TDTrackHeader TDTrack = new TDTrackHeader ( ) ;
TDTrack . sectors = ( byte ) stream . ReadByte ( ) ;
TDTrack . cylinder = ( byte ) stream . ReadByte ( ) ;
TDTrack . head = ( byte ) stream . ReadByte ( ) ;
TDTrack . crc = ( byte ) stream . ReadByte ( ) ;
if ( TDTrack . cylinder > totalCylinders )
totalCylinders = TDTrack . cylinder ;
if ( TDTrack . head > totalHeads )
totalHeads = TDTrack . head ;
if ( TDTrack . sectors = = 0xFF ) // End of disk image
break ;
if ( TDTrack . sectors < ImageInfo . sectorsPerTrack )
ImageInfo . sectorsPerTrack = TDTrack . sectors ;
for ( byte processedSectors = 0 ; processedSectors < TDTrack . sectors ; processedSectors + + )
{
TDSectorHeader TDSector = new TDSectorHeader ( ) ;
TDDataHeader TDData = new TDDataHeader ( ) ;
byte [ ] dataSizeBytes = new byte [ 2 ] ;
byte [ ] data ;
byte [ ] decodedData ;
TDSector . cylinder = ( byte ) stream . ReadByte ( ) ;
TDSector . head = ( byte ) stream . ReadByte ( ) ;
TDSector . sectorNumber = ( byte ) stream . ReadByte ( ) ;
TDSector . sectorSize = ( byte ) stream . ReadByte ( ) ;
TDSector . flags = ( byte ) stream . ReadByte ( ) ;
TDSector . crc = ( byte ) stream . ReadByte ( ) ;
if ( TDSector . sectorNumber > maxSector )
maxSector = TDSector . sectorNumber ;
if ( ( TDSector . flags & FlagsSectorDataless ) ! = FlagsSectorDataless & & ( TDSector . flags & FlagsSectorSkipped ) ! = FlagsSectorSkipped )
{
stream . Read ( dataSizeBytes , 0 , 2 ) ;
TDData . dataSize = BitConverter . ToUInt16 ( dataSizeBytes , 0 ) ;
TDData . dataSize - - ; // Sydex decided to including dataEncoding byte as part of it
ImageInfo . imageSize + = TDData . dataSize ;
TDData . dataEncoding = ( byte ) stream . ReadByte ( ) ;
data = new byte [ TDData . dataSize ] ;
stream . Read ( data , 0 , TDData . dataSize ) ;
}
if ( 128 < < TDSector . sectorSize < ImageInfo . sectorSize )
ImageInfo . sectorSize = ( uint ) ( 128 < < TDSector . sectorSize ) ;
totalSectors + + ;
}
}
totalCylinders + + ;
totalHeads + + ;
if ( totalCylinders < = 0 | | totalHeads < = 0 )
throw new ImageNotSupportedException ( "No cylinders or heads found" ) ;
sectorsData = new byte [ totalCylinders ] [ ] [ ] [ ] ;
// Total sectors per track
uint [ ] [ ] spts = new uint [ totalCylinders ] [ ] ;
ImageInfo . cylinders = ( ushort ) totalCylinders ;
ImageInfo . heads = ( byte ) totalHeads ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "Found {0} cylinders and {1} heads with a maximum sector number of {2}" , totalCylinders , totalHeads , maxSector ) ;
// Create heads
for ( int i = 0 ; i < totalCylinders ; i + + )
{
sectorsData [ i ] = new byte [ totalHeads ] [ ] [ ] ;
spts [ i ] = new uint [ totalHeads ] ;
for ( int j = 0 ; j < totalHeads ; j + + )
sectorsData [ i ] [ j ] = new byte [ maxSector + 1 ] [ ] ;
}
// Decode the image
stream . Seek ( currentPos , SeekOrigin . Begin ) ;
while ( true )
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
{
TDTrackHeader TDTrack = new TDTrackHeader ( ) ;
byte [ ] TDTrackForCRC = new byte [ 3 ] ;
byte TDTrackCalculatedCRC ;
TDTrack . sectors = ( byte ) stream . ReadByte ( ) ;
TDTrack . cylinder = ( byte ) stream . ReadByte ( ) ;
TDTrack . head = ( byte ) stream . ReadByte ( ) ;
TDTrack . crc = ( byte ) stream . ReadByte ( ) ;
TDTrackForCRC [ 0 ] = TDTrack . sectors ;
TDTrackForCRC [ 1 ] = TDTrack . cylinder ;
TDTrackForCRC [ 2 ] = TDTrack . head ;
TDTrackCalculatedCRC = ( byte ) ( TeleDiskCRC ( 0 , TDTrackForCRC ) & 0xFF ) ;
2015-10-18 22:04:03 +01:00
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "Track follows" ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "\tTrack cylinder: {0}\t" , TDTrack . cylinder ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "\tTrack head: {0}\t" , TDTrack . head ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "\tSectors in track: {0}\t" , TDTrack . sectors ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "\tTrack header CRC: 0x{0:X2} (calculated 0x{1:X2})\t" , TDTrack . crc , TDTrackCalculatedCRC ) ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
2014-08-25 05:00:25 +01:00
ADiskCRCHasFailed | = TDTrackCalculatedCRC ! = TDTrack . crc ;
2016-04-19 02:11:47 +01:00
if ( TDTrack . sectors = = 0xFF ) // End of disk image
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
{
2015-10-18 22:04:03 +01:00
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "End of disk image arrived" ) ;
2017-09-27 12:37:03 +01:00
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "Total of {0} data sectors, for {1} bytes" , totalSectors , totalDiskSize ) ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
break ;
}
2016-04-19 02:11:47 +01:00
for ( byte processedSectors = 0 ; processedSectors < TDTrack . sectors ; processedSectors + + )
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
{
TDSectorHeader TDSector = new TDSectorHeader ( ) ;
TDDataHeader TDData = new TDDataHeader ( ) ;
byte [ ] dataSizeBytes = new byte [ 2 ] ;
byte [ ] data ;
byte [ ] decodedData ;
TDSector . cylinder = ( byte ) stream . ReadByte ( ) ;
TDSector . head = ( byte ) stream . ReadByte ( ) ;
TDSector . sectorNumber = ( byte ) stream . ReadByte ( ) ;
TDSector . sectorSize = ( byte ) stream . ReadByte ( ) ;
TDSector . flags = ( byte ) stream . ReadByte ( ) ;
TDSector . crc = ( byte ) stream . ReadByte ( ) ;
2015-10-18 22:04:03 +01:00
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "\tSector follows" ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "\t\tAddressMark cylinder: {0}" , TDSector . cylinder ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "\t\tAddressMark head: {0}" , TDSector . head ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "\t\tAddressMark sector number: {0}" , TDSector . sectorNumber ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "\t\tSector size: {0}" , TDSector . sectorSize ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "\t\tSector flags: 0x{0:X2}" , TDSector . flags ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "\t\tSector CRC (plus headers): 0x{0:X2}" , TDSector . crc ) ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
2017-09-27 12:37:03 +01:00
uint LBA = ( uint ) ( ( TDSector . cylinder * header . sides * ImageInfo . sectorsPerTrack ) + ( TDSector . head * ImageInfo . sectorsPerTrack ) + ( TDSector . sectorNumber - 1 ) ) ;
if ( ( TDSector . flags & FlagsSectorDataless ) ! = FlagsSectorDataless & & ( TDSector . flags & FlagsSectorSkipped ) ! = FlagsSectorSkipped )
{
stream . Read ( dataSizeBytes , 0 , 2 ) ;
TDData . dataSize = BitConverter . ToUInt16 ( dataSizeBytes , 0 ) ;
TDData . dataSize - - ; // Sydex decided to including dataEncoding byte as part of it
ImageInfo . imageSize + = TDData . dataSize ;
TDData . dataEncoding = ( byte ) stream . ReadByte ( ) ;
data = new byte [ TDData . dataSize ] ;
stream . Read ( data , 0 , TDData . dataSize ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "\t\tData size (in-image): {0}" , TDData . dataSize ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "\t\tData encoding: 0x{0:X2}" , TDData . dataEncoding ) ;
decodedData = DecodeTeleDiskData ( TDSector . sectorSize , TDData . dataEncoding , data ) ;
byte TDSectorCalculatedCRC = ( byte ) ( TeleDiskCRC ( 0 , decodedData ) & 0xFF ) ;
if ( TDSectorCalculatedCRC ! = TDSector . crc )
{
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "Sector {0}:{3}:{4} calculated CRC 0x{1:X2} differs from stored CRC 0x{2:X2}" , TDTrack . cylinder , TDSectorCalculatedCRC , TDSector . crc , TDTrack . cylinder , TDSector . sectorNumber ) ;
if ( ( TDSector . flags & FlagsSectorNoID ) ! = FlagsSectorNoID )
SectorsWhereCRCHasFailed . Add ( LBA ) ;
}
}
else
decodedData = new byte [ 128 < < TDSector . sectorSize ] ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "\t\tLBA: {0}" , LBA ) ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
2016-04-19 02:11:47 +01:00
if ( ( TDSector . flags & FlagsSectorNoID ) ! = FlagsSectorNoID )
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
{
2017-09-27 12:37:03 +01:00
if ( sectorsData [ TDTrack . cylinder ] [ TDTrack . head ] [ TDSector . sectorNumber ] ! = null )
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
{
2016-04-19 02:11:47 +01:00
if ( ( TDSector . flags & FlagsSectorDuplicate ) = = FlagsSectorDuplicate )
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
{
2015-10-18 22:04:03 +01:00
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "\t\tSector {0} on cylinder {1} head {2} is duplicate, and marked so" ,
TDSector . sectorNumber , TDSector . cylinder , TDSector . head ) ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
}
else
{
2015-10-18 22:04:03 +01:00
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "\t\tSector {0} on cylinder {1} head {2} is duplicate, but is not marked so" ,
TDSector . sectorNumber , TDSector . cylinder , TDSector . head ) ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
}
}
else
{
2017-09-27 12:37:03 +01:00
sectorsData [ TDTrack . cylinder ] [ TDTrack . head ] [ TDSector . sectorNumber ] = decodedData ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
totalDiskSize + = ( uint ) decodedData . Length ;
}
}
}
}
2014-08-24 17:46:29 +01:00
2017-09-27 12:37:03 +01:00
ImageInfo . sectors = ImageInfo . cylinders * ImageInfo . heads * ImageInfo . sectorsPerTrack ;
2016-01-16 03:54:55 +00:00
ImageInfo . mediaType = DecodeTeleDiskDiskType ( ) ;
2014-08-24 17:46:29 +01:00
2015-12-05 17:21:47 +00:00
ImageInfo . xmlMediaType = XmlMediaType . BlockMedia ;
2016-08-21 17:35:35 +01:00
DicConsole . VerboseWriteLine ( "TeleDisk image contains a disk of type {0}" , ImageInfo . mediaType ) ;
if ( ! string . IsNullOrEmpty ( ImageInfo . imageComments ) )
DicConsole . VerboseWriteLine ( "TeleDisk comments: {0}" , ImageInfo . imageComments ) ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
return true ;
2014-04-19 21:21:08 +01:00
}
2014-08-25 05:00:25 +01:00
2014-04-19 21:21:08 +01:00
public override bool ImageHasPartitions ( )
{
2014-08-28 19:29:18 +01:00
return ImageInfo . imageHasPartitions ;
2014-04-19 21:21:08 +01:00
}
2014-08-25 05:00:25 +01:00
2016-07-28 22:25:26 +01:00
public override ulong GetImageSize ( )
2014-04-19 21:21:08 +01:00
{
2014-08-28 19:29:18 +01:00
return ImageInfo . imageSize ;
2014-04-19 21:21:08 +01:00
}
2014-08-25 05:00:25 +01:00
2016-07-28 22:25:26 +01:00
public override ulong GetSectors ( )
2014-04-19 21:21:08 +01:00
{
2014-08-28 19:29:18 +01:00
return ImageInfo . sectors ;
2014-04-19 21:21:08 +01:00
}
2014-08-25 05:00:25 +01:00
2016-07-28 22:25:26 +01:00
public override uint GetSectorSize ( )
2014-04-19 21:21:08 +01:00
{
2014-08-28 19:29:18 +01:00
return ImageInfo . sectorSize ;
2014-04-19 21:21:08 +01:00
}
2014-08-25 05:00:25 +01:00
2016-07-28 22:25:26 +01:00
public override byte [ ] ReadSector ( ulong sectorAddress )
2014-04-19 21:21:08 +01:00
{
2017-09-27 12:37:03 +01:00
( ushort cylinder , byte head , byte sector ) = LbaToChs ( sectorAddress ) ;
2014-08-25 05:00:25 +01:00
2017-09-27 12:37:03 +01:00
if ( cylinder > = sectorsData . Length )
throw new ArgumentOutOfRangeException ( nameof ( sectorAddress ) , "Sector address not found" ) ;
2014-06-07 23:32:59 +01:00
2017-09-27 12:37:03 +01:00
if ( head > = sectorsData [ cylinder ] . Length )
throw new ArgumentOutOfRangeException ( nameof ( sectorAddress ) , "Sector address not found" ) ;
2014-06-07 23:32:59 +01:00
2017-09-27 12:37:03 +01:00
if ( sector > sectorsData [ cylinder ] [ head ] . Length )
throw new ArgumentOutOfRangeException ( nameof ( sectorAddress ) , "Sector address not found" ) ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
2017-09-27 12:37:03 +01:00
return sectorsData [ cylinder ] [ head ] [ sector ] ;
}
public override byte [ ] ReadSectors ( ulong sectorAddress , uint length )
{
if ( sectorAddress > ImageInfo . sectors - 1 )
throw new ArgumentOutOfRangeException ( nameof ( sectorAddress ) , "Sector address not found" ) ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
2017-09-27 12:37:03 +01:00
if ( sectorAddress + length > ImageInfo . sectors )
throw new ArgumentOutOfRangeException ( nameof ( length ) , "Requested more sectors than available" ) ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
2017-09-27 12:37:03 +01:00
MemoryStream buffer = new MemoryStream ( ) ;
for ( uint i = 0 ; i < length ; i + + )
{
byte [ ] sector = ReadSector ( sectorAddress + i ) ;
buffer . Write ( sector , 0 , sector . Length ) ;
}
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
2017-09-27 12:37:03 +01:00
return buffer . ToArray ( ) ;
}
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
2017-09-27 12:37:03 +01:00
( ushort cylinder , byte head , byte sector ) LbaToChs ( ulong lba )
{
ushort cylinder = ( ushort ) ( lba / ( ImageInfo . heads * ImageInfo . sectorsPerTrack ) ) ;
byte head = ( byte ) ( ( lba / ImageInfo . sectorsPerTrack ) % ImageInfo . heads ) ;
byte sector = ( byte ) ( ( lba % ImageInfo . sectorsPerTrack ) + 1 ) ;
return ( cylinder , head , sector ) ;
}
2014-08-25 05:00:25 +01:00
2017-09-27 12:37:03 +01:00
public override byte [ ] ReadSectorLong ( ulong sectorAddress )
2014-04-19 21:21:08 +01:00
{
return ReadSectors ( sectorAddress , 1 ) ;
}
2014-08-25 05:00:25 +01:00
2016-07-28 22:25:26 +01:00
public override byte [ ] ReadSectorsLong ( ulong sectorAddress , uint length )
2014-04-19 21:21:08 +01:00
{
return ReadSectors ( sectorAddress , length ) ;
}
2014-08-25 05:00:25 +01:00
2016-04-19 02:11:47 +01:00
public override string GetImageFormat ( )
{
2014-04-19 21:21:08 +01:00
return "Sydex TeleDisk" ;
}
2014-08-25 05:00:25 +01:00
2016-04-19 02:11:47 +01:00
public override string GetImageVersion ( )
2014-04-19 21:21:08 +01:00
{
2014-08-28 19:29:18 +01:00
return ImageInfo . imageVersion ;
2014-04-19 21:21:08 +01:00
}
2014-08-25 05:00:25 +01:00
2016-04-19 02:11:47 +01:00
public override string GetImageApplication ( )
2014-04-19 21:21:08 +01:00
{
2014-08-28 19:29:18 +01:00
return ImageInfo . imageApplication ;
2014-04-19 21:21:08 +01:00
}
2014-08-25 05:00:25 +01:00
2016-04-19 02:11:47 +01:00
public override string GetImageApplicationVersion ( )
2014-04-19 21:21:08 +01:00
{
2014-08-28 19:29:18 +01:00
return ImageInfo . imageApplicationVersion ;
2014-04-19 21:21:08 +01:00
}
2014-08-25 05:00:25 +01:00
2014-04-19 21:21:08 +01:00
public override DateTime GetImageCreationTime ( )
{
2014-08-28 19:29:18 +01:00
return ImageInfo . imageCreationTime ;
2014-04-19 21:21:08 +01:00
}
2014-08-25 05:00:25 +01:00
2014-04-19 21:21:08 +01:00
public override DateTime GetImageLastModificationTime ( )
{
2014-08-28 19:29:18 +01:00
return ImageInfo . imageLastModificationTime ;
2014-04-19 21:21:08 +01:00
}
2014-08-25 05:00:25 +01:00
2016-04-19 02:11:47 +01:00
public override string GetImageName ( )
2014-04-19 21:21:08 +01:00
{
2014-08-28 19:29:18 +01:00
return ImageInfo . imageName ;
2014-04-19 21:21:08 +01:00
}
2014-08-25 05:00:25 +01:00
2016-01-16 03:54:55 +00:00
public override MediaType GetMediaType ( )
2014-08-24 17:46:29 +01:00
{
2016-01-16 03:54:55 +00:00
return ImageInfo . mediaType ;
2014-08-24 17:46:29 +01:00
}
2016-07-28 22:25:26 +01:00
public override bool? VerifySector ( ulong sectorAddress )
2014-08-25 05:00:25 +01:00
{
return ! SectorsWhereCRCHasFailed . Contains ( sectorAddress ) ;
}
2016-07-28 22:25:26 +01:00
public override bool? VerifySector ( ulong sectorAddress , uint track )
2014-08-25 05:00:25 +01:00
{
return null ;
}
2016-07-28 22:25:26 +01:00
public override bool? VerifySectors ( ulong sectorAddress , uint length , out List < ulong > FailingLBAs , out List < ulong > UnknownLBAs )
2014-08-25 05:00:25 +01:00
{
2016-07-28 22:25:26 +01:00
FailingLBAs = new List < ulong > ( ) ;
UnknownLBAs = new List < ulong > ( ) ;
2014-08-25 05:00:25 +01:00
2016-07-28 22:25:26 +01:00
for ( ulong i = sectorAddress ; i < sectorAddress + length ; i + + )
2016-04-19 02:11:47 +01:00
if ( SectorsWhereCRCHasFailed . Contains ( sectorAddress ) )
2014-08-25 05:00:25 +01:00
FailingLBAs . Add ( sectorAddress ) ;
return FailingLBAs . Count < = 0 ;
}
2016-07-28 22:25:26 +01:00
public override bool? VerifySectors ( ulong sectorAddress , uint length , uint track , out List < ulong > FailingLBAs , out List < ulong > UnknownLBAs )
2014-08-25 05:00:25 +01:00
{
2016-07-28 22:25:26 +01:00
FailingLBAs = new List < ulong > ( ) ;
UnknownLBAs = new List < ulong > ( ) ;
2014-08-25 05:00:25 +01:00
2016-07-28 22:25:26 +01:00
for ( ulong i = sectorAddress ; i < sectorAddress + length ; i + + )
2014-08-25 05:00:25 +01:00
UnknownLBAs . Add ( i ) ;
return null ;
}
2016-01-16 03:54:55 +00:00
public override bool? VerifyMediaImage ( )
2014-08-25 05:00:25 +01:00
{
return ADiskCRCHasFailed ;
}
2014-08-24 17:46:29 +01:00
#region Private methods
2014-08-25 05:00:25 +01:00
2016-07-28 22:25:26 +01:00
static ushort TeleDiskCRC ( ushort crc , byte [ ] buffer )
2014-08-24 17:46:29 +01:00
{
int counter = 0 ;
2016-04-19 02:11:47 +01:00
while ( counter < buffer . Length )
2014-08-24 17:46:29 +01:00
{
2016-07-28 22:25:26 +01:00
crc ^ = ( ushort ) ( ( buffer [ counter ] & 0xFF ) < < 8 ) ;
2014-08-24 17:46:29 +01:00
2016-04-19 02:11:47 +01:00
for ( int i = 0 ; i < 8 ; i + + )
2014-08-24 17:46:29 +01:00
{
2016-04-19 02:11:47 +01:00
if ( ( crc & 0x8000 ) > 0 )
2016-07-28 22:25:26 +01:00
crc = ( ushort ) ( ( crc < < 1 ) ^ TeleDiskCRCPoly ) ;
2014-08-24 17:46:29 +01:00
else
2016-07-28 22:25:26 +01:00
crc = ( ushort ) ( crc < < 1 ) ;
2014-08-24 17:46:29 +01:00
}
counter + + ;
}
return crc ;
}
static byte [ ] DecodeTeleDiskData ( byte sectorSize , byte encodingType , byte [ ] encodedData )
{
byte [ ] decodedData ;
2016-04-19 02:11:47 +01:00
switch ( sectorSize )
2014-08-24 17:46:29 +01:00
{
case SectorSize128 :
decodedData = new byte [ 128 ] ;
break ;
case SectorSize256 :
decodedData = new byte [ 256 ] ;
break ;
case SectorSize512 :
decodedData = new byte [ 512 ] ;
break ;
case SectorSize1K :
decodedData = new byte [ 1024 ] ;
break ;
case SectorSize2K :
decodedData = new byte [ 2048 ] ;
break ;
case SectorSize4K :
decodedData = new byte [ 4096 ] ;
break ;
case SectorSize8K :
decodedData = new byte [ 8192 ] ;
break ;
default :
2016-07-28 22:25:26 +01:00
throw new ImageNotSupportedException ( string . Format ( "Sector size {0} is incorrect." , sectorSize ) ) ;
2014-08-24 17:46:29 +01:00
}
2016-04-19 02:11:47 +01:00
switch ( encodingType )
2014-08-24 17:46:29 +01:00
{
case dataBlockCopy :
Array . Copy ( encodedData , decodedData , decodedData . Length ) ;
break ;
case dataBlockPattern :
{
int ins = 0 ;
int outs = 0 ;
2016-04-19 02:11:47 +01:00
while ( ins < encodedData . Length )
2014-08-24 17:46:29 +01:00
{
2016-07-28 22:25:26 +01:00
ushort repeatNumber ;
2014-08-24 17:46:29 +01:00
byte [ ] repeatValue = new byte [ 2 ] ;
repeatNumber = BitConverter . ToUInt16 ( encodedData , ins ) ;
Array . Copy ( encodedData , ins + 2 , repeatValue , 0 , 2 ) ;
2014-08-25 05:00:25 +01:00
byte [ ] decodedPiece = new byte [ repeatNumber * 2 ] ;
2014-08-24 17:46:29 +01:00
ArrayHelpers . ArrayFill ( decodedPiece , repeatValue ) ;
Array . Copy ( decodedPiece , 0 , decodedData , outs , decodedPiece . Length ) ;
ins + = 4 ;
outs + = decodedPiece . Length ;
}
2015-10-18 22:04:03 +01:00
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "(Block pattern decoder): Input data size: {0} bytes" , encodedData . Length ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "(Block pattern decoder): Processed input: {0} bytes" , ins ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "(Block pattern decoder): Output data size: {0} bytes" , decodedData . Length ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "(Block pattern decoder): Processed Output: {0} bytes" , outs ) ;
2014-08-24 17:46:29 +01:00
break ;
}
case dataBlockRLE :
{
int ins = 0 ;
int outs = 0 ;
2016-04-19 02:11:47 +01:00
while ( ins < encodedData . Length )
2014-08-24 17:46:29 +01:00
{
byte Run ;
byte Length ;
byte Encoding ;
byte [ ] Piece ;
Encoding = encodedData [ ins ] ;
2016-04-19 02:11:47 +01:00
if ( Encoding = = 0x00 )
2014-08-24 17:46:29 +01:00
{
Length = encodedData [ ins + 1 ] ;
Array . Copy ( encodedData , ins + 2 , decodedData , outs , Length ) ;
ins + = ( 2 + Length ) ;
outs + = Length ;
}
else
{
Length = ( byte ) ( Encoding * 2 ) ;
Run = encodedData [ ins + 1 ] ;
byte [ ] Part = new byte [ Length ] ;
Array . Copy ( encodedData , ins + 2 , Part , 0 , Length ) ;
Piece = new byte [ Length * Run ] ;
ArrayHelpers . ArrayFill ( Piece , Part ) ;
Array . Copy ( Piece , 0 , decodedData , outs , Piece . Length ) ;
ins + = ( 2 + Length ) ;
outs + = Piece . Length ;
}
}
2015-10-18 22:04:03 +01:00
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "(RLE decoder): Input data size: {0} bytes" , encodedData . Length ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "(RLE decoder): Processed input: {0} bytes" , ins ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "(RLE decoder): Output data size: {0} bytes" , decodedData . Length ) ;
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "(RLE decoder): Processed Output: {0} bytes" , outs ) ;
2014-08-24 17:46:29 +01:00
break ;
}
default :
2016-07-28 22:25:26 +01:00
throw new ImageNotSupportedException ( string . Format ( "Data encoding {0} is incorrect." , encodingType ) ) ;
2014-08-24 17:46:29 +01:00
}
return decodedData ;
}
2016-01-16 03:54:55 +00:00
MediaType DecodeTeleDiskDiskType ( )
2014-04-19 21:21:08 +01:00
{
2016-04-19 02:11:47 +01:00
switch ( header . driveType )
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
{
case DriveType525DD :
case DriveType525HD_DDDisk :
case DriveType525HD :
{
2016-04-19 02:11:47 +01:00
switch ( totalDiskSize )
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
{
case 163840 :
{
// Acorn disk uses 256 bytes/sector
2016-04-19 02:11:47 +01:00
if ( ImageInfo . sectorSize = = 256 )
2016-01-16 03:54:55 +00:00
return MediaType . ACORN_525_SS_DD_40 ;
2016-07-28 22:25:26 +01:00
// DOS disks use 512 bytes/sector
return MediaType . DOS_525_SS_DD_8 ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
}
case 184320 :
{
// Atari disk uses 256 bytes/sector
2016-04-19 02:11:47 +01:00
if ( ImageInfo . sectorSize = = 256 )
2016-01-16 03:54:55 +00:00
return MediaType . ATARI_525_DD ;
2016-07-28 22:25:26 +01:00
// DOS disks use 512 bytes/sector
return MediaType . DOS_525_SS_DD_9 ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
}
case 327680 :
{
// Acorn disk uses 256 bytes/sector
2016-04-19 02:11:47 +01:00
if ( ImageInfo . sectorSize = = 256 )
2016-01-16 03:54:55 +00:00
return MediaType . ACORN_525_SS_DD_80 ;
2016-07-28 22:25:26 +01:00
// DOS disks use 512 bytes/sector
return MediaType . DOS_525_DS_DD_8 ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
}
case 368640 :
2016-01-16 03:54:55 +00:00
return MediaType . DOS_525_DS_DD_9 ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 1228800 :
2016-01-16 03:54:55 +00:00
return MediaType . DOS_525_HD ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 102400 :
2016-01-16 03:54:55 +00:00
return MediaType . ACORN_525_SS_SD_40 ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 204800 :
2016-01-16 03:54:55 +00:00
return MediaType . ACORN_525_SS_SD_80 ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 655360 :
2016-01-16 03:54:55 +00:00
return MediaType . ACORN_525_DS_DD ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 92160 :
2016-01-16 03:54:55 +00:00
return MediaType . ATARI_525_SD ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 133120 :
2016-01-16 03:54:55 +00:00
return MediaType . ATARI_525_ED ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 1310720 :
2016-01-16 03:54:55 +00:00
return MediaType . NEC_525_HD ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 1261568 :
2016-01-16 03:54:55 +00:00
return MediaType . SHARP_525 ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 839680 :
2016-01-16 03:54:55 +00:00
return MediaType . FDFORMAT_525_DD ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 1304320 :
2016-01-16 03:54:55 +00:00
return MediaType . ECMA_99_8 ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 1223424 :
2016-01-16 03:54:55 +00:00
return MediaType . ECMA_99_15 ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 1061632 :
2016-01-16 03:54:55 +00:00
return MediaType . ECMA_99_26 ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 80384 :
2016-01-16 03:54:55 +00:00
return MediaType . ECMA_66 ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 325632 :
2016-01-16 03:54:55 +00:00
return MediaType . ECMA_70 ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 653312 :
2016-01-16 03:54:55 +00:00
return MediaType . ECMA_78 ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 737280 :
2016-01-16 03:54:55 +00:00
return MediaType . ECMA_78_2 ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
default :
{
2015-10-18 22:04:03 +01:00
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "Unknown 5,25\" disk with {0} bytes" , totalDiskSize ) ;
2016-01-16 03:54:55 +00:00
return MediaType . Unknown ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
}
}
}
case DriveType35DD :
case DriveType35ED :
case DriveType35HD :
{
2016-04-19 02:11:47 +01:00
switch ( totalDiskSize )
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
{
2017-09-22 23:32:11 +01:00
case 322560 :
2017-09-22 23:02:30 +01:00
return MediaType . Apricot_35 ;
case 327680 :
2016-01-16 03:54:55 +00:00
return MediaType . DOS_35_SS_DD_8 ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 368640 :
2016-01-16 03:54:55 +00:00
return MediaType . DOS_35_SS_DD_9 ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 655360 :
2016-01-16 03:54:55 +00:00
return MediaType . DOS_35_DS_DD_8 ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 737280 :
2016-01-16 03:54:55 +00:00
return MediaType . DOS_35_DS_DD_9 ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 1474560 :
2016-01-16 03:54:55 +00:00
return MediaType . DOS_35_HD ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 2949120 :
2016-01-16 03:54:55 +00:00
return MediaType . DOS_35_ED ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 1720320 :
2016-01-16 03:54:55 +00:00
return MediaType . DMF ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 1763328 :
2016-01-16 03:54:55 +00:00
return MediaType . DMF_82 ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 1884160 : // Irreal size, seen as BIOS with TSR, 23 sectors/track
case 1860608 : // Real data size, sum of all sectors
2016-01-16 03:54:55 +00:00
return MediaType . XDF_35 ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 819200 :
2016-01-16 03:54:55 +00:00
return MediaType . CBM_35_DD ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 901120 :
2016-01-16 03:54:55 +00:00
return MediaType . CBM_AMIGA_35_DD ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 1802240 :
2016-01-16 03:54:55 +00:00
return MediaType . CBM_AMIGA_35_HD ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 1310720 :
2016-01-16 03:54:55 +00:00
return MediaType . NEC_35_HD_8 ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 1228800 :
2016-01-16 03:54:55 +00:00
return MediaType . NEC_35_HD_15 ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 1261568 :
2016-01-16 03:54:55 +00:00
return MediaType . SHARP_35 ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
default :
{
2015-10-18 22:04:03 +01:00
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "Unknown 3,5\" disk with {0} bytes" , totalDiskSize ) ;
2016-01-16 03:54:55 +00:00
return MediaType . Unknown ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
}
}
}
case DriveType8inch :
{
2016-04-19 02:11:47 +01:00
switch ( totalDiskSize )
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
{
case 81664 :
2016-01-16 03:54:55 +00:00
return MediaType . IBM23FD ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 242944 :
2016-01-16 03:54:55 +00:00
return MediaType . IBM33FD_128 ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 287488 :
2016-01-16 03:54:55 +00:00
return MediaType . IBM33FD_256 ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 306432 :
2016-01-16 03:54:55 +00:00
return MediaType . IBM33FD_512 ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 499200 :
2016-01-16 03:54:55 +00:00
return MediaType . IBM43FD_128 ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 574976 :
2016-01-16 03:54:55 +00:00
return MediaType . IBM43FD_256 ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 995072 :
2016-01-16 03:54:55 +00:00
return MediaType . IBM53FD_256 ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 1146624 :
2016-01-16 03:54:55 +00:00
return MediaType . IBM53FD_512 ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 1222400 :
2016-01-16 03:54:55 +00:00
return MediaType . IBM53FD_1024 ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 256256 :
// Same size, with same disk geometry, for DEC RX01, NEC and ECMA, return ECMA
2016-01-16 03:54:55 +00:00
return MediaType . ECMA_54 ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 512512 :
{
// DEC disk uses 256 bytes/sector
2016-04-19 02:11:47 +01:00
if ( ImageInfo . sectorSize = = 256 )
2016-01-16 03:54:55 +00:00
return MediaType . RX02 ;
2016-07-28 22:25:26 +01:00
// ECMA disks use 128 bytes/sector
return MediaType . ECMA_59 ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
}
case 1261568 :
2016-01-16 03:54:55 +00:00
return MediaType . NEC_8_DD ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 1255168 :
2016-01-16 03:54:55 +00:00
return MediaType . ECMA_69_8 ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 1177344 :
2016-01-16 03:54:55 +00:00
return MediaType . ECMA_69_15 ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
case 1021696 :
2016-01-16 03:54:55 +00:00
return MediaType . ECMA_69_26 ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
default :
{
2015-10-18 22:04:03 +01:00
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "Unknown 8\" disk with {0} bytes" , totalDiskSize ) ;
2016-01-16 03:54:55 +00:00
return MediaType . Unknown ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
}
}
}
default :
{
2015-10-18 22:04:03 +01:00
DicConsole . DebugWriteLine ( "TeleDisk plugin" , "Unknown drive type {1} with {0} bytes" , totalDiskSize , header . driveType ) ;
2016-01-16 03:54:55 +00:00
return MediaType . Unknown ;
* FileSystemIDandChk/ArrayFill.cs:
* FileSystemIDandChk/FileSystemIDandChk.csproj:
Added array filling class from mykohsu.
* FileSystemIDandChk/Main.cs:
Print disk type as identified by image plugin
* FileSystemIDandChk/ImagePlugins/ImagePlugin.cs:
Added more disk types
* FileSystemIDandChk/ImagePlugins/TeleDisk.cs:
Added link to Dave's document.
Completely implemented OpenImage() for standard
(non-compressed) teledisk images.
Implemented GetImageSize(), GetSectors(), GetSectorSize(),
ReadSectors(), GetImageVersion(),
GetImageApplicationVersion(), GetImageCreationTime(),
GetImageLastModificationtime(), GetImageName(),
GetDiskType(), data sector decoders.
* FileSystemIDandChk/TODO:
Discovered a filesystem specification present on ECMA-67.
Dunno if CP/M, FAT or a different one, must check.
Teledisk plugin is working, but lacks "advanced compression"
and variable sectors per track support.
2014-06-07 04:54:15 +01:00
}
}
2014-04-19 21:21:08 +01:00
}
2014-08-25 05:00:25 +01:00
2014-04-21 17:23:35 +01:00
#endregion
2014-04-19 21:21:08 +01:00
#region Unsupported features
2014-08-25 05:00:25 +01:00
2016-07-28 22:25:26 +01:00
public override byte [ ] ReadSectorTag ( ulong sectorAddress , SectorTagType tag )
2014-04-19 21:21:08 +01:00
{
throw new FeatureUnsupportedImageException ( "Feature not supported by image format" ) ;
}
2014-08-25 05:00:25 +01:00
2016-07-28 22:25:26 +01:00
public override byte [ ] ReadSectorsTag ( ulong sectorAddress , uint length , SectorTagType tag )
2014-04-19 21:21:08 +01:00
{
throw new FeatureUnsupportedImageException ( "Feature not supported by image format" ) ;
}
2014-08-25 05:00:25 +01:00
2016-01-16 03:54:55 +00:00
public override byte [ ] ReadDiskTag ( MediaTagType tag )
2014-04-19 21:21:08 +01:00
{
throw new FeatureUnsupportedImageException ( "Feature not supported by image format" ) ;
}
2014-08-25 05:00:25 +01:00
2014-04-19 21:21:08 +01:00
public override string GetImageCreator ( )
{
2014-08-28 19:29:18 +01:00
return ImageInfo . imageCreator ;
2014-04-19 21:21:08 +01:00
}
2014-08-25 05:00:25 +01:00
2016-04-19 02:11:47 +01:00
public override string GetImageComments ( )
2014-04-19 21:21:08 +01:00
{
2014-08-28 19:29:18 +01:00
return ImageInfo . imageComments ;
2014-04-19 21:21:08 +01:00
}
2014-08-25 05:00:25 +01:00
2016-04-19 02:11:47 +01:00
public override string GetMediaManufacturer ( )
2014-04-19 21:21:08 +01:00
{
2016-01-16 03:54:55 +00:00
return ImageInfo . mediaManufacturer ;
2014-04-19 21:21:08 +01:00
}
2014-08-25 05:00:25 +01:00
2016-04-19 02:11:47 +01:00
public override string GetMediaModel ( )
2014-04-19 21:21:08 +01:00
{
2016-01-16 03:54:55 +00:00
return ImageInfo . mediaModel ;
2014-04-19 21:21:08 +01:00
}
2014-08-25 05:00:25 +01:00
2016-04-19 02:11:47 +01:00
public override string GetMediaSerialNumber ( )
2014-04-19 21:21:08 +01:00
{
2016-01-16 03:54:55 +00:00
return ImageInfo . mediaSerialNumber ;
2014-04-19 21:21:08 +01:00
}
2014-08-25 05:00:25 +01:00
2016-04-19 02:11:47 +01:00
public override string GetMediaBarcode ( )
2014-04-19 21:21:08 +01:00
{
2016-01-16 03:54:55 +00:00
return ImageInfo . mediaBarcode ;
2014-04-19 21:21:08 +01:00
}
2014-08-25 05:00:25 +01:00
2016-04-19 02:11:47 +01:00
public override string GetMediaPartNumber ( )
2014-04-19 21:21:08 +01:00
{
2016-01-16 03:54:55 +00:00
return ImageInfo . mediaPartNumber ;
2014-04-19 21:21:08 +01:00
}
2014-08-25 05:00:25 +01:00
2016-04-19 02:11:47 +01:00
public override int GetMediaSequence ( )
2014-04-19 21:21:08 +01:00
{
2016-01-16 03:54:55 +00:00
return ImageInfo . mediaSequence ;
2014-04-19 21:21:08 +01:00
}
2014-08-25 05:00:25 +01:00
2016-04-19 02:11:47 +01:00
public override int GetLastDiskSequence ( )
2014-04-19 21:21:08 +01:00
{
2016-01-16 03:54:55 +00:00
return ImageInfo . lastMediaSequence ;
2014-04-19 21:21:08 +01:00
}
2014-08-25 05:00:25 +01:00
2014-04-19 21:21:08 +01:00
public override string GetDriveManufacturer ( )
{
2014-08-28 19:29:18 +01:00
return ImageInfo . driveManufacturer ;
2014-04-19 21:21:08 +01:00
}
2014-08-25 05:00:25 +01:00
2014-04-19 21:21:08 +01:00
public override string GetDriveModel ( )
{
2014-08-28 19:29:18 +01:00
return ImageInfo . driveModel ;
2014-04-19 21:21:08 +01:00
}
2014-08-25 05:00:25 +01:00
2014-04-19 21:21:08 +01:00
public override string GetDriveSerialNumber ( )
{
2014-08-28 19:29:18 +01:00
return ImageInfo . driveSerialNumber ;
2014-04-19 21:21:08 +01:00
}
2014-08-25 05:00:25 +01:00
2016-07-28 22:25:26 +01:00
public override List < Partition > GetPartitions ( )
2014-04-19 21:21:08 +01:00
{
throw new FeatureUnsupportedImageException ( "Feature not supported by image format" ) ;
}
2014-08-25 05:00:25 +01:00
2014-04-19 21:21:08 +01:00
public override List < Track > GetTracks ( )
{
throw new FeatureUnsupportedImageException ( "Feature not supported by image format" ) ;
}
2014-08-25 05:00:25 +01:00
2014-04-19 21:21:08 +01:00
public override List < Track > GetSessionTracks ( Session session )
{
throw new FeatureUnsupportedImageException ( "Feature not supported by image format" ) ;
}
2014-08-25 05:00:25 +01:00
2016-07-28 22:25:26 +01:00
public override List < Track > GetSessionTracks ( ushort session )
2014-04-19 21:21:08 +01:00
{
throw new FeatureUnsupportedImageException ( "Feature not supported by image format" ) ;
}
2014-08-25 05:00:25 +01:00
2014-04-19 21:21:08 +01:00
public override List < Session > GetSessions ( )
{
throw new FeatureUnsupportedImageException ( "Feature not supported by image format" ) ;
}
2014-08-25 05:00:25 +01:00
2016-07-28 22:25:26 +01:00
public override byte [ ] ReadSector ( ulong sectorAddress , uint track )
2014-04-19 21:21:08 +01:00
{
throw new FeatureUnsupportedImageException ( "Feature not supported by image format" ) ;
}
2014-08-25 05:00:25 +01:00
2016-07-28 22:25:26 +01:00
public override byte [ ] ReadSectorTag ( ulong sectorAddress , uint track , SectorTagType tag )
2014-04-19 21:21:08 +01:00
{
throw new FeatureUnsupportedImageException ( "Feature not supported by image format" ) ;
}
2014-08-25 05:00:25 +01:00
2016-07-28 22:25:26 +01:00
public override byte [ ] ReadSectors ( ulong sectorAddress , uint length , uint track )
2014-04-19 21:21:08 +01:00
{
throw new FeatureUnsupportedImageException ( "Feature not supported by image format" ) ;
}
2014-08-25 05:00:25 +01:00
2016-07-28 22:25:26 +01:00
public override byte [ ] ReadSectorsTag ( ulong sectorAddress , uint length , uint track , SectorTagType tag )
2014-04-19 21:21:08 +01:00
{
throw new FeatureUnsupportedImageException ( "Feature not supported by image format" ) ;
}
2014-08-25 05:00:25 +01:00
2016-07-28 22:25:26 +01:00
public override byte [ ] ReadSectorLong ( ulong sectorAddress , uint track )
2014-04-19 21:21:08 +01:00
{
throw new FeatureUnsupportedImageException ( "Feature not supported by image format" ) ;
}
2014-08-25 05:00:25 +01:00
2016-07-28 22:25:26 +01:00
public override byte [ ] ReadSectorsLong ( ulong sectorAddress , uint length , uint track )
2014-04-19 21:21:08 +01:00
{
throw new FeatureUnsupportedImageException ( "Feature not supported by image format" ) ;
}
2014-08-25 05:00:25 +01:00
2014-04-19 21:21:08 +01:00
#endregion Unsupported features
}
}