English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 04 August 2013, 14:42   #1
thomas
Registered User
 
thomas's Avatar
 
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.
Attached Files
File Type: txt winuaebootlog_iso.txt (15.3 KB, 109 views)
File Type: txt winuaelog_iso.txt (10.8 KB, 120 views)
File Type: txt winuaebootlog_real.txt (15.4 KB, 124 views)
File Type: txt winuaelog_real.txt (9.9 KB, 126 views)
thomas is offline  
Old 04 August 2013, 15:58   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,518
Idefix version? (Different versions may use different commands)
Toni Wilen is offline  
Old 04 August 2013, 16:17   #3
thomas
Registered User
 
thomas's Avatar
 
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.
thomas is offline  
Old 04 August 2013, 19:32   #4
Toni Wilen
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
Toni Wilen is offline  
Old 04 August 2013, 22:29   #5
thomas
Registered User
 
thomas's Avatar
 
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.
thomas is offline  
Old 05 August 2013, 08:54   #6
Toni Wilen
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.
Toni Wilen is offline  
Old 05 August 2013, 10:46   #7
Toni Wilen
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.
Toni Wilen is offline  
Old 05 August 2013, 11:01   #8
alexh
Thalion Webshrine
 
alexh's Avatar
 
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."
alexh is offline  
Old 05 August 2013, 11:14   #9
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,518
Quote:
Originally Posted by alexh View Post
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."
Yes, TEST UNIT READY + REQUEST SENSE is documented. But only executing TUR until status is not CHECK CONDITION also works (which is what atapi.device does), REQUEST SENSE is not needed to clear it.

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?
Toni Wilen is offline  
Old 05 August 2013, 18:09   #10
Toni Wilen
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)
Toni Wilen is offline  
Old 05 August 2013, 21:13   #11
thomas
Registered User
 
thomas's Avatar
 
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).
Attached Files
File Type: txt winuaelog.txt (25.0 KB, 114 views)
thomas is offline  
Old 05 August 2013, 21:38   #12
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,518
Quote:
Originally Posted by thomas View Post
Diskchange is fixed.

But reading from real CD still does not work. CacheCDFS says "volume xy has a read/write error". (log attached)
Fixed. I thought this was same problem and didn't test it..

Quote:
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.
This is KS 3.1 long IDE detection. (At least here it continues booting after the delay) I haven't found any way to handle this faster without doing something that is against IDE or ATAPI spec (=can break non-AOS operating systems). It can only work when no drives are connected.

Or does it also take long when it shouldn't?

Quote:
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).
From UAE point of view it does not matter but perhaps uaescsi.device shouldn't enable it if drive is already IDE or SCSI mounted..
Toni Wilen is offline  
Old 05 August 2013, 22:20   #13
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 7,001
Quote:
Originally Posted by Toni Wilen View Post
This is KS 3.1 long IDE detection.
I think I did wait long enough to exclude this. But not entirely sure. Will do more tests tomorrow.


Quote:
perhaps uaescsi.device shouldn't enable it if drive is already IDE or SCSI mounted..
This would be a good idea.
thomas is offline  
Old 09 August 2013, 21:35   #14
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 7,001
Quote:
Originally Posted by Toni Wilen View Post
This is KS 3.1 long IDE detection.
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:
Fixed. I thought this was same problem and didn't test it..
Confirmed.
thomas is offline  
Old 10 August 2013, 09:13   #15
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,518
Quote:
Originally Posted by thomas View Post
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?
I only see the usual KS3.1 30s delay and about 10s if KS 3.0 or older.
Toni Wilen 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
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

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 06:47.

Top

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