forked from geraldholdsworth/DiscImageManager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDiscImage_Spectrum.pas
85 lines (76 loc) · 3.01 KB
/
DiscImage_Spectrum.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
//++++++++++++++++++ Sinclair Spectrum +3/Amstrad ++++++++++++++++++++++++++++++
{-------------------------------------------------------------------------------
Identifies a Spectrum disc
-------------------------------------------------------------------------------}
function TDiscImage.ID_Sinclair: Boolean;
begin
Result:=False;
if FFormat=diInvalidImg then
begin
if GetDataLength>0 then
begin
if ReadString(0,-6)='MV-CPC' then FFormat:=$30;
if ReadString(0,-8)='EXTENDED' then FFormat:=$31;
Result:=FFormat<>$FF;
end;
end;
end;
{-------------------------------------------------------------------------------
Read Spectrum Disc
-------------------------------------------------------------------------------}
function TDiscImage.ReadSinclairDisc: Boolean;
begin
Result:=False;
{This functionality is not written yet}
end;
{-------------------------------------------------------------------------------
Write a file to Spectrum image
-------------------------------------------------------------------------------}
function TDiscImage.WriteSpectrumFile(file_details: TDirEntry;
var buffer: TDIByteArray): Integer;
begin
Result:=-1;
end;
{-------------------------------------------------------------------------------
Create a new Spectrum image
-------------------------------------------------------------------------------}
function TDiscImage.FormatSpectrum(minor: Byte): Boolean;
begin
Result:=False;
end;
{-------------------------------------------------------------------------------
Rename a Spectrum file
-------------------------------------------------------------------------------}
function TDiscImage.RenameSpectrumFile(oldfilename: String;var newfilename: String):Integer;
begin
Result:=-6; //Unsupported in this format
end;
{-------------------------------------------------------------------------------
Delete a Spectrum file
-------------------------------------------------------------------------------}
function TDiscImage.DeleteSinclairFile(filename: String):Boolean;
begin
Result:=False;
end;
{-------------------------------------------------------------------------------
Update attributes on a Spectrum file
-------------------------------------------------------------------------------}
function TDiscImage.UpdateSinclairFileAttributes(filename,attributes: String):Boolean;
begin
Result:=False;
end;
{-------------------------------------------------------------------------------
Change the disc title for a Spectrum disc
-------------------------------------------------------------------------------}
function TDiscImage.UpdateSinclairDiscTitle(title: String): Boolean;
begin
Result:=False;
end;
{-------------------------------------------------------------------------------
Extract a file from a Spectrum image
-------------------------------------------------------------------------------}
function TDiscImage.ExtractSpectrumFile(filename: String;
var buffer: TDIByteArray): Boolean;
begin
Result:=False;
end;