Skip to content

Commit

Permalink
Updated to 1.41
Browse files Browse the repository at this point in the history
  • Loading branch information
geraldholdsworth committed Apr 12, 2022
1 parent c87d8f4 commit 39b1b54
Show file tree
Hide file tree
Showing 52 changed files with 9,740 additions and 594 deletions.
24 changes: 24 additions & 0 deletions Documentation/Changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,30 @@ Bug fixes
* When saving an image, some filters where not added.
* The DOS part of a 640KB ADFS/DOS partition was not getting read correctly.

1.41 - 12th April 2022
----------------------
New or improved features
* Can now read and write FAT32 images.
* Changed the parameters put into the header for a 640KB DOS image extracted from a Master 512 hybrid image, and moved the image further along the image.
* Can now create FAT32 images.
* Improved the function to format DOS images to be closer to Microsoft's specification.
* Changed the format number and text for plain DOS images.
* Changed the logo appearing next to the DOS text in the status bar when plain DOS images are open.
* Changed the logo in the Image Details dialogue for plain DOS image to the Microsoft logo.
* Changed the DOS Filename validation to match the Microsoft specification of illegal characters.
* Added Long FileName support for DOS FAT12, FAT16 and FAT32 volumes, but not Master 512 DOS Plus.
* Changed the method of downloading (extracting) files from an image in that it will now fail if the requested file takes the pointer beyond the end of the image file.
* Changed the error reported on failure to download.
* Added extra command line options for creating new images: DOSFAT12, DOSFAT16 and DOSFAT32.
* Improved the detection of FAT12, FAT16 or FAT32, based on Microsoft spec.
* Added new filetypes, and extra filters on the Open Image dialogue box, for FAT12, FAT16 and FAT32.

Bug fixes
* The Hard Drive image creator dialogue box would not always produce an exact sized image. E.g., a 64MB image would not always be exactly 64MB in size.
* The correct directory separator is now used with ADFS/DOS hybrid images.
* Acorn/Watford DFS, Commodore 64, Acorn CFS and Spark images were being opened with the 'directory been read' flag not set, so appeared as if the directories were unread.
* DFS images were still not correctly being IDed.

Platform History
----------------

Expand Down
Binary file modified Documentation/Disc Image Manager User Guide.docx
Binary file not shown.
Binary file modified Documentation/Disc Image Manager User Guide.pdf
Binary file not shown.
19 changes: 7 additions & 12 deletions Documentation/ToDo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ In no particular order
Bugs
* Scaling - there is a report that icons 'grow' on scaled screens. I have been unable to reproduce this.
+ This appears to happen on Windows (and probably Linux), with single screen only (dual or more it does not do this), resolution of 1400 by anything (or more), and scaled to more than 100%. The icons in the Directory Listing grow as the mouse moves. - TO BE TESTED
* 'Bad FS Map' from BeebEm when loading an ADFS/AFS hybrid image after making a change to the ADFS partition. Unable to reproduce.
* Some SS DFS images are IDed as DS images when 'zero length images' is selected in the preferences.
* 'Bad FS Map' from BeebEm when loading an ADFS/AFS hybrid image after making a change to the ADFS partition. - UNABLE TO REPLICATE
* Some SS DFS images are IDed as DS images when 'Allow zero sectors' is selected in the preferences.
* Access violation has been reported when creating an ADFS HDD image (default options) on Windows. - UNABLE TO REPLICATE
* Does not work on Windows 11. - UNABLE TO REPLICATE

Expand All @@ -18,16 +18,14 @@ General
* Ask to force overwrite if many files are getting written.
* Export the contents of an open image to another image, or set of images if the selected format is too small or are more directory entries than the format allows.
* Cancel button for progress display?
* Side pane (left hand side) to allow separate images to be opened (REF:3).
* Use side panel for opening MMFS images and remove the code from TDiscImage (REF:3).
* Open multiple images at the same time and allow interaction between them (e.g. copying files from one to another).
* For macOS, change the settings being saved to the registry to being saved in a plist file, or within the application directory itself.
* Import an existing AFS or DOS image into ADFS as a new partition.
* Ablity to add/remove/delete partitions using the command line.

