View Single Post
Old 26 August 2017, 12:55   #1
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,507
Fully KS 1.3 compatible large drive/partition FastFileSystem v44.5

Here is another KS 1.3 filesystem compatibility update, this time for v44.5 FastFileSystem.
This may have very limited use but PFS3AIO-like all-os-compatible FastFileSystem with
big drive/partition support didn't exist previously.

TEST VERSION. Do not upload to Aminet or similar sites!

Patch applies to http://aminet.net/package/disk/misc/ffstd64 (base filesystem comes with WB 3.1)

v44.5 is TD64 and DirectSCSI compatible and supports large partitions. Most 1.3 compatible HD SCSI
controllers are DirectSCSI compatible without size limits even if normal access mode has 1G or 4G limit.

WARNING: Compared to PFS3AIO, this is only a simple patch, it does not introduce any extra functionality,
like validating if complete partition is accessible and because FFS root block is located at the middle
of partition, partition will mount even if data after root block is inaccessible. (PFS3 "superblock"
is located in last block of partition)

WARNING: Some old HD SCSI controllers may not support HD_SCSICMD (DirectSCSI) and in worst case
they may use it for other purposes, possible destructive. Test it by running HDToolBox (don't use
drive that has important data!), if HDToolBox detects the drive: HD_SCSICMD is supported and working.
If not: Don't use it with >4G drives! Any HD_SCSICMD query program is also fine for testing this.
Most old IDE controllers probably have overflow bugs in HD_SCSICMD emulation if drive is too large.

NOTE: Read http://eab.abime.net/showthread.php?t=61666 first! This only changes KS 1.3 compatibility,
(previously it would just hang or crash) no drive size/partition size/size of universe limits change.
Free space shown will be very weird if >2G partition etc, the usual ..

KS 1.3 compatibility patches are applied on the fly, if system is >=v36, original unpatched code runs.

Patches applied:

- ACTION_STARTUP dp_Arg1 and dp_Arg3 are not valid under KS 1.3. (Same patch as in PFS3AIO)
- OpenLibrary("utility.library",36) disabled.
- utility.library UMult32 and UDivMod32 calls replaced.
- Requesters (read/write error, you must insert, validation error) replaced with calls to BCPL makesysreq().

r2:

- WB 1.3 "ghost" icon fix. ACTION_INFO/ACTION_DISK_INFO must always return DOS\0, even if dos type is DOS\1 or higher.

r3:

- Force Direct SCSI if device driver is scsi.device, all scsi.device variants support it and at least
CDTV scsi.device (and probably older A590/A2091 ROMs too) don't return error when calling unsupported
functions, causing TD64 misdetection.
- Fixed bug in SCSI direct code, it never set io_Length in SCSI direct mode. TD64 check sets it to larger than
required value (block size) but nothing sets it if TD64 is disabled.
- Always disable TD64 capability test under KS 1.3.

I also originally made KS 1.3 compatibility patch for v45.13 (v45.16) but it was totally useless because
v45 requires NSD if partition is outside of first 4G which no old controller boot rom supports.

Quick instructions:

Download http://aminet.net/package/disk/misc/ffstd64
Download patch file http://www.winuae.net/files/b/fastfi..._5_ks13_r3.zip
Unpack both to same directory
Find WB 3.1 disk or image (or other source for v40.1 L:FastFileSystem)
CD to directory where you unpacked both archives
Copy v40.1 FastFileSystem to current directory
Copy attached patch file (fastfilesystem_44_5_ks13.pch) to current directory
Create v44.5: spatch -ofastfilesystem_44_5 -pfastfilesystem_40_1.patch fastfilesystem
Create KS1.3 compatible: spatch -ofastfilesystem_44_5_ks13 -pfastfilesystem_44_5_ks13.pch fastfilesystem_44_5
Copy/Rename fastfilesystem_44_6_ks13 to L: (or somewhere else)
Use HDToolBox to install it.

NOTE: This thread is not for generic filesystem/hdtoolbox instructions.

FINAL WARNING: You should know what are you doing! Take backups. There is no guarantees. There is no support.

Tested with my usual SupraDrive 500XP and ACA500plus setups under KS 1.3 with 8G CF containing single 8G FFS partition.
also 10G partition was tested under emulation. (Filled it with 1.5G files, then checked SHA-1 hashes.)

Last edited by Toni Wilen; 03 September 2017 at 16:01.
Toni Wilen is offline  
 
Page generated in 0.07253 seconds with 11 queries