Skip to content

Commit 39b1b54

Browse files
Updated to 1.41
1 parent c87d8f4 commit 39b1b54

52 files changed

Lines changed: 9740 additions & 594 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Documentation/Changes.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -803,6 +803,30 @@ Bug fixes
803803
* When saving an image, some filters where not added.
804804
* The DOS part of a 640KB ADFS/DOS partition was not getting read correctly.
805805

806+
1.41 - 12th April 2022
807+
----------------------
808+
New or improved features
809+
* Can now read and write FAT32 images.
810+
* 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.
811+
* Can now create FAT32 images.
812+
* Improved the function to format DOS images to be closer to Microsoft's specification.
813+
* Changed the format number and text for plain DOS images.
814+
* Changed the logo appearing next to the DOS text in the status bar when plain DOS images are open.
815+
* Changed the logo in the Image Details dialogue for plain DOS image to the Microsoft logo.
816+
* Changed the DOS Filename validation to match the Microsoft specification of illegal characters.
817+
* Added Long FileName support for DOS FAT12, FAT16 and FAT32 volumes, but not Master 512 DOS Plus.
818+
* 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.
819+
* Changed the error reported on failure to download.
820+
* Added extra command line options for creating new images: DOSFAT12, DOSFAT16 and DOSFAT32.
821+
* Improved the detection of FAT12, FAT16 or FAT32, based on Microsoft spec.
822+
* Added new filetypes, and extra filters on the Open Image dialogue box, for FAT12, FAT16 and FAT32.
823+
824+
Bug fixes
825+
* 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.
826+
* The correct directory separator is now used with ADFS/DOS hybrid images.
827+
* 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.
828+
* DFS images were still not correctly being IDed.
829+
806830
Platform History
807831
----------------
808832

1.25 KB
Binary file not shown.
7.18 KB
Binary file not shown.

Documentation/ToDo.txt

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ In no particular order
55
Bugs
66
* Scaling - there is a report that icons 'grow' on scaled screens. I have been unable to reproduce this.
77
+ 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
8-
* 'Bad FS Map' from BeebEm when loading an ADFS/AFS hybrid image after making a change to the ADFS partition. Unable to reproduce.
9-
* Some SS DFS images are IDed as DS images when 'zero length images' is selected in the preferences.
8+
* 'Bad FS Map' from BeebEm when loading an ADFS/AFS hybrid image after making a change to the ADFS partition. - UNABLE TO REPLICATE
9+
* Some SS DFS images are IDed as DS images when 'Allow zero sectors' is selected in the preferences.
1010
* Access violation has been reported when creating an ADFS HDD image (default options) on Windows. - UNABLE TO REPLICATE
1111
* Does not work on Windows 11. - UNABLE TO REPLICATE
1212

@@ -18,16 +18,14 @@ General
1818
* Ask to force overwrite if many files are getting written.
1919
* 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.
2020
* Cancel button for progress display?
21-
* Side pane (left hand side) to allow separate images to be opened (REF:3).
22-
* Use side panel for opening MMFS images and remove the code from TDiscImage (REF:3).
21+
* Open multiple images at the same time and allow interaction between them (e.g. copying files from one to another).
2322
* For macOS, change the settings being saved to the registry to being saved in a plist file, or within the application directory itself.
24-
* Import an existing AFS or DOS image into ADFS as a new partition.
23+
* Ablity to add/remove/delete partitions using the command line.
2524

2625
DFS
2726

2827
ADFS
29-
* Change the size of the ADFS partition or image.
30-
* Change the interleave on extracted ADFS 640K images.
28+
* Import an existing AFS or DOS image into ADFS as a new partition.
3129

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

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

4947
Spark
5048
* Create new archive.
@@ -54,7 +52,4 @@ Spark
5452
* Delete file/directory.
5553
* Move file.
5654

57-
DOS Plus
58-
* There is a bug where if a filename begins with a '.' then this character does not get displayed.
59-
* On ADFS/DOS hybrids, the directory separator is a '.', not a '\'.
60-
* Support FAT32
55+
DOS Plus
269 KB
Loading

Graphics/Status Bar/MSDOS.png

1.42 KB
Loading

