Skip to content

Commit c87d8f4

Browse files
Updated to 1.40
1 parent 388e83b commit c87d8f4

36 files changed

Lines changed: 1430 additions & 539 deletions

Documentation/Changes.txt

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,34 @@ Bug fixes
775775
* When reading the header for an Acorn FS Level 3 image, the incorrect disc size was read. Anything over 16.7MB was read incorrectly.
776776
* Some areas of the file details panel on the main window were not getting repainted correctly with the selected tile.
777777

778+
1.40 - 28th March 2022
779+
----------------------
780+
New or improved features
781+
* macOS application package now tells the OS that it can accept certain extensions (i.e. become a 'Recommended App').
782+
* The OS and CPU description has been changed, slightly, in the About dialogue.
783+
* Added the ability to recognise, and use, a double sided hybrid DFS image (i.e. Acorn/Watford).
784+
* Added option in the preferences to either scan all sub directories in an image upon loading or not to, for ADFS, Acorn FS, Amiga, and DOS Plus.
785+
* Added colours to directories that are either not read in or broken (ADFS).
786+
* Image Contents and File Details header text changed colour to green.
787+
* Added the ability to create a blank DOS floppy image (360KB/720KB/1.44MB/2.88MB - all FAT12).
788+
* Added the ability to create a blank 800KB DOS Plus floppy image.
789+
* Added the ability to create a blank 640KB ADFS/DOS Plus Hybrid image.
790+
* Enabled the Add DOS Partition to an ADFS image.
791+
* Added limiter to the Add Partition dialogue box, which changes depending on which format.
792+
* Temporary limit applied to AFS partition size of 127MB.
793+
* Added the ability to create a blank DOS Hard Drive image (FAT12/FAT16/FAT32).
794+
* Improved the separation of the ADFS partition from a hybrid image.
795+
* Improved the separation of the DOS partition from a hybrid image. This will not result in a viable image when a DOS partition does not exist on the source partition.
796+
* Begun improving the separation of the AFS partition from a hybrid image. This is still under development and currently does not produce a viable image.
797+
798+
Bug fixes
799+
* The incorrect OS and CPU where reported in the About dialogue for macOS ARM.
800+
* The incorrect keyboard shortcuts were used for macOS ARM.
801+
* A Watford DFS double sided image would get incorrectly IDed as an Acorn DFS double sided image if both sides were different sizes.
802+
* Sometimes the file info panel would not get fully repainted.
803+
* When saving an image, some filters where not added.
804+
* The DOS part of a 640KB ADFS/DOS partition was not getting read correctly.
805+
778806
Platform History
779807
----------------
780808

2.38 MB
Binary file not shown.
133 KB
Binary file not shown.

Documentation/ToDo.txt

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ 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-
+ In addition, the tiling under the graphic for the filetype in the File Details, when it is not big enough, leaves a horrible black edge to the right and bottom. - TO BE TESTED
98
* 'Bad FS Map' from BeebEm when loading an ADFS/AFS hybrid image after making a change to the ADFS partition. Unable to reproduce.
109
* Some SS DFS images are IDed as DS images when 'zero length images' is selected in the preferences.
1110
* Access violation has been reported when creating an ADFS HDD image (default options) on Windows. - UNABLE TO REPLICATE
@@ -20,18 +19,20 @@ General
2019
* 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.
2120
* Cancel button for progress display?
2221
* Side pane (left hand side) to allow separate images to be opened (REF:3).
23-
* Use side pane for opening MMFS images and remove the code from TDiscImage (REF:3).
22+
* Use side panel for opening MMFS images and remove the code from TDiscImage (REF:3).
2423
* 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.
25+
26+
DFS
2527

2628
ADFS
2729
* Change the size of the ADFS partition or image.
28-
29-
CFS (UEF)
30-
* Remember the last block read and compare with the next to get around some tape protection methods.
30+
* Change the interleave on extracted ADFS 640K images.
3131

3232
AFS
33-
* AFS0 images do not get created correctly (in particular the free space allocation maps).
34-
* Add option to new Level 3 images for pre-1988 or post-1988 format.
33+
* AFS0 images do not get created correctly (in particular the free space allocation maps) - AWAITING MORE INFO ON AFS FORMATS.
34+
* Add option to new Level 3 images for pre-1988 or post-1988 format - AWAITING MORE INFO ON AFS FORMATS.
35+
* When extracting the AFS partition, remove the ADFS partition and re-address all the objects, instead of just blanking out the ADFS part - IN PROGRESS.
3536

