Skip to content

Commit

Permalink
Updated to 1.40
Browse files Browse the repository at this point in the history
  • Loading branch information
geraldholdsworth committed Mar 28, 2022
1 parent 388e83b commit c87d8f4
Show file tree
Hide file tree
Showing 36 changed files with 1,430 additions and 539 deletions.
28 changes: 28 additions & 0 deletions Documentation/Changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,34 @@ Bug fixes
* When reading the header for an Acorn FS Level 3 image, the incorrect disc size was read. Anything over 16.7MB was read incorrectly.
* Some areas of the file details panel on the main window were not getting repainted correctly with the selected tile.

1.40 - 28th March 2022
----------------------
New or improved features
* macOS application package now tells the OS that it can accept certain extensions (i.e. become a 'Recommended App').
* The OS and CPU description has been changed, slightly, in the About dialogue.
* Added the ability to recognise, and use, a double sided hybrid DFS image (i.e. Acorn/Watford).
* 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.
* Added colours to directories that are either not read in or broken (ADFS).
* Image Contents and File Details header text changed colour to green.
* Added the ability to create a blank DOS floppy image (360KB/720KB/1.44MB/2.88MB - all FAT12).
* Added the ability to create a blank 800KB DOS Plus floppy image.
* Added the ability to create a blank 640KB ADFS/DOS Plus Hybrid image.
* Enabled the Add DOS Partition to an ADFS image.
* Added limiter to the Add Partition dialogue box, which changes depending on which format.
* Temporary limit applied to AFS partition size of 127MB.
* Added the ability to create a blank DOS Hard Drive image (FAT12/FAT16/FAT32).
* Improved the separation of the ADFS partition from a hybrid image.
* 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.
* 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.

Bug fixes
* The incorrect OS and CPU where reported in the About dialogue for macOS ARM.
* The incorrect keyboard shortcuts were used for macOS ARM.
* A Watford DFS double sided image would get incorrectly IDed as an Acorn DFS double sided image if both sides were different sizes.
* Sometimes the file info panel would not get fully repainted.
* When saving an image, some filters where not added.
* The DOS part of a 640KB ADFS/DOS partition was not getting read correctly.

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

Expand Down
Binary file added 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.
23 changes: 12 additions & 11 deletions Documentation/ToDo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ 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
+ 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
* '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.
* Access violation has been reported when creating an ADFS HDD image (default options) on Windows. - UNABLE TO REPLICATE
Expand All @@ -20,18 +19,20 @@ General
* 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 pane for opening MMFS images and remove the code from TDiscImage (REF:3).
* Use side panel for opening MMFS images and remove the code from TDiscImage (REF:3).
* 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.

DFS

ADFS
* Change the size of the ADFS partition or image.

CFS (UEF)
* Remember the last block read and compare with the next to get around some tape protection methods.
* Change the interleave on extracted ADFS 640K images.

AFS
* AFS0 images do not get created correctly (in particular the free space allocation maps).
* Add option to new Level 3 images for pre-1988 or post-1988 format.
* AFS0 images do not get created correctly (in particular the free space allocation maps) - AWAITING MORE INFO ON AFS FORMATS.
* Add option to new Level 3 images for pre-1988 or post-1988 format - AWAITING MORE INFO ON AFS FORMATS.
* 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.

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

Spectrum/Amstrad
* Write entire module.
* Write entire module - REQUIRE MORE INFO ON SPECTRUM FORMAT.

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

DOS Plus
* Create new image
* Add partition to an ADFS image.
* Move file - this just changes a file/directory's parent.
* 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
30 changes: 20 additions & 10 deletions LazarusSource/AFSPartitionUnit.lfm
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ object AFSPartitionForm: TAFSPartitionForm
Left = 436
Height = 156
Top = 272
Width = 320
Width = 355
BorderIcons = [biSystemMenu]
BorderStyle = bsDialog
Caption = 'Partition Size'
ClientHeight = 156
ClientWidth = 320
ClientWidth = 355
Color = 15527148
OnPaint = FormPaint
Position = poMainFormCenter
Expand All @@ -16,7 +16,7 @@ object AFSPartitionForm: TAFSPartitionForm
Left = 0
Height = 37
Top = 0
Width = 320
Width = 355
OnChange = PartitionSizeChange
Position = 0
TickMarks = tmBoth
Expand All @@ -28,24 +28,23 @@ object AFSPartitionForm: TAFSPartitionForm
Left = 0
Height = 16
Top = 37
Width = 320
Width = 355
Align = alTop
Alignment = taCenter
Caption = 'PartitionSizeLabel'
end
object CancelButton: TBitBtn
Left = 8
Left = 128
Height = 30
Top = 120
Width = 100
Cancel = True
Caption = 'Cancel'
Color = 15527148
ModalResult = 2
TabOrder = 1
end
object OKBtnBack: TPanel
Left = 124
Left = 244
Height = 30
Top = 120
Width = 100
Expand Down Expand Up @@ -73,7 +72,7 @@ object AFSPartitionForm: TAFSPartitionForm
Left = 0
Height = 56
Top = 53
Width = 320
Width = 355
Align = alTop
AutoFill = True
Caption = 'Partition Type'
Expand All @@ -84,13 +83,24 @@ object AFSPartitionForm: TAFSPartitionForm
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 39
ClientWidth = 318
ClientHeight = 37
ClientWidth = 345
ItemIndex = 0
Items.Strings = (
'Acorn File Server'
'DOS Plus'
)
OnClick = rad_typeClick
TabOrder = 3
end
object FromFileButton: TBitBtn
Left = 8
Height = 30
Top = 120
Width = 100
Caption = 'From File...'
Color = 15527148
Enabled = False
TabOrder = 4
end
end
14 changes: 13 additions & 1 deletion LazarusSource/AFSPartitionUnit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,20 @@ interface

TAFSPartitionForm = class(TForm)
CancelButton: TBitBtn;
FromFileButton: TBitBtn;
OKBtnBack: TPanel;
OKButton: TBitBtn;
PartitionSizeLabel: TLabel;
PartitionSize: TTrackBar;
rad_type: TRadioGroup;
procedure FormPaint(Sender: TObject);
procedure PartitionSizeChange(Sender: TObject);
procedure rad_typeClick(Sender: TObject);
private

public

maxAFSSize,
maxDOSSize : Cardinal;
end;

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

{------------------------------------------------------------------------------}
//Ensure we don't create anything bigger than the FS can handle
{------------------------------------------------------------------------------}
procedure TAFSPartitionForm.rad_typeClick(Sender: TObject);
begin
if rad_type.ItemIndex=0 then PartitionSize.Max:=maxAFSSize;
if rad_type.ItemIndex=1 then PartitionSize.Max:=maxDOSSize;
end;

{------------------------------------------------------------------------------}
//Tile the form
{------------------------------------------------------------------------------}
Expand Down
27 changes: 18 additions & 9 deletions LazarusSource/DiscImage.pas
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
unit DiscImage;

{
TDiscImage class V1.38.5
TDiscImage class V1.40
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
Expand Down Expand Up @@ -45,10 +45,11 @@ interface
TDir = record
Directory, //Directory name (ALL)
Title : String; //Directory title (DFS/ADFS)
Entries : array of TDirEntry;//Entries (above)
Entries : array of TDirEntry;//Entries (see DiscImageUtils unit)
ErrorCode : Byte; //Used to indicate error for broken directory (ADFS)
Broken, //Flag if directory is broken (ADFS)
Locked, //Flag if disc is locked (MMFS)
BeenRead, //Flag if directory has been reed in
DOSPartition, //Is this in the DOS Plus partition? (ADFS/DOS Plus)
AFSPartition: Boolean; //Is this in the AFS partition? (ADFS/AFS)
Sector, //Where is this directory located (same as TDirEntry)
Expand Down Expand Up @@ -79,7 +80,8 @@ TFragment = record //For retrieving the ADFS E/F fragment informati
FSparkAsFS, //Deal with Spark archives as a filing system
FDFSzerosecs, //Allow zero length disc images for DFS?
FDFSAllowBlank, //Allow blank filenames
FDFSBeyondEdge: Boolean; //Check for files going beyond the DFS disc edge
FDFSBeyondEdge, //Check for files going beyond the DFS disc edge
FScanSubDirs : Boolean; //Scan sub directories on opening (ADFS/Amiga/DOS/Spark)
secsize, //Sector Size
bpmb, //Bits Per Map Bit (Acorn ADFS New)
dosalloc, //Allocation Unit (DOS Plus)
Expand Down Expand Up @@ -287,6 +289,7 @@ TFragment = record //For retrieving the ADFS E/F fragment informati
function ID_DFS: Boolean;
function ReadDFSDisc(mmbdisc:Integer=-1): TDisc;
procedure DFSFreeSpaceMap(LDisc: TDisc);
function IsWatford(s: Integer): Boolean;
function ConvertDFSSector(address,side: Integer): Integer;
function WriteDFSFile(var file_details: TDirEntry;var buffer: TDIByteArray): Integer;
procedure UpdateDFSCat(side: Integer);
Expand Down Expand Up @@ -397,15 +400,18 @@ TFragment = record //For retrieving the ADFS E/F fragment informati
function WriteDOSObject(buffer:TDIByteArray;fragments:TFragmentArray):Boolean;
function WriteDOSFile(var file_details: TDirEntry;
var buffer: TDIByteArray):Integer;
function InsertDOSEntry(dir: Cardinal;direntry: TDirEntry): Integer;
function CreateDOSDirectory(dirname,parent,attributes: String): Integer;
function DeleteDOSFile(filename: String): Boolean;
procedure RemoveDOSEntry(dir, entry: Cardinal);
function UpdateDOSAttributes(filename,attributes: String): Boolean;
function UpdateDOSDiscTitle(title: String): Boolean;
function UpdateDOSTimeStamp(filename:String;newtimedate:TDateTime):Boolean;
function AddDOSPartition(size: Cardinal): Boolean;
function FormatDOS(shape: Byte): TDisc;
procedure WriteDOSPartition;
procedure WriteDOSHeader;
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 MoveDOSFile(filename,directory: String): Integer;
//Private constants
const
Expand Down Expand Up @@ -433,8 +439,8 @@ TFragment = record //For retrieving the ADFS E/F fragment informati
procedure ReadImage;
procedure SaveToFile(filename: String;uncompress: Boolean=False);
procedure Close;
function FormatFDD(major,minor,tracks: Byte): Boolean;
function FormatHDD(major:Byte;harddrivesize:Cardinal;newmap:Boolean;dirtype:Byte):Boolean;
function FormatFDD(major:Word;minor,tracks: Byte): Boolean;
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;
Expand Down Expand Up @@ -480,6 +486,7 @@ TFragment = record //For retrieving the ADFS E/F fragment informati
function AddPartition(filename: String): Boolean; overload;
function ChangeInterleaveMethod(NewMethod: Byte): Boolean;
function GetDirSep(partition: Byte): Char;
function ReadDirectory(dirname: String): Integer;
//Published properties
property AFSPresent: Boolean read FAFSPresent;
property AFSRoot: Cardinal read Fafsroot;
Expand Down Expand Up @@ -509,6 +516,7 @@ TFragment = record //For retrieving the ADFS E/F fragment informati
property ProgressIndicator: TProgressProc write FProgress;
property RAWData: TDIByteArray read Fdata;
property RootAddress: Cardinal read GetRootAddress;
property ScanSubDirs: Boolean read FScanSubDirs write FScanSubDirs;
property SparkAsFS: Boolean read FSparkAsFS write FSparkAsFS;
public
destructor Destroy; override;
Expand All @@ -518,7 +526,8 @@ implementation

uses
SysUtils,DateUtils;

{This unit is split into sub units. Some code is replicated in the different
sub units. This is so each filing system can have it's own methods.}
{$INCLUDE 'DiscImage_Private.pas'} //Module for private methods
{$INCLUDE 'DiscImage_Published.pas'}//Module for published methods
{$INCLUDE 'DiscImage_ADFS.pas'} //Module for Acorn ADFS
Expand Down
6 changes: 3 additions & 3 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="39"/>
<MinorVersionNr Value="40"/>
<Language Value="0809"/>
<StringTable CompanyName="GJH Software" FileDescription="Disc Image Manager for Acorn and Commodore disc formats" ProductName="Disc Image Manager" ProductVersion="1.39"/>
<StringTable CompanyName="GJH Software" FileDescription="Disc Image Manager for Acorn and Commodore disc formats" ProductName="Disc Image Manager" ProductVersion="1.40"/>
</VersionInfo>
<BuildModes Count="10">
<Item1 Name="Default" Default="True"/>
Expand Down Expand Up @@ -481,7 +481,7 @@
</Linking>
<Other>
<CompilerMessages>
<IgnoredMessages idx5094="True" idx5091="True" idx5060="True" idx5057="True" idx5024="True" idx4081="True" idx4080="True" idx4079="True" idx4035="True"/>
<IgnoredMessages idx6018="True" idx5094="True" idx5091="True" idx5060="True" idx5057="True" idx5024="True" idx4081="True" idx4080="True" idx4079="True" idx4035="True"/>
</CompilerMessages>
</Other>
</CompilerOptions>
Expand Down
Loading

0 comments on commit c87d8f4

Please sign in to comment.