Partition Manager feedback

General development discussion not covered by a specific forum
User avatar
IanJeffray
Posts: 162
Joined: Mon Jan 18, 2021 1:51 pm

Re: Partition Manager feedback

Post by IanJeffray »

I tried 0.92 in a machine with a Cumana SCSI card today. It chugged the CDROMs then threw an error box message simply showing "Corruption of stack". :(
JonAbbott
Posts: 2956
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: Partition Manager feedback

Post by JonAbbott »

IanJeffray wrote: Sat Feb 11, 2023 10:11 pm I tried 0.92 in a machine with a Cumana SCSI card today. It chugged the CDROMs then threw an error box message simply showing "Corruption of stack". :(
Going to need a debug log.

You could try removing the CDFS handler if you think that's the issue, by deleting FS.CDFS. Failing that, it could be a bug in SCSIFS.
JonAbbott
Posts: 2956
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: Partition Manager feedback

Post by JonAbbott »

v0.93 attached.

Changes:
  • Wizzo IDEFS support added
  • IDEFS and ADFS now show unformatted drives as fully unallocated space
  • ADFS based drives now default to FileCore
  • Bugfix: Error boxes modified to support WindowManager Module versions below v3.50
  • Bugfix: Writing an ICS based partition table was storing an invalid CRC
  • ADFS based GPT/MBR support is now dependent on the ADFS Module version
JonAbbott
Posts: 2956
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: Partition Manager feedback

Post by JonAbbott »

I've noticed the default FileCore partition size of 495MB on ZIDEFS is resulting in invalid formatted partitions on real hardware.

EDIT: ZIDEFS is working out the cylinder size incorrectly - I'll fix in the next update. ZIDEFS partitioning is essentially broken until this is fixed
EDIT2: On further inspection, its probably not the cylinder size but the sector addressing. It works under Arculator, but fails on real hardware using the same ZIDEFS version
EDIT3: Arculator supports only CHS addressing where as the physical drive I've been testing is using LBA addressing. If I switch the IDE commands to use LBA addressing mode partitioning works...which doesn't make a lot of sense as CHS should still work, regardless, I'll modify the filesystems to use the addressing mode the drive prefers
JonAbbott
Posts: 2956
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: Partition Manager feedback

Post by JonAbbott »

v0.94 attached.

A lot of bugfixes and changes in this update as I work towards a v1.00 release. I've tested this against SCSIFS/SDFS on a Pi, ZIDEFS/IDEFS on Baildon Podules and ADFS on a RiscPC. ST506 support has been tested under Arculator emulation.
Although I've tested many variations of drive partitioning over the past week, I obviously can't test every combination so please report any issues and post DEBUG/TXT files to help me get this finalized.

The main change in this build is it will detach known logical drives on any physical drive being modified, then restart the filesystem and its Filer after changes are written. This avoids a reboot after disk changes, but is experimental. I have noticed that after a Filer is restarted, the RAMFS Filer fails to show if you drag it's size from 0; but if you then drag it back to 0, then up again the Filer icon appears. I think this might be due to a bug in RAMFS's Filer as it doesn't appear to follow the OS documentation on how to handle a Filer restart request.

On ST506 drives, it will attempt to programmatically work out the drive CHS geometry, but as I don't have a working ST506 I can't test it. I've also been unable to find any documentation on how an ST506 handles reads beyond CHS limits or how ADFS handles address to CHS translation so its highly experimental at the moment.

The other notable change is it will attempt to work out if a drive is using CHS or LBA addressing and adjust the DiscOp's accordingly. This is primarily to work around issues in ICS IDEFS, which doesn't fully support LBA addressing.

Changes:
  • ZIDEFS drive identification could result in an error being reported
  • ZIDEFS wasn't setting the partition limit for secondary drives
  • ZIDEFS was starting the first partition at LBA 0 to mirror the OEM. The first partition now starts at the second cylinder to avoid FileCore overwriting the partition table
  • ZIDEFS partition starts are now rounded up to the next cylinder to avoid overlapping the previous partition
  • added FNalign_partition_* to allow ZIDEFS to align new partitions to cylinders
  • ZIDEFS wasn't correcting the sector address to +1 when performing low level disc ops
  • Added FNcylinder_size(<drive>) to !RunImage for general use
  • Added Drive_Info%(<drive>, D_Addressing%) to track if a drive prefers CHS or LBA addressing. Modified FS.ZIDEFS and Formats.FileCore accordingly
  • Moved FNdecode_IDENTIFY into !RunImage and made it general use as its used by several filesystems that need to decode IDE IDENTIFY DEVICE
  • FS.ADFS, FS.HDFFS, FS.IDEFS, FS.ZIDEFS modified to use FNdecode_IDENTIFY
  • Adjusted the progress bar code to see if it now updates correctly
  • Deleting an ICS partition was failing to clear the partition table entry correctly
  • ICS partitioning wasn't allowing FAT partitions to be created
  • Added low-level IDE commands for ATAFS, which needs testing. It might identify drives and provide debug info to work out the partitioning scheme
  • Update Partitions.* to use PROCadd_unallocated_space
  • Moved the Partitions.ATAFS/IDEFS/ZIDEFS code into their FS.* files to avoid them being loaded if the filesystem isn't present
  • Added PROCadd_unallocated_space and modified all the partition code to use it to add any unused or inaccessible areas to the GUI
  • Added FNcmp64() to compare two unsigned 64bit values
  • FNvalid_range wasn't checking the range correctly
  • Reinstated the ADFS code that attempts to work out the size of ST506 drives
  • added PROCdismount_logical_drives() and modified all FNdetach_* to use it to dismount partitions before modifying a drive
  • added PROCrestart_filesystem() and modified all FNattach_* to use it to restart the Filesystem and Filer Wimp task
  • Formatting small FAT (10MB was the test) would attempt to write a negative sized block to the last FAT
  • FileCore no longer scans ADFS floppy discs when searching for a partition's logical drive name
  • Progress bar now refreshes the whole area to avoid stale Wimp updates
  • Added PROCadd_drives_progress() and modified all FS.* to use it
  • ZIDEFS *Configure ZIDEFSDrives now performed when the drives are reattached
  • ZIDEFS wasn't ignoring partitions that were 0 cyliders in size
  • ZIDEFS and ICS partitioning were not adding unallocated space between partitions correctly and were not allowing the area to be formatted
  • Modified the IDEFS read partition code to handle a bug in ICS IDEFS where later versions will report a drive failure if IDEFS fails to a valid partition table
  • Modified the FileCore partitioning code to always write a valid LBA 6 to work around a fatal bug in some versions of ICS IDEFS
  • ADFS based ST506 now use CHS addressing
  • MBR partition range validation altered to size-1 to work around some 3rd party MBR partitions ending one LBA beyond the drive limit
Hold ALT while launching to create a debug/txt file.

WARNING: Do not use this build to add a volume after a Pi's MBR partition's as it will erase the partition table. It will be fixed in the next build
JonAbbott
Posts: 2956
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: Partition Manager feedback

Post by JonAbbott »

v0.95 attached.

The ability to Backup/Restore the partition table has been added along with the ability to mount a FAT partition with FAT32FS.

HCCS and ZIDEFS will now offer to correct their *Configure parameters if the configured drives don't match a low-level drive scan. As non-existent drives can involve time-outs, the check is only performed when loading with CTRL held down, or via a manual drive refresh from the menu. Note that I still have some tweaking to do, to ensure that an initialised drive doesn't disappear after its wiped.

Changes:
  • When restarting a filesystem the filesystem Filer Wimp task is now asked to quit, before RMReInit'ing the Module
  • Holding CTRL while loading, or selecting "Refresh drives" will cause FS drivers to scan for missing drives. Currently only applicable to ZIDEFS and HCCS
  • If scanning for missing drives, HCCS will check if IDEFSDiscs matches the number of accessible drives and will prompt to correct if different
  • HCCS will correct IDEFSDelay to 8 if its configured lower
  • If scanning for missing drives, ZIDEFS will check if ZIDEFSDiscs matches the number of physical drives and will prompt to correct if different
  • IDEFS wasn't falling back to general DiscOp 3 when the Podule is unknown, causing drives hosted on Risc Developments IDE to not appear
  • HCCS was not forcing HCCS partitioning
  • HCCS and Simtec were not forcing CHS addressing
  • Now checks for open files before restarting a filesytem and wlll prompt allowing the restart to be cancelled
  • Will inform if open files are going to be forcibly closed when known logical drives are being dismounted prior to formatting or partitioning. This cannot be cancelled, so is informational only
  • Now dismounts a partition's logical drive (if known) prior to deletion, formatting, or extending
  • MBR partitioning wasn't using the correct limits when adding unallocated space at the end of the disc
  • FAT will now check if a FAT volume is mounted by FAT32FS
  • Added a Filesystem prefix to Partition information, used to track image based filesystems such as FAT32FS
  • Added FNcan_be_resized_<format> to allow Formats to notify the Wimp if Extend/Shrink volume are supported. Modified FAT/FileCore accordingly
  • MBR wasn't allowing four partitions to be created if the disc was formatted as a full-disc FileCore drive
  • MBR wasn't marking a reserved partition as a non-standard format, to prevent the previous partition from being extended into it
  • MBR now restricted to 2TB
  • "Refresh drives" menu is now shown when middle-clicking anywhere in the window
  • FAT32FS v1.60+ hosted drives will now use OS_FSControl 55/49 to retrieve the free space
  • MBR wasn't passing the first free LBA to PROCadd_unallocated_space, causing an unallocated area the size of the disc to be created
  • Modified MBR to track partitions as 64bit, to avoid the situation where a malformed partition size might wrap beyond a 32bit LBA
  • Format volume no longer refreshes the drives if cancelled
  • Modified the Wimp menu handler to allow items to move around
  • Added "Mount with FAT32FS" as a menu option on FAT partitions if FAT32FS is available and the partition isn't already mounted
  • Added Backup/Restore partition table for MBR, GPT and FileCore. As full-disc FileCore doesn't have a partition table, it stores/restores the first 6 LBA. HCCS and Simtec partitioning store LBA 6 from each partition. ICS partitioning stores/restores LBA 0 and 1
  • HDFFS wasn't allowing MBR, GPT or FAT to be used
  • RISC iX partitions were not being displayed
  • RISC iX is now shown within the hosting FileCore partition
  • Changed FileCore addressable area to be 64bit LBA addressing aware
  • DiscOp's via FNdiscop were not checking the version of FileCore before trying FileCore_SectorOp
19/03/23 UPDATE changes:
  • Moved non-Wimp code from Wimp to !RunImage and removed unused wimp code
  • Trying to select the File Allocation Unit size was throwing an error
  • Allocation Unit Size menu selection list wasn't being set to the LBA size for 4K sectors
  • added FNallocation_unit_size_<format> to allow Formats to specify their own list of unit sizes
  • "Initialise only" wasn't being greyed out correctly
  • Format partition dialogue was reducing the size of the partition even when cancelled
  • Volumes are now formatted before altering the partition table, to allow Formats to validate the partition area
  • Removed minimum volume size limit as the Format's now validate the size

Hold ALT while launching to create a debug/txt file.
Hold CTRL while launching to perform a low-level drive scan on HCCS/ZIDEFS based Podules.
JonAbbott
Posts: 2956
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: Partition Manager feedback

Post by JonAbbott »

v0.96 attached

The app window can now be resized, lots of bug fixes and all disc writes are now verified.

Changes:
  • GPT was not reducing the available disc space to avoid overwriting the backup GPT at the end of the disc
  • GPT wasn't marking unknown partitions as read-only
  • Added the ability to hide partitions completely from the GUI
  • Added partition count limit checking to GPT and warnings for invalid partition LBA ranges
  • Double the max partitions per drive to 16 and reduced the maximum number of physical drives to 12
  • Volume info frame was the wrong width
  • Window is now resized if the partitions don't fit in the window width
  • Reduced minimum WimpSlot to 350K
  • When adding unallocated space, it now ensures it doesn't exceed the max partitions of the program
  • Lowered the minimum size unallocated block to 2MB on GPT and ADFS
  • Increased minimum partition size to 2MB
  • Disc writes are now verified
  • GPT was writing the backup GPT past the end of the drive
  • Partitions are now scaled to the window size
  • Window width now snaps when near the end of the columns
  • Changed drive Free space to be specified in LBA instead of bytes
  • Change GB and TB calculations to be in 1000's
  • FAT was marking the wrong partitions as R/W
  • Writing the partition table to Simtec/HCCS was reporting a subscript error
  • Unified HCCS and Simtec partition reading
  • Increased minimum unallocated block to 2MB on IDEFS
  • Backup partition wasn't backing up the backup GPT
  • Moved all initialisation code into an Init overlay to regain 13KB
  • Moved HCCS hot-fix code from FS.IDEFS to Init to regain 2KB
  • Creating a new partition at max size was creating a partition that spanned all of the unallocated area, ignoring the filesystem limits. It now only uses the full unallocated area if Filecore is v2.51 or newer and there's less than 1MB remaining in the unallocated area
  • Max partition size is now limited based on the Filecore version:
    < v2.91 (pre RISC OS 3.60) - 512 MB
    >= v2.91 (post RISC OS 3.60) - 262144 MB (262 GB)
  • Adjusted Partitions.FileCore / FS.ADFS and FS/SCSIFS to observe the FileCore limits above
  • When formatting a new partition, it was not reducing the LBA count by 1 which caused FileCore to exceed its limit when formatting a 512MB partition pre RISC OS 3.60
  • Added progress updates to all format and partition table write code
  • Wasn't rounding up the partition size when setting the maximum size for a partition
  • ICS was writing the unusable area to the partition table
  • Partition_Info%(<drive>, P_Type%) is now used to track unusable areas, partitions being deleted and unallocated areas
  • When not in DEBUG mode FNadd_drives_ADFS, FNvolume_info_FAT, FNread_partition_table_IDEFS will fail silently
  • Changed PROCdismount_logical_drives to FNdismount_logical_drives to allow a cancel request to be passed back
  • ICS and ZIDEFS partitioning were not adding any unallocated space before the first partition
  • SCSIFS wasn't ignoring non-HD type devices
  • Added detection of D. T. Software IDEFS
User avatar
IanJeffray
Posts: 162
Joined: Mon Jan 18, 2021 1:51 pm

Re: Partition Manager feedback

Post by IanJeffray »

JonAbbott wrote: Sat Apr 01, 2023 9:39 pm [*] Max partition size is now limited based on the Filecore version:
< v2.91 (pre RISC OS 3.60) - 512 MB
>= v2.91 (post RISC OS 3.60) - 262144 MB (262 GB)
Perhaps warn that > 495MB is generally inefficient for < 3.6... or whatever the exact point is where PM jumps its LFAU around 499MB. (Most formatters IME it's 1013 cylinders, giving 499MB - for APDL, it's lower for some reason, and anything above 495MB jumps to 2K LFAU)
JonAbbott
Posts: 2956
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: Partition Manager feedback

Post by JonAbbott »

IanJeffray wrote: Sun Apr 02, 2023 2:30 pm Perhaps warn that > 495MB is generally inefficient for < 3.6... or whatever the exact point is where PM jumps its LFAU around 499MB
The default partition size is 495MB as you requested, so if you just accept defaults you'll get a 1K LFAU. The cutover to a 2K LFAU is 504MB and higher.

I'll look at changing the allocation size in the format window to show the LFAU that's going to be used.
User avatar
IanJeffray
Posts: 162
Joined: Mon Jan 18, 2021 1:51 pm

Re: Partition Manager feedback

Post by IanJeffray »

JonAbbott wrote: Sun Apr 02, 2023 6:29 pm
IanJeffray wrote: Sun Apr 02, 2023 2:30 pm Perhaps warn that > 495MB is generally inefficient for < 3.6... or whatever the exact point is where PM jumps its LFAU around 499MB
The default partition size is 495MB as you requested, so if you just accept defaults you'll get a 1K LFAU. The cutover to a 2K LFAU is 504MB and higher.

I'll look at changing the allocation size in the format window to show the LFAU that's going to be used.
Then I suggest the default be 504MB. Need to test that works correctly on Wizzo, etc. Any idea why other formatters end up with 499 and 495 as their limits? I'm guessing it's due to rounding errors in the code or something like that?
Post Reply