3637
Amiga
3738
* Write/Delete/Rename files/directories to Amiga images.
@@ -40,7 +41,7 @@ Amiga
4041
* Show file attributes in the File Details panel.
4142

4243
Spectrum/Amstrad
43-
* Write entire module.
44+
* Write entire module - REQUIRE MORE INFO ON SPECTRUM FORMAT.
4445

4546
MMFS
4647
* Remove from TDiscImage and incorporate into GUI (REF:3).
@@ -54,6 +55,6 @@ Spark
5455
* Move file.
5556

5657
DOS Plus
57-
* Create new image
58-
* Add partition to an ADFS image.
59-
* Move file - this just changes a file/directory's parent.
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

LazarusSource/AFSPartitionUnit.lfm

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ object AFSPartitionForm: TAFSPartitionForm
22
Left = 436
33
Height = 156
44
Top = 272
5-
Width = 320
5+
Width = 355
66
BorderIcons = [biSystemMenu]
77
BorderStyle = bsDialog
88
Caption = 'Partition Size'
99
ClientHeight = 156
10-
ClientWidth = 320
10+
ClientWidth = 355
1111
Color = 15527148
1212
OnPaint = FormPaint
1313
Position = poMainFormCenter
@@ -16,7 +16,7 @@ object AFSPartitionForm: TAFSPartitionForm
1616
Left = 0
1717
Height = 37
1818
Top = 0
19-
Width = 320
19+
Width = 355
2020
OnChange = PartitionSizeChange
2121
Position = 0
2222
TickMarks = tmBoth
@@ -28,24 +28,23 @@ object AFSPartitionForm: TAFSPartitionForm
2828
Left = 0
2929
Height = 16
3030
Top = 37
31-
Width = 320
31+
Width = 355
3232
Align = alTop
3333
Alignment = taCenter
3434
Caption = 'PartitionSizeLabel'
3535
end
3636
object CancelButton: TBitBtn
37-
Left = 8
37+
Left = 128
3838
Height = 30
3939
Top = 120
4040
Width = 100
41-
Cancel = True
4241
Caption = 'Cancel'
4342
Color = 15527148
4443
ModalResult = 2
4544
TabOrder = 1
4645
end
4746
object OKBtnBack: TPanel
48-
Left = 124
47+
Left = 244
4948
Height = 30
5049
Top = 120
5150
Width = 100
@@ -73,7 +72,7 @@ object AFSPartitionForm: TAFSPartitionForm
7372
Left = 0
7473
Height = 56
7574
Top = 53
76-
Width = 320
75+
Width = 355
7776
Align = alTop
7877
AutoFill = True
7978
Caption = 'Partition Type'
@@ -84,13 +83,24 @@ object AFSPartitionForm: TAFSPartitionForm
8483
ChildSizing.ShrinkVertical = crsScaleChilds
8584
ChildSizing.Layout = cclLeftToRightThenTopToBottom
8685
ChildSizing.ControlsPerLine = 1
87-
ClientHeight = 39
88-
ClientWidth = 318
86+
ClientHeight = 37
87+
ClientWidth = 345
8988
ItemIndex = 0
9089
Items.Strings = (
9190
'Acorn File Server'
9291
'DOS Plus'
9392
)
93+
OnClick = rad_typeClick
9494
TabOrder = 3
9595
end
96+
object FromFileButton: TBitBtn
97+
Left = 8
98+
Height = 30
99+
Top = 120
100+
Width = 100
101+
Caption = 'From File...'
102+
Color = 15527148
103+
Enabled = False
104+
TabOrder = 4
105+
end
96106
end

LazarusSource/AFSPartitionUnit.pas

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,20 @@ interface
1414

1515
TAFSPartitionForm = class(TForm)
1616
CancelButton: TBitBtn;
17+
FromFileButton: TBitBtn;
1718
OKBtnBack: TPanel;
1819
OKButton: TBitBtn;
1920
PartitionSizeLabel: TLabel;
2021
PartitionSize: TTrackBar;
2122
rad_type: TRadioGroup;
2223
procedure FormPaint(Sender: TObject);
2324
procedure PartitionSizeChange(Sender: TObject);
25+
procedure rad_typeClick(Sender: TObject);
2426
private
2527

