English Amiga Board Amiga Lore


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 30 December 2015, 14:23   #1
sigma63
Registered User

 
Join Date: Oct 2014
Location: Berlin
Posts: 79
uaehf.device indeep documentation?

Hello Folks,

Question:
is there any indeep documentation about the supported
SCSI-Commands of the uaehf.device?

I used the search function to no avail.

Another Thing:
I am programming a tool that deals with RDB-Blocks and
Disk-Edit Functions. I realised, that the behavior of the
(if i remember right) ReadCapacity-Command changed
between some Version of WinUAE. (Now the total number of
Blocks is one more or less).

I have a proposal:
is it possible to bump the Versionnumber of the uaehf.device
in such cases to keep track of kludges/workarounds of such
cases?

Best Regards and a happy new year...
sigma63 is offline  
AdSense AdSense  
Old 30 December 2015, 15:35   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,542
Source is the only documentation.

SCSI Read Capacity was a bug (quite common bug, too easy to get it wrong), it should return last disk block number that can be read/written, not total number of blocks.

It is also too easy to forget to bump version..
Toni Wilen is offline  
Old 09 January 2016, 18:42   #3
sigma63
Registered User

 
Join Date: Oct 2014
Location: Berlin
Posts: 79
Hello Toni,

i looked at the Sources (mainly hardfile.cpp) and discovered, that you support the PMI-Bit in the Read Capacity(10) Command.

Unfotunately there is the same Error as in older Versions without the PMI-Bit set:
your returned Value in " RETURNED LOGICAL BLOCK ADDRES" is one to High!

I cite from the specs: "A PMI bit set to one specifies that the device server return information on the last logical block after that specified in the LOGICAL BLOCK ADDRESS field before a substantial vendor-specific delay in data transfer may be encountered".

Could you please fix that bug. TIA
sigma63 is offline  
Old 09 January 2016, 19:29   #4
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,542
I missed that code path completely.. Will be fixed in next beta.
Toni Wilen is offline  
Old 09 January 2016, 19:34   #5
sigma63
Registered User

 
Join Date: Oct 2014
Location: Berlin
Posts: 79


If you are digging in, could you please add the Mode Page with Code 0x3F: return all supported mode pages for the MODE SENSE Command.

Thank you soo much.
sigma63 is offline  
Old 09 January 2016, 19:55   #6
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,542
CD SCSI MODE SENSE did it already, HD didn't. (It is not really possible to unify them, they are far too different)

http://www.winuae.net/files/b/winuae.7z should fix both. Perhaps. I don't have any test cases..
Toni Wilen is offline  
Old 09 January 2016, 21:59   #7
sigma63
Registered User

 
Join Date: Oct 2014
Location: Berlin
Posts: 79


OK, both Issues are fixed!

But now i have the next wish:
Could you return the writeprotect-state of the media in the field "DEVICE-SPECIFIC PARAMETER"? Offset 2 for "MODE SENSE(6)" and 3 for "MODE SENSE(10)".
The meaning is 0x80 = write protected, 0x00 = not protected.

For testing i have written a little Program in former times.
It prints all the Mode Pages with all Field-Descriptions to stdout.
Its from the Year 2000, so no recent versions of the Specs are regarded.
If there is a need for, i can upload it.
sigma63 is offline  
Old 09 January 2016, 22:24   #8
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,542
Quote:
Originally Posted by sigma63 View Post
But now i have the next wish:
Could you return the writeprotect-state of the media in the field "DEVICE-SPECIFIC PARAMETER"? Offset 2 for "MODE SENSE(6)" and 3 for "MODE SENSE(10)".
The meaning is 0x80 = write protected, 0x00 = not protected.
This has been added long time ago. (p[2] = (hfd->ci.readonly || hfd->dangerous) ? 0x80 : 0x00;)

Do you also need MODE SENSE 10 support? (Also already done in CD emulation but not HD)
Toni Wilen is offline  
Old 09 January 2016, 22:38   #9
sigma63
Registered User

 
Join Date: Oct 2014
Location: Berlin
Posts: 79
I have to apologise, you are right, for Mode Select 6 it was already implemented

But yes, MODE SENSE(10) for HD would be very nice (because ATAPI-Devices like ZIP seem to use it).

I also realised, that accessing a Real IDE-ZIP-Device at the PC-Mainboard-IDE connected via"Add Harddrive" through the onboard IDE of A4000 (scsi.device) does not forward this Write-Protection-Status in the Mode Sense 6.
sigma63 is offline  
Old 10 January 2016, 09:32   #10
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,542
Quote:
Originally Posted by sigma63 View Post
I also realised, that accessing a Real IDE-ZIP-Device at the PC-Mainboard-IDE connected via"Add Harddrive" through the onboard IDE of A4000 (scsi.device) does not forward this Write-Protection-Status in the Mode Sense 6.
In this config you are using KS ROM scsi.device's SCSI emulation, UAE's scsi emulator is not in use:

Amiga-side SCSI command -> IDE scsi.device -> SCSI command translated to IDE command -> IDE command sent to hardware -> UAE IDE emulator receives it -> translates it to host OS block read/write command, not IDE or SCSI, just a normal read/write command, this also means emulated IDE IDENTIFY DRIVE does not return exactly same data as same physical drive in real Amiga, same with SCSI. (Special 3rd party drivers would be needed to send IDE/SCSI commands directly to physical HD device under Windows)
Toni Wilen is offline  
AdSense AdSense  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
uaehf.device and VERIFY (10) mark_k support.WinUAE 1 12 February 2014 19:08
hdInstools uaehf.device jimbobrocks92 support.Apps 4 14 January 2011 13:27
uaehf.device and HDToolbox: Error 224 reading device description Ebster support.WinUAE 3 16 September 2008 09:24
Uaehf.device and WB 3XXXXX Ninochka support.WinUAE 6 25 November 2003 22:39
uaehf.device Van Fanel support.WinUAE 0 15 March 2002 04:46

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 03:35.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.19684 seconds with 11 queries