04 August 2013, 14:42 | #1 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,001
|
disk change does not work with emulated IDE CD drive
I add one iso image as IDE1, boot, run IDEfix, mount CD1:, nice.
Press F12, change image to another iso, press ok, nothing happens (change not recognised, all files from the first iso can still be read). Open a CLI and enter diskchange cd1:, cd1 becomes "not a disk disk". From then on IDE1 does not work any more, no matter if I use Ctrl-A-A, F12 + reset, F12 + restart + start, IDE1 remains "not a dos disk", even if I reinsert the first iso. Then I tried a real CD drive and a Windows CD emulation, both don't work as IDE1 at all. The volume name is shown, but only directories can be read. Trying to read files gets "Error -2" whatever that means. |
04 August 2013, 15:58 | #2 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,518
|
Idefix version? (Different versions may use different commands)
|
04 August 2013, 16:17 | #3 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,001
|
It's not related to IDEfix, does not work with scsi.device V43+, too.
IDEfix used is IDEfix97.lha from Aminet. |
04 August 2013, 19:32 | #4 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,518
|
It must be something to do with SCSI CD emulation media change update.
SCSI spec says TEST UNIT READY should return UNIT ATTENTION/MEDIUM MAY HAVE CHANGED sense status if media was changed. This error state is reset when REQUEST SENSE SCSI command is received. Apparently ATAPI does not use this system and requires polling (?), atapi.device keeps sending TEST UNIT READY, without reseting error state. But I found ATAPI CD datasheet that mentions MEDIUM MAY HAVE CHANGED sense code so I am not sure what ATAPI is supposed to do.. EDIT: I found official documentation that says ATAPI should work exact same. So something else is wrong.. Last edited by Toni Wilen; 04 August 2013 at 21:38. Reason: REQUEST SENSE, not INQUIRY clears error state |
04 August 2013, 22:29 | #5 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,001
|
I don't believe it's related to commands and replies. At least not solely. As I said if disk change fails once, something inside WinUAE has been destroyed which stays like this until WinUAE is quit. When I press F12 and click on Reset, I should get a completely new session. But nevertheless the ISO remains NDOS, no matter if it's the new or the old one. At least a CMD_READ (or similar SCSI command) should be able to read data from the disk, even if disk change was not recognised. But it isn't. Even if I load another config the CD drive at IDE1 does not work any more. Only if WinUAE is quit and run again, then CD emulation works again.
|
05 August 2013, 08:54 | #6 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,518
|
Reset does not clear media changed state. This is a bug.
But real problem is what I explained above, device driver never sends REQUEST SENSE = drive's media status change state is never cleared. Spec says all commands must return media change error code until it is cleared with request sense. |
05 August 2013, 10:46 | #7 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,518
|
TEST UNIT READY apparently also clears UNIT ATTENTION state. Can't find any information in SCSI specs but the internet says so.
|
05 August 2013, 11:01 | #8 |
Thalion Webshrine
Join Date: Jan 2004
Location: Oxford
Posts: 14,354
|
http://www.t10.org/ftp/x3t9.2/document.91/91-107r0.txt
"The initiator can clear pending unit attention conditions by repeatedly issuing TEST UNIT READY commands followed by REQUEST SENSE commands until a sense key other than UNIT ATTENTION is returned by the target." |
05 August 2013, 11:14 | #9 | |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,518
|
Quote:
Does it also mean REQUEST SENSE has nothing to do with clearing UNIT ATTENTION? TUR clears it and copies sense data to internal buffer, which caller can read (using REQUEST SENSE) if it bothers with it? |
|
05 August 2013, 18:09 | #10 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,518
|
http://www.winuae.net/files/b/winuae.zip should fix it (TEST UNIT READY will clear UA, REQUEST SENSE not required anymore)
|
05 August 2013, 21:13 | #11 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,001
|
Diskchange is fixed.
But reading from real CD still does not work. CacheCDFS says "volume xy has a read/write error". (log attached) Emulated Amiga stucks in init phase if CD drive is on IDE0, no matter if HDD on IDE1 or not. It also stucks if CD drive is on IDE1 with nothing on IDE0. The same CD drive is also found on uaescsi.device. Don't know if it is supposed to. Mounting a file system on both drives is bad (mounting exactly the same volume twice totally confuses AmigaDOS). |
05 August 2013, 21:38 | #12 | |||
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,518
|
Quote:
Quote:
Or does it also take long when it shouldn't? Quote:
|
|||
05 August 2013, 22:20 | #13 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,001
|
|
09 August 2013, 21:35 | #14 | |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,001
|
You were right. After waiting an incredible amount of time it finally started to boot. I imagine that the wait time on a real Amiga is not that long. Or does the wait time extend if there is an undetected (= ATAPI) device instead of no device?
Quote:
|
|
10 August 2013, 09:13 | #15 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,518
|
I only see the usual KS3.1 30s delay and about 10s if KS 3.0 or older.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Why does controller only work on port 2? How to change input targets? | jackhulk | New to Emulation or Amiga scene | 12 | 18 December 2012 16:37 |
Display problem in emulated A1200 with Hard Disk | Zagrebista | support.WinUAE | 4 | 15 February 2012 21:41 |
How to copy an application to an emulated disk. | Morbane | support.Amiga Forever | 0 | 29 December 2011 08:25 |
How do I change Hard Drive device ID # | barney | support.Hardware | 18 | 25 August 2009 00:23 |
How do I transfer my ADF files to my (emulated) hard disk? | Backyard_Rob | New to Emulation or Amiga scene | 1 | 07 June 2002 14:18 |
|
|