2628
public
27-
29+
maxAFSSize,
30+
maxDOSSize : Cardinal;
2831
end;
2932

3033
var
@@ -46,6 +49,15 @@ procedure TAFSPartitionForm.PartitionSizeChange(Sender: TObject);
4649
PartitionSizeLabel.Caption:=FloatToStr((PartitionSize.Position*$100)/1024)+'KB';
4750
end;
4851

52+
{------------------------------------------------------------------------------}
53+
//Ensure we don't create anything bigger than the FS can handle
54+
{------------------------------------------------------------------------------}
55+
procedure TAFSPartitionForm.rad_typeClick(Sender: TObject);
56+
begin
57+
if rad_type.ItemIndex=0 then PartitionSize.Max:=maxAFSSize;
58+
if rad_type.ItemIndex=1 then PartitionSize.Max:=maxDOSSize;
59+
end;
60+
4961
{------------------------------------------------------------------------------}
5062
//Tile the form
5163
{------------------------------------------------------------------------------}

LazarusSource/DiscImage.pas

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

33
{
4-
TDiscImage class V1.38.5
4+
TDiscImage class V1.40
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
@@ -45,10 +45,11 @@ interface
4545
TDir = record
4646
Directory, //Directory name (ALL)
4747
Title : String; //Directory title (DFS/ADFS)
48-
Entries : array of TDirEntry;//Entries (above)
48+
Entries : array of TDirEntry;//Entries (see DiscImageUtils unit)
4949
ErrorCode : Byte; //Used to indicate error for broken directory (ADFS)
5050
Broken, //Flag if directory is broken (ADFS)
5151
Locked, //Flag if disc is locked (MMFS)
52+
BeenRead, //Flag if directory has been reed in
5253
DOSPartition, //Is this in the DOS Plus partition? (ADFS/DOS Plus)
5354
AFSPartition: Boolean; //Is this in the AFS partition? (ADFS/AFS)
5455
Sector, //Where is this directory located (same as TDirEntry)
@@ -79,7 +80,8 @@ TFragment = record //For retrieving the ADFS E/F fragment informati
7980
FSparkAsFS, //Deal with Spark archives as a filing system
8081
FDFSzerosecs, //Allow zero length disc images for DFS?
8182
FDFSAllowBlank, //Allow blank filenames
82-
FDFSBeyondEdge: Boolean; //Check for files going beyond the DFS disc edge
83+
FDFSBeyondEdge, //Check for files going beyond the DFS disc edge
84+
FScanSubDirs : Boolean; //Scan sub directories on opening (ADFS/Amiga/DOS/Spark)
8385
secsize, //Sector Size
8486
bpmb, //Bits Per Map Bit (Acorn ADFS New)
8587
dosalloc, //Allocation Unit (DOS Plus)
@@ -287,6 +289,7 @@ TFragment = record //For retrieving the ADFS E/F fragment informati
287289
function ID_DFS: Boolean;
288290
function ReadDFSDisc(mmbdisc:Integer=-1): TDisc;
289291
procedure DFSFreeSpaceMap(LDisc: TDisc);
292+
function IsWatford(s: Integer): Boolean;
290293
function ConvertDFSSector(address,side: Integer): Integer;
291294
function WriteDFSFile(var file_details: TDirEntry;var buffer: TDIByteArray): Integer;
292295
procedure UpdateDFSCat(side: Integer);
@@ -397,15 +400,18 @@ TFragment = record //For retrieving the ADFS E/F fragment informati
397400
function WriteDOSObject(buffer:TDIByteArray;fragments:TFragmentArray):Boolean;
398401
function WriteDOSFile(var file_details: TDirEntry;
399402
var buffer: TDIByteArray):Integer;
403+
function InsertDOSEntry(dir: Cardinal;direntry: TDirEntry): Integer;
400404
function CreateDOSDirectory(dirname,parent,attributes: String): Integer;
401405
function DeleteDOSFile(filename: String): Boolean;
406+
procedure RemoveDOSEntry(dir, entry: Cardinal);
402407
function UpdateDOSAttributes(filename,attributes: String): Boolean;
403408
function UpdateDOSDiscTitle(title: String): Boolean;
404409
function UpdateDOSTimeStamp(filename:String;newtimedate:TDateTime):Boolean;
405410
function AddDOSPartition(size: Cardinal): Boolean;
406-
function FormatDOS(shape: Byte): TDisc;
407-
procedure WriteDOSPartition;
408-
procedure WriteDOSHeader;
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;
409415
function MoveDOSFile(filename,directory: String): Integer;
410416
//Private constants
411417
const
@@ -433,8 +439,8 @@ TFragment = record //For retrieving the ADFS E/F fragment informati
433439
procedure ReadImage;
434440
procedure SaveToFile(filename: String;uncompress: Boolean=False);
435441
procedure Close;
436-
function FormatFDD(major,minor,tracks: Byte): Boolean;
437-
function FormatHDD(major:Byte;harddrivesize:Cardinal;newmap:Boolean;dirtype:Byte):Boolean;
442+
function FormatFDD(major:Word;minor,tracks: Byte): Boolean;
443+
function FormatHDD(major:Word;harddrivesize:Cardinal;newmap:Boolean;dirtype:Byte):Boolean;
438444
function ExtractFile(filename:String;var buffer:TDIByteArray;entry:Cardinal=0): Boolean;
439445
function WriteFile(var file_details: TDirEntry; var buffer: TDIByteArray): Integer;
440446
function FileExists(filename: String;var Ref: Cardinal): Boolean;
@@ -480,6 +486,7 @@ TFragment = record //For retrieving the ADFS E/F fragment informati
480486
function AddPartition(filename: String): Boolean; overload;
481487
function ChangeInterleaveMethod(NewMethod: Byte): Boolean;
482488
function GetDirSep(partition: Byte): Char;
489+
function ReadDirectory(dirname: String): Integer;
483490
//Published properties
484491
property AFSPresent: Boolean read FAFSPresent;
485492
property AFSRoot: Cardinal read Fafsroot;
@@ -509,6 +516,7 @@ TFragment = record //For retrieving the ADFS E/F fragment informati
509516
property ProgressIndicator: TProgressProc write FProgress;
510517
property RAWData: TDIByteArray read Fdata;
511518
property RootAddress: Cardinal read GetRootAddress;
519+
property ScanSubDirs: Boolean read FScanSubDirs write FScanSubDirs;
512520
property SparkAsFS: Boolean read FSparkAsFS write FSparkAsFS;
513521
public
514522
destructor Destroy; override;
@@ -518,7 +526,8 @@ implementation
518526

519527
uses
520528
SysUtils,DateUtils;
521-
529+
{This unit is split into sub units. Some code is replicated in the different
530+
sub units. This is so each filing system can have it's own methods.}
522531
{$INCLUDE 'DiscImage_Private.pas'} //Module for private methods
523532
{$INCLUDE 'DiscImage_Published.pas'}//Module for published methods
524533
{$INCLUDE 'DiscImage_ADFS.pas'} //Module for Acorn ADFS

LazarusSource/DiscImageManager.lpi

Lines changed: 3 additions & 3 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="39"/>
24+
<MinorVersionNr Value="40"/>
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.39"/>
26+
<StringTable CompanyName="GJH Software" FileDescription="Disc Image Manager for Acorn and Commodore disc formats" ProductName="Disc Image Manager" ProductVersion="1.40"/>
2727
</VersionInfo>
2828
<BuildModes Count="10">
2929
<Item1 Name="Default" Default="True"/>
@@ -481,7 +481,7 @@
481481
</Linking>
482482
<Other>
483483
<CompilerMessages>
484-
<IgnoredMessages idx5094="True" idx5091="True" idx5060="True" idx5057="True" idx5024="True" idx4081="True" idx4080="True" idx4079="True" idx4035="True"/>
484+
<IgnoredMessages idx6018="True" idx5094="True" idx5091="True" idx5060="True" idx5057="True" idx5024="True" idx4081="True" idx4080="True" idx4079="True" idx4035="True"/>
485485
</CompilerMessages>
486486
</Other>
487487
</CompilerOptions>

0 commit comments

Comments
 (0)