LazarusSource/AboutUnit.lfm

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
object AboutForm: TAboutForm
22
Left = 433
3-
Height = 306
3+
Height = 294
44
Top = 227
55
Width = 520
66
AutoSize = True
77
BorderIcons = [biSystemMenu]
88
BorderStyle = bsDialog
99
Caption = 'About'
10-
ClientHeight = 306
10+
ClientHeight = 294
1111
ClientWidth = 520
1212
Color = 15527148
1313
Font.Color = clWindowText
@@ -16,18 +16,18 @@ object AboutForm: TAboutForm
1616
LCLVersion = '2.2.0.4'
1717
object CreditsPanel: TPanel
1818
Left = 0
19-
Height = 306
19+
Height = 294
2020
Top = 0
2121
Width = 520
2222
Align = alClient
2323
AutoSize = True
24-
ClientHeight = 306
24+
ClientHeight = 294
2525
ClientWidth = 520
2626
TabOrder = 0
2727
OnPaint = CreditsPanelPaint
2828
object lb_Title: TLabel
2929
Left = 1
30-
Height = 38
30+
Height = 39
3131
Top = 1
3232
Width = 518
3333
Align = alTop
@@ -42,7 +42,7 @@ object AboutForm: TAboutForm
4242
object WrittenByLabel: TLabel
4343
Left = 1
4444
Height = 13
45-
Top = 39
45+
Top = 40
4646
Width = 518
4747
Align = alTop
4848
Alignment = taCenter
@@ -57,7 +57,7 @@ object AboutForm: TAboutForm
5757
object lb_Version: TLabel
5858
Left = 1
5959
Height = 19
60-
Top = 65
60+
Top = 66
6161
Width = 518
6262
Align = alTop
6363
Alignment = taCenter
@@ -71,7 +71,7 @@ object AboutForm: TAboutForm
7171
object GHWebsiteLabel: TLabel
7272
Left = 1
7373
Height = 19
74-
Top = 84
74+
Top = 85
7575
Width = 518
7676
Align = alTop
7777
Alignment = taCenter
@@ -86,7 +86,7 @@ object AboutForm: TAboutForm
8686
object GitHubWebsiteLabel: TLabel
8787
Left = 1
8888
Height = 19
89-
Top = 107
89+
Top = 108
9090
Width = 518
9191
Align = alTop
9292
Alignment = taCenter
@@ -100,8 +100,8 @@ object AboutForm: TAboutForm
100100
end
101101
object LicenceLabel: TLabel
102102
Left = 1
103-
Height = 14
104-
Top = 130
103+
Height = 13
104+
Top = 131
105105
Width = 518
106106
Align = alTop
107107
Alignment = taCenter
@@ -114,12 +114,12 @@ object AboutForm: TAboutForm
114114
end
115115
object AckLabel: TLabel
116116
Left = 1
117-
Height = 204
117+
Height = 208
118118
Top = 144
119119
Width = 518
120120
Align = alTop
121121
Alignment = taCenter
122-
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.'
122+
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.'
123123
Font.Color = clWindowText
124124
Font.Name = 'Tahoma'
125125
ParentFont = False
@@ -128,7 +128,7 @@ object AboutForm: TAboutForm
128128
object GraphicsLabel: TLabel
129129
Left = 1
130130
Height = 13
131-
Top = 52
131+
Top = 53
132132
Width = 518
133133
Align = alTop
134134
Alignment = taCenter
@@ -143,7 +143,7 @@ object AboutForm: TAboutForm
143143
object IconImage: TImage
144144
Left = 8
145145
Height = 32
146-
Top = 8
146+
Top = 7
147147
Width = 32
148148
Anchors = []
149149
Center = True

LazarusSource/DiscImage.pas

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
unit DiscImage;
22