DFS

ADFS
* Change the size of the ADFS partition or image.
* Change the interleave on extracted ADFS 640K images.
* Import an existing AFS or DOS image into ADFS as a new partition.

AFS
* AFS0 images do not get created correctly (in particular the free space allocation maps) - AWAITING MORE INFO ON AFS FORMATS.
Expand All @@ -44,7 +42,7 @@ Spectrum/Amstrad
* Write entire module - REQUIRE MORE INFO ON SPECTRUM FORMAT.

MMFS
* Remove from TDiscImage and incorporate into GUI (REF:3).
* Rewrite/rethink entire MMFS idea. Possibly remove from Disc Image Manager.

Spark
* Create new archive.
Expand All @@ -54,7 +52,4 @@ Spark
* Delete file/directory.
* Move file.

DOS Plus
* There is a bug where if a filename begins with a '.' then this character does not get displayed.
* On ADFS/DOS hybrids, the directory separator is a '.', not a '\'.
* Support FAT32
DOS Plus
Binary file added Graphics/Image Details/Microsoft.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Graphics/Status Bar/MSDOS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 15 additions & 15 deletions LazarusSource/AboutUnit.lfm
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
Expand All @@ -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
Expand All @@ -42,7 +42,7 @@ object AboutForm: TAboutForm
object WrittenByLabel: TLabel
Left = 1
Height = 13
Top = 39
Top = 40
Width = 518
Align = alTop
Alignment = taCenter
Expand All @@ -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
Expand All @@ -71,7 +71,7 @@ object AboutForm: TAboutForm
object GHWebsiteLabel: TLabel
Left = 1
Height = 19
Top = 84
Top = 85
Width = 518
Align = alTop
Alignment = taCenter
Expand All @@ -86,7 +86,7 @@ object AboutForm: TAboutForm
object GitHubWebsiteLabel: TLabel
Left = 1
Height = 19
Top = 107
Top = 108
Width = 518
Align = alTop
Alignment = taCenter
Expand All @@ -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
Expand All @@ -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 gerald@hollypops.co.uk, 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
Expand All @@ -128,7 +128,7 @@ object AboutForm: TAboutForm
object GraphicsLabel: TLabel
Left = 1
Height = 13
Top = 52
Top = 53
Width = 518
Align = alTop
Alignment = taCenter
Expand All @@ -143,7 +143,7 @@ object AboutForm: TAboutForm
object IconImage: TImage
Left = 8
Height = 32
Top = 8
Top = 7
Width = 32
Anchors = []
Center = True
Expand Down
35 changes: 22 additions & 13 deletions LazarusSource/DiscImage.pas
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 gerald@hollypops.co.uk
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand All @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
51 changes: 28 additions & 23 deletions LazarusSource/DiscImageDOSFileTypes.pas
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'
);
4 changes: 2 additions & 2 deletions LazarusSource/DiscImageManager.lpi
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
<VersionInfo>
<UseVersionInfo Value="True"/>
<MajorVersionNr Value="1"/>
<MinorVersionNr Value="40"/>
<MinorVersionNr Value="41"/>
<Language Value="0809"/>
<StringTable CompanyName="GJH Software" FileDescription="Disc Image Manager for Acorn and Commodore disc formats" ProductName="Disc Image Manager" ProductVersion="1.40"/>
<StringTable CompanyName="GJH Software" FileDescription="Disc Image Manager for Acorn and Commodore disc formats" ProductName="Disc Image Manager" ProductVersion="1.41"/>
</VersionInfo>
<BuildModes Count="10">
<Item1 Name="Default" Default="True"/>
Expand Down
Loading

0 comments on commit 39b1b54

Please sign in to comment.