-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c87d8f4
commit 39b1b54
Showing
52 changed files
with
9,740 additions
and
594 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
Binary file not shown.
Binary file not shown.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
object AboutForm: TAboutForm | ||
Left = 433 | ||
Height = 306 | ||
Height = 294 | ||
Top = 227 | ||
Width = 520 | ||
AutoSize = True | ||
BorderIcons = [biSystemMenu] | ||
BorderStyle = bsDialog | ||
Caption = 'About' | ||
ClientHeight = 306 | ||
ClientHeight = 294 | ||
ClientWidth = 520 | ||
Color = 15527148 | ||
Font.Color = clWindowText | ||
|
@@ -16,18 +16,18 @@ object AboutForm: TAboutForm | |
LCLVersion = '2.2.0.4' | ||
object CreditsPanel: TPanel | ||
Left = 0 | ||
Height = 306 | ||
Height = 294 | ||
Top = 0 | ||
Width = 520 | ||
Align = alClient | ||
AutoSize = True | ||
ClientHeight = 306 | ||
ClientHeight = 294 | ||
ClientWidth = 520 | ||
TabOrder = 0 | ||
OnPaint = CreditsPanelPaint | ||
object lb_Title: TLabel | ||
Left = 1 | ||
Height = 38 | ||
Height = 39 | ||
Top = 1 | ||
Width = 518 | ||
Align = alTop | ||
|
@@ -42,7 +42,7 @@ object AboutForm: TAboutForm | |
object WrittenByLabel: TLabel | ||
Left = 1 | ||
Height = 13 | ||
Top = 39 | ||
Top = 40 | ||
Width = 518 | ||
Align = alTop | ||
Alignment = taCenter | ||
|
@@ -57,7 +57,7 @@ object AboutForm: TAboutForm | |
object lb_Version: TLabel | ||
Left = 1 | ||
Height = 19 | ||
Top = 65 | ||
Top = 66 | ||
Width = 518 | ||
Align = alTop | ||
Alignment = taCenter | ||
|
@@ -71,7 +71,7 @@ object AboutForm: TAboutForm | |
object GHWebsiteLabel: TLabel | ||
Left = 1 | ||
Height = 19 | ||
Top = 84 | ||
Top = 85 | ||
Width = 518 | ||
Align = alTop | ||
Alignment = taCenter | ||
|
@@ -86,7 +86,7 @@ object AboutForm: TAboutForm | |
object GitHubWebsiteLabel: TLabel | ||
Left = 1 | ||
Height = 19 | ||
Top = 107 | ||
Top = 108 | ||
Width = 518 | ||
Align = alTop | ||
Alignment = taCenter | ||
|
@@ -100,8 +100,8 @@ object AboutForm: TAboutForm | |
end | ||
object LicenceLabel: TLabel | ||
Left = 1 | ||
Height = 14 | ||
Top = 130 | ||
Height = 13 | ||
Top = 131 | ||
Width = 518 | ||
Align = alTop | ||
Alignment = taCenter | ||
|
@@ -114,12 +114,12 @@ object AboutForm: TAboutForm | |
end | ||
object AckLabel: TLabel | ||
Left = 1 | ||
Height = 204 | ||
Height = 208 | ||
Top = 144 | ||
Width = 518 | ||
Align = alTop | ||
Alignment = taCenter | ||
Caption = 'Many thanks to the users and contributors of the Stardot forum whose feedback and advice has been greatly appreciated. Also a big thank you to Jasper Renow-Clark who helped me with the ADFS formats in the beginning, before this project started.'#10'This project was concieved as a module to the Repton Map Display application, with this application just being a demo (and for me to try the code out with). In December 2020, it became the Disc Image Manager.'#10'Additional thanks go to Robert Sprowson for his help with working out the parameters for ADFS Hard Drive images, and to David Pilling for his help with the Spark module.'#10'Suggestions, bug reports, or whatever please do not hesitate to email me on [email protected], or contact via Stardot forum.' | ||
Caption = 'Liability Disclaimer: While I, Gerald Holdsworth, make every effort to deliver high quality products, I do not guarantee that my software is free from defects. My software is provided "as is," and you use my software at your own risk.'#10#10'I make no warranties as to performance, merchantability, fitness for a particular purpose, or any other warranties whether expressed or implied.'#10#10'No oral or written communication from or information provided by myself, Gerald Holdsworth, shall create a warranty.'#10#10'Under no circumstances shall I, Gerald Holdsworth, be liable for direct, indirect, special, incidental, or consequential damages resulting from the use, misuse, or inability to use this software, even if I have been advised of the possibility of such damages.' | ||
Font.Color = clWindowText | ||
Font.Name = 'Tahoma' | ||
ParentFont = False | ||
|
@@ -128,7 +128,7 @@ object AboutForm: TAboutForm | |
object GraphicsLabel: TLabel | ||
Left = 1 | ||
Height = 13 | ||
Top = 52 | ||
Top = 53 | ||
Width = 518 | ||
Align = alTop | ||
Alignment = taCenter | ||
|
@@ -143,7 +143,7 @@ object AboutForm: TAboutForm | |
object IconImage: TImage | ||
Left = 8 | ||
Height = 32 | ||
Top = 8 | ||
Top = 7 | ||
Width = 32 | ||
Anchors = [] | ||
Center = True | ||
|
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 |
---|---|---|
@@ -1,11 +1,12 @@ | ||
unit DiscImage; | ||
|
||
{ | ||
TDiscImage class V1.40 | ||
TDiscImage class V1.41 | ||
Manages retro disc images, presenting a list of files and directories to the | ||
parent application. Will also extract files and write new files. Almost a complete | ||
filing system in itself. Compatible with Acorn DFS, Acorn ADFS, UEF, Commodore | ||
1541, Commodore 1571, Commodore 1581, and Commodore AmigaDOS. | ||
1541, Commodore 1571, Commodore 1581, Commodore AmigaDOS, Acorn File Server, | ||
SparkFS, PackDir, MS-DOS, and Acorn DOS Plus. | ||
Copyright (C) 2018-2022 Gerald Holdsworth [email protected] | ||
|
@@ -81,7 +82,9 @@ TFragment = record //For retrieving the ADFS E/F fragment informati | |
FDFSzerosecs, //Allow zero length disc images for DFS? | ||
FDFSAllowBlank, //Allow blank filenames | ||
FDFSBeyondEdge, //Check for files going beyond the DFS disc edge | ||
FScanSubDirs : Boolean; //Scan sub directories on opening (ADFS/Amiga/DOS/Spark) | ||
FDOSVolInRoot, //Volume name is stored in the root (DOS) | ||
FScanSubDirs, //Scan sub directories on opening (ADFS/Amiga/DOS/Spark) | ||
FDOSUseSFN : Boolean; //Use short filenames, even if there are long filenames (DOS) | ||
secsize, //Sector Size | ||
bpmb, //Bits Per Map Bit (Acorn ADFS New) | ||
dosalloc, //Allocation Unit (DOS Plus) | ||
|
@@ -93,6 +96,7 @@ TFragment = record //For retrieving the ADFS E/F fragment informati | |
afshead, //Address of the AFS header | ||
afshead2, //Address of the AFS header copy | ||
doshead, //Address of the DOS Plus header, if exists | ||
doshead2, //Address of the backup DOS header, if exists (FAT32) | ||
dosmap, //Address of the DOS Plus FAT | ||
dosmap2, //Address of the second DOS Plus FAT (if applicable) | ||
bootmap, //Offset of the map (Acorn ADFS) | ||
|
@@ -109,6 +113,7 @@ TFragment = record //For retrieving the ADFS E/F fragment informati | |
brokendircount, //Number of broken directories (ADFS) | ||
FMaxDirEnt : Cardinal; //Maximum number of directory entries in image | ||
DOSFATSize, //Size of DOS Plus FAT in blocks | ||
DOSResSecs, //Number of reserved blocks | ||
FFormat : Word; //Format of the image | ||
FForceInter, //What to do about ADFS L/AFS Interleaving | ||
Finterleave, //Interleave method (1=seq,2=int,3=mux) | ||
|
@@ -123,6 +128,7 @@ TFragment = record //For retrieving the ADFS E/F fragment informati | |
share_size, //Share size (Acorn ADFS New) | ||
big_flag, //Big flag (Acorn ADFS New) | ||
FATType, //FAT Type - 12: FAT12, 16: FAT16, 32: FAT32 | ||
DOSVersion, //Version of DOS being used (0, $28 or $29) | ||
NumFATs : Byte; //Number of FATs in a DOS Plus image | ||
root_name, //Root title | ||
dosrootname, //DOS Plus root name | ||
|
@@ -131,7 +137,7 @@ TFragment = record //For retrieving the ADFS E/F fragment informati | |
dir_sep : Char; //Directory Separator | ||
free_space_map: TSide; //Free Space Map | ||
disc_size, //Disc size per partition | ||
free_space : array of Int64;//Free space per partition | ||
free_space : array of QWord;//Free space per partition | ||
disc_name : array of String;//Disc title(s) | ||
bootoption : TDIByteArray; //Boot Option(s) | ||
CFSFiles : array of TDIByteArray;//All the data for the CFS files | ||
|
@@ -190,6 +196,7 @@ TFragment = record //For retrieving the ADFS E/F fragment informati | |
function GetRootAddress: Cardinal; | ||
function Inflate(filename: String): TDIByteArray; | ||
function InterleaveString: String; | ||
function VolumeSerialNumber: Cardinal; | ||
//ADFS Routines | ||
function ID_ADFS: Boolean; | ||
function ReadADFSDir(dirname: String; sector: Cardinal): TDir; | ||
|
@@ -393,7 +400,7 @@ TFragment = record //For retrieving the ADFS E/F fragment informati | |
procedure ReadDOSFSM; | ||
function DOSGetFreeSectors(used: Boolean=False): TFragmentArray; | ||
function RenameDOSFile(oldname:String;var newname: String): Integer; | ||
function ValidateDOSFilename(filename: String): String; | ||
function ValidateDOSFilename(filename: String;long: Boolean=False): String; | ||
procedure UpdateDOSDirectory(dirname: String); | ||
procedure AllocateDOSClusters(len:Cardinal;var fragments:TFragmentArray); | ||
procedure DeAllocateDOSClusters(len:Cardinal;var fragments:TFragmentArray); | ||
|
@@ -408,11 +415,13 @@ TFragment = record //For retrieving the ADFS E/F fragment informati | |
function UpdateDOSDiscTitle(title: String): Boolean; | ||
function UpdateDOSTimeStamp(filename:String;newtimedate:TDateTime):Boolean; | ||
function AddDOSPartition(size: Cardinal): Boolean; | ||
function FormatDOS(size: Cardinal;fat: Byte): TDisc; | ||
procedure WriteDOSHeader(offset, size: Cardinal;fat: Byte;bootable: Boolean); | ||
procedure WriteDOSHeader(offset, size: Cardinal;fat: Byte;bootable: Boolean; | ||
buffer:TDIByteArray);overload; | ||
function FormatDOS(size: QWord;fat: Byte): TDisc; | ||
procedure WriteDOSHeader(offset, size: QWord;fat: Byte;bootable: Boolean); | ||
procedure WriteDOSHeader(offset, size: QWord;fat: Byte;bootable: Boolean; | ||
var buffer:TDIByteArray);overload; | ||
function MoveDOSFile(filename,directory: String): Integer; | ||
function DOSShortFilename(path,LFN: String;SFN :String=''): String; | ||
function BuildDOSFilename(f,e: String): String; | ||
//Private constants | ||
const | ||
//When the change of number of sectors occurs on Commodore 1541/1571 discs | ||
|
@@ -443,8 +452,8 @@ TFragment = record //For retrieving the ADFS E/F fragment informati | |
function FormatHDD(major:Word;harddrivesize:Cardinal;newmap:Boolean;dirtype:Byte):Boolean; | ||
function ExtractFile(filename:String;var buffer:TDIByteArray;entry:Cardinal=0): Boolean; | ||
function WriteFile(var file_details: TDirEntry; var buffer: TDIByteArray): Integer; | ||
function FileExists(filename: String;var Ref: Cardinal): Boolean; | ||
function FileExists(filename: String;var dir,entry: Cardinal): Boolean; overload; | ||
function FileExists(filename: String;var Ref: Cardinal;sfn: Boolean=False): Boolean; | ||
function FileExists(filename: String;var dir,entry: Cardinal;sfn: Boolean=False): Boolean; overload; | ||
function ReadDiscData(addr,count,side,offset: Cardinal; | ||
var buffer: TDIByteArray): Boolean; | ||
function WriteDiscData(addr,side: Cardinal;var buffer: TDIByteArray; | ||
|
@@ -474,8 +483,8 @@ TFragment = record //For retrieving the ADFS E/F fragment informati | |
procedure BeginUpdate; | ||
procedure EndUpdate; | ||
function ValidateFilename(parent:String;var filename:String): Boolean; | ||
function DiscSize(partition: Cardinal):Int64; | ||
function FreeSpace(partition: Cardinal):Int64; | ||
function DiscSize(partition: QWord):QWord; | ||
function FreeSpace(partition: QWord):QWord; | ||
function Title(partition: Cardinal):String; | ||
function CreatePasswordFile(Accounts: TUserAccounts): Integer; | ||
function ReadPasswordFile: TUserAccounts; | ||
|
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 |
---|---|---|
@@ -1,24 +1,29 @@ | ||
DOSFileTypes: array[1..23] of String = ( | ||
'sysWindows System', | ||
'cmdWindows Command', | ||
'datData', | ||
'exeExecutable', | ||
'comDOS Command', | ||
'batBatch', | ||
'hlpWindows Help', | ||
'appFoxPro Generated Application', | ||
'rscResource', | ||
'fmtFoxPro Format', | ||
'infSetup Information', | ||
'patPattern', | ||
'accGEM Accessory', | ||
'icnWindows Icon', | ||
'fntWindows Font', | ||
'docWord Document', | ||
'gemGEM Metafile', | ||
'imgGEM Image', | ||
'txtText', | ||
'$$$Temporary', | ||
'iniWindows Initialisation', | ||
'binBinary', | ||
'cfgConfiguration'); | ||
'sysWindows System', | ||
'cmdWindows Command', | ||
'datData', | ||
'exeExecutable', | ||
'comDOS Command', | ||
'batBatch', | ||
'hlpWindows Help', | ||
'appFoxPro Generated Application', | ||
'rscResource', | ||
'fmtFoxPro Format', | ||
'infSetup Information', | ||
'patPattern', | ||
'accGEM Accessory', | ||
'icnWindows Icon', | ||
'fntWindows Font', | ||
'docWord Document', | ||
'gemGEM Metafile', | ||
'imgGEM Image', | ||
'txtText', | ||
'$$$Temporary', | ||
'iniWindows Initialisation', | ||
'binBinary', | ||
'cfgConfiguration'); | ||
DOSSFNtoLFN: array[1..3] of string = ( | ||
'jpgjpeg', | ||
'docdocx', | ||
'icnicon' | ||
); |
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
Oops, something went wrong.