-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#57] Support for KryoFlux and associated images (Part 5: CT RAW imag…
…es, read-only at the moment)
- Loading branch information
1 parent
63f21ab
commit 4a6069e
Showing
5 changed files
with
94 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#include "stdafx.h" | ||
#include "CapsBase.h" | ||
#include "CtRaw.h" | ||
|
||
static LPCTSTR Recognize(PTCHAR){ | ||
static const char SingleDeviceName[]=_T("CT Raw\0"); | ||
return SingleDeviceName; | ||
} | ||
static PImage Instantiate(LPCTSTR){ | ||
return new CCtRaw; | ||
} | ||
const CImage::TProperties CCtRaw::Properties={ | ||
MAKE_IMAGE_ID('C','A','P','S','_','R','A','W'), // a unique identifier | ||
Recognize, // list of recognized device names | ||
Instantiate, // instantiation function | ||
_T("*.raw"), // filter | ||
TMedium::FLOPPY_ANY, // supported Media | ||
1,2*6144 // Sector supported min and max length | ||
}; | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
#define INI_CTRAW _T("CtRaw") | ||
|
||
CCtRaw::CCtRaw() | ||
// ctor | ||
// - base | ||
: CCapsBase(&Properties,true) { | ||
canBeModified=false; // modifications not possible at the moment | ||
} | ||
|
||
|
||
|
||
|
||
|
||
|
||
BOOL CCtRaw::OnSaveDocument(LPCTSTR lpszPathName){ | ||
// True <=> this Image has been successfully saved, otherwise False | ||
::SetLastError(ERROR_NOT_SUPPORTED); | ||
return FALSE; | ||
} | ||
|
||
TStdWinError CCtRaw::MarkSectorAsDirty(RCPhysicalAddress chs,BYTE nSectorsToSkip,PCFdcStatus pFdcStatus){ | ||
// marks Sector on a given PhysicalAddress as "dirty", plus sets it the given FdcStatus; returns Windows standard i/o error | ||
return ERROR_NOT_SUPPORTED; | ||
} | ||
|
||
TStdWinError CCtRaw::FormatTrack(TCylinder cyl,THead head,TSector nSectors,PCSectorId bufferId,PCWORD bufferLength,PCFdcStatus bufferFdcStatus,BYTE gap3,BYTE fillerByte){ | ||
// formats given Track {Cylinder,Head} to the requested NumberOfSectors, each with corresponding Length and FillerByte as initial content; returns Windows standard i/o error | ||
return ERROR_NOT_SUPPORTED; | ||
} | ||
|
||
TStdWinError CCtRaw::UnformatTrack(TCylinder cyl,THead head){ | ||
// unformats given Track {Cylinder,Head}; returns Windows standard i/o error | ||
return ERROR_NOT_SUPPORTED; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#ifndef CTRAW_H | ||
#define CTRAW_H | ||
|
||
class CCtRaw sealed:public CCapsBase{ | ||
public: | ||
static const TProperties Properties; | ||
|
||
CCtRaw(); | ||
|
||
//BOOL OnOpenDocument(LPCTSTR lpszPathName) override; | ||
BOOL OnSaveDocument(LPCTSTR lpszPathName) override; | ||
//TCylinder GetCylinderCount() const override; | ||
//THead GetNumberOfFormattedSides(TCylinder cyl) const override; | ||
//TSector ScanTrack(TCylinder cyl,THead head,PSectorId bufferId=nullptr,PWORD bufferLength=nullptr,PINT startTimesNanoseconds=nullptr,PBYTE pAvgGap3=nullptr) const override; | ||
//void GetTrackData(TCylinder cyl,THead head,PCSectorId bufferId,PCBYTE bufferNumbersOfSectorsToSkip,TSector nSectors,bool silentlyRecoverFromErrors,PSectorData *outBufferData,PWORD outBufferLengths,TFdcStatus *outFdcStatuses) override; | ||
TStdWinError MarkSectorAsDirty(RCPhysicalAddress chs,BYTE nSectorsToSkip,PCFdcStatus pFdcStatus) override; | ||
//TStdWinError SetMediumTypeAndGeometry(PCFormat pFormat,PCSide sideMap,TSector firstSectorNumber) override; | ||
//void EditSettings() override; | ||
//TStdWinError Reset() override; | ||
TStdWinError FormatTrack(TCylinder cyl,THead head,TSector nSectors,PCSectorId bufferId,PCWORD bufferLength,PCFdcStatus bufferFdcStatus,BYTE gap3,BYTE fillerByte) override; | ||
TStdWinError UnformatTrack(TCylinder cyl,THead head) override; | ||
}; | ||
|
||
#endif // CTRAW_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters