Skip to content

Commit

Permalink
Updated to 1.38.3
Browse files Browse the repository at this point in the history
  • Loading branch information
geraldholdsworth committed Nov 29, 2021
1 parent 728b83c commit 1faea25
Show file tree
Hide file tree
Showing 17 changed files with 94 additions and 125 deletions.
12 changes: 12 additions & 0 deletions Documentation/Changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,18 @@ Bug fixes
* Writes to an Acorn FS or DOS Plus partition of an ADFS hybrid sometimes failed to work correctly.
* At some point in a previous version, the root name 'dropped' off the parent property for ADFS files. This meant that the search results returned files with the root missing from the pathname and therefore unable to locate when clicked on.

1.39 -
--------------------------
New or improved features
* When the root directory is selected, the 'Directory Title' field now reads 'Disc Title' and changing the text will update the disc title of the image, instead of failing with Acorn DFS.
* The Display Free Space button's hint text has been changed to 'View/Edit Image Details' to more accurately reflect the dialogue box.

Bug fixes
* Temporarily removed the 'file goes over disc edge' checks as some valid images were not getting opened.
* Creating a double sided DFS image failed to work.
* Creating a Watford DFS image failed to work.
* When the ADFS filename is shorter than the available characters required for the attributes, not all the attributes were read in. This manifested itself with a directory entry shorter than 4 characters.

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

Expand Down
2 changes: 2 additions & 0 deletions Documentation/ToDo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ General
* 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).
* Add option for 'beyond disc edge check' to ID DFS images in the settings.
* For macOS, change the settings being saved to the registry to being saved in a plist file, or within the application directory itself.

ADFS
* Change the size of the ADFS partition or image.
Expand Down
4 changes: 2 additions & 2 deletions LazarusSource/DiscImageManager.lpi
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
<UseVersionInfo Value="True"/>
<MajorVersionNr Value="1"/>
<MinorVersionNr Value="38"/>
<RevisionNr Value="2"/>
<RevisionNr Value="3"/>
<Language Value="0809"/>
<StringTable CompanyName="GJH Software" FileDescription="Disc Image Manager for Acorn and Commodore disc formats" ProductName="Disc Image Manager" ProductVersion="1.38.2"/>
<StringTable CompanyName="GJH Software" FileDescription="Disc Image Manager for Acorn and Commodore disc formats" ProductName="Disc Image Manager" ProductVersion="1.38.3"/>
</VersionInfo>
<BuildModes Count="6">
<Item1 Name="Default" Default="True"/>
Expand Down
159 changes: 48 additions & 111 deletions LazarusSource/DiscImageManager.lps
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<ProjectSession>
<Version Value="11"/>
<BuildModes Active="Default"/>
<Units Count="35">
<Units Count="37">
<Unit0>
<Filename Value="DiscImageManager.lpr"/>
<IsPartOfProject Value="True"/>
Expand All @@ -18,8 +18,9 @@
<ComponentName Value="MainForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="1"/>
<TopLine Value="498"/>
<TopLine Value="504"/>
<CursorPos X="33" Y="511"/>
<UsageCount Value="200"/>
<Loaded Value="True"/>
Expand All @@ -29,8 +30,8 @@
<Filename Value="DiscImage.pas"/>
<IsPartOfProject Value="True"/>
<EditorIndex Value="11"/>
<TopLine Value="280"/>
<CursorPos X="12" Y="296"/>
<TopLine Value="436"/>
<CursorPos X="12" Y="456"/>
<UsageCount Value="200"/>
<Loaded Value="True"/>
</Unit2>
Expand Down Expand Up @@ -85,8 +86,8 @@
<Filename Value="Global.pas"/>
<IsPartOfProject Value="True"/>
<EditorIndex Value="22"/>
<TopLine Value="201"/>
<CursorPos X="2" Y="206"/>
<TopLine Value="16"/>
<CursorPos X="11" Y="29"/>
<UsageCount Value="216"/>
<Loaded Value="True"/>
</Unit7>
Expand Down Expand Up @@ -131,7 +132,6 @@
<Filename Value="Spark.pas"/>
<IsPartOfProject Value="True"/>
<EditorIndex Value="19"/>
<TopLine Value="88"/>
<UsageCount Value="200"/>
<Loaded Value="True"/>
</Unit11>
Expand Down Expand Up @@ -264,14 +264,13 @@
<Unit22>
<Filename Value="DiscImage_ADFS.pas"/>
<EditorIndex Value="15"/>
<TopLine Value="67"/>
<CursorPos X="61" Y="85"/>
<TopLine Value="461"/>
<CursorPos X="2" Y="485"/>
<UsageCount Value="102"/>
<Loaded Value="True"/>
</Unit22>
<Unit23>
<Filename Value="DiscImage_DFS.pas"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="20"/>
<TopLine Value="703"/>
<CursorPos X="35" Y="721"/>
Expand Down Expand Up @@ -358,133 +357,71 @@
<Unit34>
<Filename Value="DiscImage_Published.pas"/>
<EditorIndex Value="13"/>
<TopLine Value="811"/>
<CursorPos X="57" Y="818"/>
<TopLine Value="391"/>
<CursorPos X="51" Y="399"/>
<UsageCount Value="119"/>
<Loaded Value="True"/>
</Unit34>
<Unit35>
<Filename Value="/usr/local/share/fpcsrc/3.2.0/packages/univint/src/CFPreferences.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="217"/>
<CursorPos X="190" Y="231"/>
<UsageCount Value="10"/>
</Unit35>
<Unit36>
<Filename Value="/usr/local/share/fpcsrc/3.2.0/packages/univint/src/MacOSAll.pas"/>
<EditorIndex Value="-1"/>
<TopLine Value="220"/>
<CursorPos X="26" Y="994"/>
<UsageCount Value="10"/>
</Unit36>
</Units>
<JumpHistory Count="30" HistoryIndex="27">
<JumpHistory Count="11" HistoryIndex="10">
<Position1>
<Filename Value="DiscImage_DOSPlus.pas"/>
<Caret Line="116" Column="46" TopLine="92"/>
<Filename Value="DiscImage.pas"/>
<Caret Line="453" Column="12" TopLine="448"/>
</Position1>
<Position2>
<Filename Value="DiscImage_DOSPlus.pas"/>
<Caret Line="1464" Column="5" TopLine="1392"/>
<Filename Value="DiscImage_Published.pas"/>
<Caret Line="942" Column="2" TopLine="937"/>
</Position2>
<Position3>
<Filename Value="DiscImage_DOSPlus.pas"/>
<Caret Line="127" Column="9" TopLine="107"/>
<Filename Value="DiscImage.pas"/>
<Caret Line="456" Column="12" TopLine="436"/>
</Position3>
<Position4>
<Filename Value="DiscImage_DOSPlus.pas"/>
<Caret Line="1417" Column="5" TopLine="1398"/>
<Filename Value="MainUnit.pas"/>
<Caret Line="3804" Column="4" TopLine="3784"/>
</Position4>
<Position5>
<Filename Value="DiscImage_ADFS.pas"/>
<Caret Line="314" Column="17" TopLine="275"/>
<Filename Value="Global.pas"/>
<Caret Line="206" Column="2" TopLine="72"/>
</Position5>
<Position6>
<Filename Value="DiscImage_AFS.pas"/>
<Caret Line="2381" Column="5" TopLine="1577"/>
<Filename Value="Global.pas"/>
<Caret Line="29" Column="3" TopLine="16"/>
</Position6>
<Position7>
<Filename Value="DiscImage_DOSPlus.pas"/>
<Caret Line="1482" Column="27" TopLine="1460"/>
<Filename Value="Global.pas"/>
<Caret Line="134" Column="12" TopLine="121"/>
</Position7>
<Position8>
<Filename Value="DiscImage_AFS.pas"/>
<Caret Line="1050" Column="24" TopLine="1049"/>
<Filename Value="MainUnit.pas"/>
<Caret Line="3804" Column="60" TopLine="3783"/>
</Position8>
<Position9>
<Filename Value="DiscImage_AFS.pas"/>
<Caret Line="2067" Column="37" TopLine="2039"/>
<Filename Value="MainUnit.pas"/>
<Caret Line="243" Column="14" TopLine="224"/>
</Position9>
<Position10>
<Filename Value="DiscImage_AFS.pas"/>
<Caret Line="2074" Column="30" TopLine="2046"/>
<Filename Value="Global.pas"/>
<Caret Line="31" Column="2" TopLine="16"/>
</Position10>
<Position11>
<Filename Value="DiscImage_DOSPlus.pas"/>
<Caret Line="1476" Column="30" TopLine="1461"/>
</Position11>
<Position12>
<Filename Value="DiscImage_DOSPlus.pas"/>
<Caret Line="1493" Column="5" TopLine="1460"/>
</Position12>
<Position13>
<Filename Value="DiscImage_DOSPlus.pas"/>
<Caret Line="1490" Column="11" TopLine="1467"/>
</Position13>
<Position14>
<Filename Value="DiscImage.pas"/>
<Caret Line="446" Column="12" TopLine="433"/>
</Position14>
<Position15>
<Filename Value="DiscImage.pas"/>
<Caret Line="302" Column="18" TopLine="274"/>
</Position15>
<Position16>
<Filename Value="DiscImage_DFS.pas"/>
<Caret Line="917" Column="2" TopLine="911"/>
</Position16>
<Position17>
<Filename Value="DiscImage_DFS.pas"/>
<Caret Line="946" Column="5" TopLine="914"/>
</Position17>
<Position18>
<Filename Value="DiscImage_DFS.pas"/>
<Caret Line="858" TopLine="840"/>
</Position18>
<Position19>
<Filename Value="MainUnit.pas"/>
<Caret Line="3078" Column="30" TopLine="3050"/>
</Position19>
<Position20>
<Filename Value="MainUnit.pas"/>
<Caret Line="268" Column="14" TopLine="260"/>
</Position20>
<Position21>
<Filename Value="DiscImage.pas"/>
<Caret Line="288" Column="18" TopLine="280"/>
</Position21>
<Position22>
<Filename Value="DiscImage_DFS.pas"/>
<Caret Line="88" TopLine="78"/>
</Position22>
<Position23>
<Filename Value="DiscImage_DFS.pas"/>
<Caret Line="100" TopLine="96"/>
</Position23>
<Position24>
<Filename Value="DiscImage_DFS.pas"/>
<Caret Line="119" TopLine="96"/>
</Position24>
<Position25>
<Filename Value="DiscImage_DFS.pas"/>
<Caret Line="36" TopLine="19"/>
</Position25>
<Position26>
<Filename Value="DiscImage.pas"/>
<Caret Line="288" Column="18" TopLine="280"/>
</Position26>
<Position27>
<Filename Value="DiscImage.pas"/>
<Caret Line="295" Column="12" TopLine="285"/>
</Position27>
<Position28>
<Filename Value="DiscImage_DFS.pas"/>
<Caret Line="721" Column="3" TopLine="706"/>
</Position28>
<Position29>
<Filename Value="DiscImage.pas"/>
<Caret Line="296" Column="12" TopLine="280"/>
</Position29>
<Position30>
<Filename Value="DiscImage_DFS.pas"/>
<Caret Line="746" Column="2" TopLine="737"/>
</Position30>
<Caret Line="4496" Column="2" TopLine="4492"/>
</Position11>
</JumpHistory>
<RunParams>
<FormatVersion Value="2"/>
Expand Down
Binary file modified LazarusSource/DiscImageManager.res
Binary file not shown.
20 changes: 12 additions & 8 deletions LazarusSource/DiscImage_ADFS.pas
Original file line number Diff line number Diff line change
Expand Up @@ -475,16 +475,20 @@ function TDiscImage.ReadADFSDir(dirname: String; sector: Cardinal): TDir;
endofentry:=False;
if Length(Entry.Filename)>0 then
begin
for amt:=0 to Length(Entry.Filename)-1 do
for amt:=0 to 9 do //Length(Entry.Filename)-1 do
begin
if ord(Entry.Filename[amt+1])>>7=1 then
//if ord(Entry.Filename[amt+1])>>7=1 then
if ReadByte(offset+amt,dirbuffer)>>7=1 then
temp:=temp+OldAtts[amt];
if ord(Entry.Filename[amt+1])AND$7F=$0D then endofentry:=True;
//Clear the top bit
if not endofentry then
Entry.Filename[amt+1]:=chr(ord(Entry.Filename[amt+1])AND$7F)
else
Entry.Filename[amt+1]:=' ';
if amt<Length(Entry.Filename) then
begin
if ord(Entry.Filename[amt+1])AND$7F=$0D then endofentry:=True;
//Clear the top bit
if not endofentry then
Entry.Filename[amt+1]:=chr(ord(Entry.Filename[amt+1])AND$7F)
else
Entry.Filename[amt+1]:=' ';
end;
end;
RemoveSpaces(Entry.Filename);
end;
Expand Down
7 changes: 6 additions & 1 deletion LazarusSource/DiscImage_Published.pas
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,12 @@ function TDiscImage.RetitleDirectory(var filename,newtitle: String): Boolean;
//Start with a false result
Result:=False;
case FFormat>>4 of
diAcornDFS : exit;//DFS doesn't have directories
diAcornDFS : //DFS doesn't have directories
begin
//Update the disc title instead
if(filename[1]=':')and(filename[3]='.')and(filename[4]='$')then
Result:=UpdateDiscTitle(newtitle,StrToIntDef(filename[2],0));
end;
diAcornADFS: //Retitle ADFS directory
Result:=RetitleADFSDirectory(filename,newtitle);
diCommodore: exit;//Commodore doesn't have directories
Expand Down
6 changes: 5 additions & 1 deletion LazarusSource/Global.pas
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@
interface

uses
Classes,SysUtils,Registry;
Classes,SysUtils,Registry
{$IFDEF Darwin}
,MacOSAll
{$ENDIF}
;

function ReadLine(var Stream: TFileStream;var Line: string): boolean;
function WriteLine(var Stream: TFileStream;Line: string): boolean;
Expand Down
2 changes: 1 addition & 1 deletion LazarusSource/MainUnit.lfm
Original file line number Diff line number Diff line change
Expand Up @@ -9499,7 +9499,7 @@ object MainForm: TMainForm
end
object btn_ImageDetails: TToolButton
Left = 186
Hint = 'Display the Free Space Map'
Hint = 'View/Edit Image Details'
Top = 0
AutoSize = True
Caption = 'btn_ImageDetails'
Expand Down
7 changes: 6 additions & 1 deletion LazarusSource/MainUnit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ TMainForm = class(TForm)
DesignedDPI = 96;
//Application Title
ApplicationTitle = 'Disc Image Manager';
ApplicationVersion = '1.38.2';
ApplicationVersion = '1.38.3';
//Current platform and architecture (compile time directive)
{$IFDEF Darwin}
platform = 'macOS'; //Apple Mac OS X
Expand Down Expand Up @@ -1745,6 +1745,8 @@ procedure TMainForm.UpdateImageInfo(partition: Cardinal=0);
title:=Image.Title(partition);
RemoveTopBit(title);//Ensure top bit not set
ImageDetails.Panels[2].Text:=title;
if(lb_title.Visible)and(DirTitleLabel.Caption='Disc Title')then
lb_title.Caption:=title;
//Disc size
ImageDetails.Panels[3].Text:=ConvertToKMG(Image.DiscSize(partition))
+' ('+IntToStrComma(Image.DiscSize(partition))+' Bytes)';
Expand Down Expand Up @@ -2257,6 +2259,7 @@ procedure TMainForm.DirListChange(Sender: TObject; Node: TTreeNode);
//Title of the subdirectory
title:=Image.Disc[Image.Disc[dir].Entries[entry].DirRef].Title;
RemoveTopBit(title);
DirTitleLabel.Caption:='Directory Title';
lb_title.Caption:=title;
ed_title.Enabled:=True; //Can be edited
end;
Expand All @@ -2267,6 +2270,7 @@ procedure TMainForm.DirListChange(Sender: TObject; Node: TTreeNode);
filetype:='Root Directory';
title:=Image.Disc[dr].Title;
RemoveTopBit(title);
DirTitleLabel.Caption:='Disc Title';//Also see UpdateImageInfo
lb_title.Caption:=title; //Title
ed_title.Enabled:=True; //Can be edited
//Report if directory is broken and include the error code
Expand Down Expand Up @@ -3797,6 +3801,7 @@ procedure TMainForm.ed_titleEditingDone(Sender: TObject);
if Image.RetitleDirectory(filename,newtitle) then
begin
lb_title.Caption:=newtitle; //If success, then change the text
UpdateImageInfo; //And update the status bar, if need be
HasChanged:=True;
end;
end;
Expand Down
Binary file modified binaries/Linux/Disc Image Manager 32 bit.zip
Binary file not shown.
Binary file modified binaries/Linux/Disc Image Manager ARM 32 bit.zip
Binary file not shown.
Binary file modified binaries/Linux/Disc Image Manager.zip
Binary file not shown.
Binary file modified binaries/Windows/Disc Image Manager 32 bit.zip
Binary file not shown.
Binary file modified binaries/Windows/Disc Image Manager.zip
Binary file not shown.
Binary file modified binaries/macOS/Disc Image Manager 32 bit.dmg
Binary file not shown.
Binary file modified binaries/macOS/Disc Image Manager.dmg
Binary file not shown.

0 comments on commit 1faea25

Please sign in to comment.