English Amiga Board


Go Back   English Amiga Board > Support > support.Hardware

 
 
Thread Tools
Old 17 June 2024, 16:39   #1
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 297
PFS3aio and TD64

Hello,
Is there a way to force PFS3 to use the TD64 or NSD command set ?
It always use Direct Scsi Commands and I suspect some bugs in my implementation of this, error 170, void sense error.
is it try to use a Write 12 command ?
Gilloo is offline  
Old 17 June 2024, 17:43   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,573
If dostype = PFSx: check TD64/NSD first. If failure: try DirectSCSI
If dostype = PDSx: check DirectSCSI first, if failure: try TD64/NSD.

Only SCSI READ(10) and WRITE(10) are used.

But if PFSx also tries to use DirectSCSI: something is wrong with TD64/NSD implementation.

TD64 test: TD_READ64 with zero address and zero length must return success (with io_Actual==0) or IOERR_BADLENGTH or IOERR_BADADDRESS. Partition's last block read must succeed.

ND64 test is same as above and also NSCMD_DEVICEQUERY must return success and at least NSCMD_TD_READ64 must be listed and type must be NSDEVTYPE_TRACKDISK.

DS test: TEST UNIT READY must return success. READ CAPACITY must return sane data. Also fail if partition last block is out of READ CAPACITY returned size. READ(10) last block read must succeed. Last block read of partition must succeed.

Most common bug is probably capacity read returning total size when it should return last block (=total - 1).
Toni Wilen is offline  
Old 18 June 2024, 12:25   #3
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 297
Thanks you Toni !

before (offset = io_Actual<<32 + io_Offset, before call, and after)
TD_READ64 [24](offset=0x0000000000000000 (0x0000000000000000) size=0)=>0
TD_READ64 [24](offset=0x00000003B07FFE00 (0x00000003B07FFE00) size=512)=>0
DS commands

now
TD_READ64 [24](offset=0x0000000000000000 (0x0000000000000000) size=0)=>0
TD_READ64 [24](offset=0x00000003B07FFE00 (0x00000200B07FFE00) size=512)=>0
TD_xx64 commands

The bug was that the io_Actual was never set to the value of amount of data transfered.
The io_Offset value should be altered to ?
Gilloo is offline  
Old Yesterday, 14:08   #4
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 297
PFSaio 19.2, block size 4096

Got some error like
Read 3 Error 42 on block xxx + 255

I suppose 255 x block size = 1044480 ~ 1MB,
The max transfer mask should be ajusted ?
Gilloo is offline  
Old Today, 06:28   #5
LIV2
Tinkerer
 
Join Date: Jan 2020
Location: NZ
Posts: 105
The error number is coming from the driver itself, whatever is causing it to throw HFERR_Phase is to blame.

Max transfer will depend on the driver and if it even needs it - It's mostly a kludge that shouldn't be needed if the driver is implemented correctly.
What kind of driver are you developing? IDE?

If so, you can transfer up to 256 sectors on a single READ/WRITE ATA command, above that you need to loop and issue another READ/WRITE (or limit max_transfer appropriately)
Here's how lide.device does a read
https://github.com/LIV2/lide.device/...ta.c#L477-L523

Last edited by LIV2; Today at 06:35.
LIV2 is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Testing PFS3AIO Toni Wilen support.Apps 23 12 January 2024 06:59
Issues with PFS3AIO PoulpSquad support.Apps 4 03 July 2022 21:31
Pfs3aio caver99 support.Apps 10 15 February 2022 19:03
PFS3AIO Questions manic23 support.Hardware 26 22 April 2014 13:49
Pfs3aio ???? stingray76 support.Hardware 2 19 February 2014 09:15

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 17:04.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.08811 seconds with 13 queries