33
{
4-
TDiscImage class V1.40
4+
TDiscImage class V1.41
55
Manages retro disc images, presenting a list of files and directories to the
66
parent application. Will also extract files and write new files. Almost a complete
77
filing system in itself. Compatible with Acorn DFS, Acorn ADFS, UEF, Commodore
8-
1541, Commodore 1571, Commodore 1581, and Commodore AmigaDOS.
8+
1541, Commodore 1571, Commodore 1581, Commodore AmigaDOS, Acorn File Server,
9+
SparkFS, PackDir, MS-DOS, and Acorn DOS Plus.
910
1011
Copyright (C) 2018-2022 Gerald Holdsworth gerald@hollypops.co.uk
1112
@@ -81,7 +82,9 @@ TFragment = record //For retrieving the ADFS E/F fragment informati
8182
FDFSzerosecs, //Allow zero length disc images for DFS?
8283
FDFSAllowBlank, //Allow blank filenames
8384
FDFSBeyondEdge, //Check for files going beyond the DFS disc edge
84-
FScanSubDirs : Boolean; //Scan sub directories on opening (ADFS/Amiga/DOS/Spark)
85+
FDOSVolInRoot, //Volume name is stored in the root (DOS)
86+
FScanSubDirs, //Scan sub directories on opening (ADFS/Amiga/DOS/Spark)
87+
FDOSUseSFN : Boolean; //Use short filenames, even if there are long filenames (DOS)
8588
secsize, //Sector Size
8689
bpmb, //Bits Per Map Bit (Acorn ADFS New)
8790
dosalloc, //Allocation Unit (DOS Plus)
@@ -93,6 +96,7 @@ TFragment = record //For retrieving the ADFS E/F fragment informati
9396
afshead, //Address of the AFS header
9497
afshead2, //Address of the AFS header copy
9598
doshead, //Address of the DOS Plus header, if exists
99+
doshead2, //Address of the backup DOS header, if exists (FAT32)
96100
dosmap, //Address of the DOS Plus FAT
97101
dosmap2, //Address of the second DOS Plus FAT (if applicable)
98102
bootmap, //Offset of the map (Acorn ADFS)
@@ -109,6 +113,7 @@ TFragment = record //For retrieving the ADFS E/F fragment informati
109113
brokendircount, //Number of broken directories (ADFS)
110114
FMaxDirEnt : Cardinal; //Maximum number of directory entries in image
111115
DOSFATSize, //Size of DOS Plus FAT in blocks
116+
DOSResSecs, //Number of reserved blocks
112117
FFormat : Word; //Format of the image
113118
FForceInter, //What to do about ADFS L/AFS Interleaving
114119
Finterleave, //Interleave method (1=seq,2=int,3=mux)
@@ -123,6 +128,7 @@ TFragment = record //For retrieving the ADFS E/F fragment informati
123128
share_size, //Share size (Acorn ADFS New)
124129
big_flag, //Big flag (Acorn ADFS New)
125130
FATType, //FAT Type - 12: FAT12, 16: FAT16, 32: FAT32
131+
DOSVersion, //Version of DOS being used (0, $28 or $29)
126132
NumFATs : Byte; //Number of FATs in a DOS Plus image
127133
root_name, //Root title
128134
dosrootname, //DOS Plus root name
@@ -131,7 +137,7 @@ TFragment = record //For retrieving the ADFS E/F fragment informati
131137
dir_sep : Char; //Directory Separator
132138
free_space_map: TSide; //Free Space Map
133139
disc_size, //Disc size per partition
134-
free_space : array of Int64;//Free space per partition
140+
free_space : array of QWord;//Free space per partition
135141
disc_name : array of String;//Disc title(s)
136142
bootoption : TDIByteArray; //Boot Option(s)
137143
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
190196
function GetRootAddress: Cardinal;
191197
function Inflate(filename: String): TDIByteArray;
192198
function InterleaveString: String;
199+
function VolumeSerialNumber: Cardinal;
193200
//ADFS Routines
194201
function ID_ADFS: Boolean;
195202
function ReadADFSDir(dirname: String; sector: Cardinal): TDir;
@@ -393,7 +400,7 @@ TFragment = record //For retrieving the ADFS E/F fragment informati
393400
procedure ReadDOSFSM;
394401
function DOSGetFreeSectors(used: Boolean=False): TFragmentArray;
395402
function RenameDOSFile(oldname:String;var newname: String): Integer;
396-
function ValidateDOSFilename(filename: String): String;
403+
function ValidateDOSFilename(filename: String;long: Boolean=False): String;
397404
procedure UpdateDOSDirectory(dirname: String);
398405
procedure AllocateDOSClusters(len:Cardinal;var fragments:TFragmentArray);
399406
procedure DeAllocateDOSClusters(len:Cardinal;var fragments:TFragmentArray);
@@ -408,11 +415,13 @@ TFragment = record //For retrieving the ADFS E/F fragment informati
408415
function UpdateDOSDiscTitle(title: String): Boolean;
409416
function UpdateDOSTimeStamp(filename:String;newtimedate:TDateTime):Boolean;
410417
function AddDOSPartition(size: Cardinal): Boolean;
411-
function FormatDOS(size: Cardinal;fat: Byte): TDisc;
412-
procedure WriteDOSHeader(offset, size: Cardinal;fat: Byte;bootable: Boolean);
413-
procedure WriteDOSHeader(offset, size: Cardinal;fat: Byte;bootable: Boolean;
414-
buffer:TDIByteArray);overload;
418+
function FormatDOS(size: QWord;fat: Byte): TDisc;
419+
procedure WriteDOSHeader(offset, size: QWord;fat: Byte;bootable: Boolean);
420+
procedure WriteDOSHeader(offset, size: QWord;fat: Byte;bootable: Boolean;
421+
var buffer:TDIByteArray);overload;
415422
function MoveDOSFile(filename,directory: String): Integer;
423+
function DOSShortFilename(path,LFN: String;SFN :String=''): String;
424+
function BuildDOSFilename(f,e: String): String;
416425
//Private constants
417426
const
418427
//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
443452
function FormatHDD(major:Word;harddrivesize:Cardinal;newmap:Boolean;dirtype:Byte):Boolean;
444453
function ExtractFile(filename:String;var buffer:TDIByteArray;entry:Cardinal=0): Boolean;
445454
function WriteFile(var file_details: TDirEntry; var buffer: TDIByteArray): Integer;
446-
function FileExists(filename: String;var Ref: Cardinal): Boolean;
447-
function FileExists(filename: String;var dir,entry: Cardinal): Boolean; overload;
455+
function FileExists(filename: String;var Ref: Cardinal;sfn: Boolean=False): Boolean;
456+
function FileExists(filename: String;var dir,entry: Cardinal;sfn: Boolean=False): Boolean; overload;
448457
function ReadDiscData(addr,count,side,offset: Cardinal;
449458
var buffer: TDIByteArray): Boolean;
450459
function WriteDiscData(addr,side: Cardinal;var buffer: TDIByteArray;
@@ -474,8 +483,8 @@ TFragment = record //For retrieving the ADFS E/F fragment informati
474483
procedure BeginUpdate;
475484
procedure EndUpdate;
476485
function ValidateFilename(parent:String;var filename:String): Boolean;
477-
function DiscSize(partition: Cardinal):Int64;
478-
function FreeSpace(partition: Cardinal):Int64;
486+
function DiscSize(partition: QWord):QWord;
487+
function FreeSpace(partition: QWord):QWord;
479488
function Title(partition: Cardinal):String;
480489
function CreatePasswordFile(Accounts: TUserAccounts): Integer;
481490
function ReadPasswordFile: TUserAccounts;
Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
11
DOSFileTypes: array[1..23] of String = (
2-
'sysWindows System',
3-
'cmdWindows Command',
4-
'datData',
5-
'exeExecutable',
6-
'comDOS Command',
7-
'batBatch',
8-
'hlpWindows Help',
9-
'appFoxPro Generated Application',
10-
'rscResource',
11-
'fmtFoxPro Format',
12-
'infSetup Information',
13-
'patPattern',
14-
'accGEM Accessory',
15-
'icnWindows Icon',
16-
'fntWindows Font',
17-
'docWord Document',
18-
'gemGEM Metafile',
19-
'imgGEM Image',
20-
'txtText',
21-
'$$$Temporary',
22-
'iniWindows Initialisation',
23-
'binBinary',
24-
'cfgConfiguration');
2+
'sysWindows System',
3+
'cmdWindows Command',
4+
'datData',
5+
'exeExecutable',
6+
'comDOS Command',
7+
'batBatch',
8+
'hlpWindows Help',
9+
'appFoxPro Generated Application',
10+
'rscResource',
11+
'fmtFoxPro Format',
12+
'infSetup Information',
13+
'patPattern',
14+
'accGEM Accessory',
15+
'icnWindows Icon',
16+
'fntWindows Font',
17+
'docWord Document',
18+
'gemGEM Metafile',
19+
'imgGEM Image',
20+
'txtText',
21+
'$$$Temporary',
22+
'iniWindows Initialisation',
23+
'binBinary',
24+
'cfgConfiguration');
25+
DOSSFNtoLFN: array[1..3] of string = (
26+
'jpgjpeg',
27+
'docdocx',
28+
'icnicon'
29+
);

LazarusSource/DiscImageManager.lpi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
<VersionInfo>
2222
<UseVersionInfo Value="True"/>
2323
<MajorVersionNr Value="1"/>
24-
<MinorVersionNr Value="40"/>
24+
<MinorVersionNr Value="41"/>
2525
<Language Value="0809"/>
26-
<StringTable CompanyName="GJH Software" FileDescription="Disc Image Manager for Acorn and Commodore disc formats" ProductName="Disc Image Manager" ProductVersion="1.40"/>
26+
<StringTable CompanyName="GJH Software" FileDescription="Disc Image Manager for Acorn and Commodore disc formats" ProductName="Disc Image Manager" ProductVersion="1.41"/>
2727
</VersionInfo>
2828
<BuildModes Count="10">
2929
<Item1 Name="Default" Default="True"/>

0 commit comments

Comments
 (0)