English Amiga Board Amiga Lore


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 13 January 2015, 20:58   #1
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,482
SCSI emulation issues (maybe)

I've been trying to get a config with HDF on Fastlane Z3 to boot, unsuccessfully so far. It's an A3000-like config with bootable uaehf HDF. For testing the HDF connected to the Fastlane just contains all zero bytes.

Running WinUAE (3.1.0b3) with -scsiemulog, emulation seems to get stuck after a small amount of SCSI commands. The last few SCSI lines in the log are:

SCSIEMU HD 0: 28.00.00.00.00.0F.00.00.01.00.00.00 CMDLEN=10 DATA=07491C50
-> DATAOUT=512 ST=0 SENSELEN=0 REPLYLEN=0
SCSIEMU HD 0: 00.20.00.00.00.00.00.00.01.00.00.00 CMDLEN=6 DATA=07491C50
UAEHF: unsupported scsi command 0x00 LUN=1
-> SENSE STATUS: KEY=5 ASC=24 ASCQ=00
70.00.05.00.00.00.00.00.00.00.00.00.24.00.00.00.00.00.
SCSIEMU HD 0: 12.20.00.00.FE.00.00.00.01.00.00.00 CMDLEN=6 DATA=07491C50
-> DATAOUT=36 ST=0 SENSELEN=0 REPLYLEN=36
REPLY: 7F.00.01.00.20.00.00.20.55.41.45.20.20.20.20.20.74.65.73.74.5F.34.47.42.2E.62.69.6E.20.20.20.20.30.2E.34.20.

So as far as I can tell, that means:
LUN 0, READ(10) of 1 sector, LBA 0x0F. [Fastlane ROM reading the last of the sectors where the RDB can be.]

LUN 1, TEST UNIT READY.
WinUAE emulates response from drive of sense key=5, asc=24 ascq=0
70.00.05.00.00.00.00.00.00.00.00.00.24.00.00.00.00.00.

70 is CHECK CONDITION, but the first byte is wrong I think. The valid bit (bit 7) should be 1, according to the SCSI-2 spec (s2-r10l.pdf page 159): "A valid bit of zero indicates that the information field is not as defined in this International Standard. A valid bit of one indicates the information field contains valid information as defined in this International Standard. Targets shall implement the valid bit."
So that should be F0 instead of 70.

05/24 = ILLEGAL REQUEST/INVALID FIELD IN CDB
I don't think that's the best response. Page 172 of s2-r10l.pdf lists preferred TEST UNIT READY responses. The most suitable in this case (LUN not present) would be ILLEGAL REQUEST/LOGICAL UNIT NOT SUPPORTED (05/25).


Also, the INQUIRY data looks like:
7F - peripheral qualifier/peripheral device type. 0x7F = "logical unit not present"
00 - RMB/device-type modifier
01 - ISO version=0, ECMA version=0, ANSI-approved version=1 "the device complies to ANSI X3.131-1986 (SCSI-1)"
00 - AENC/TrmIOP/Reserved/Response data format
20 - additional length (n-4)
00 - reserved
00 - reserved
20 - WBus16 bit set

Would it be better to put 02 for the third byte, to indicate compliance with SCSI-2? In the 8th byte the WBus16 bit is set. Was wide SCSI only supported with SCSI-2 and later? Pretty much the whole INQUIRY response is considered vendor-specific in SCSI-1.

I'm hoping a fix for these will solve the problems I had booting HDFs on GVP and Fastlane controllers. HDFs which have the "last LUN" bit set in the RDB probably aren't affected, since the ROM should never issue any commands to LUN 1 in that case.

Last edited by mark_k; 13 January 2015 at 21:14.
mark_k is online now  
AdSense AdSense  
Old 13 January 2015, 21:21   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,561
Quote:
Originally Posted by mark_k View Post
I've been trying to get a config with HDF on Fastlane Z3 to boot, unsuccessfully so far. It's an A3000-like config with bootable uaehf HDF. For testing the HDF connected to the Fastlane just contains all zero bytes.
Always also test non-A3000 config because there may be strange compatibility problems with A3000 built-in SCSI, perhaps even with some specific rom combinations.

Quote:
70 is CHECK CONDITION, but the first byte is wrong I think. The valid bit (bit 7) should be 1, according to the SCSI-2 spec (s2-r10l.pdf page 159): "A valid bit of zero indicates that the information field is not as defined in this
But SCSI-1 spec say "Validity Bit—1 if the Information Bytes (Bytes 3-6) are valid; 0 if not valid." Some errors put extra data in those bytes.

EDIT: Which explains it better than SCSI-2. "information field" = bytes 3-6. = valid bit should not be normally set, only if error uses those bytes, normally LBA when error is LBA-specific, like read error. (Used more with sequential devices)

Quote:
TEST UNIT READY responses. The most suitable in this case (LUN not present) would be ILLEGAL REQUEST/LOGICAL UNIT NOT SUPPORTED (05/25).
Which it was supposed to return but code execution fell back to default error case after setting 05/25 codes.. Fixed.

EDIT: SCSI CD emulation didn't even check for non-zero LUNs. Fixed also.

Quote:
01 - ISO version=0, ECMA version=0, ANSI-approved version=1 "the device complies to ANSI X3.131-1986 (SCSI-1)"
It was supposed to be 2 with "newer" controllers but part of code was copied from A590 emulation which uses SCSI-1 because original A590 install disk complains if INQUIRY returns anything else than 1. (It should be configurable too but not really that important)

Last edited by Toni Wilen; 14 January 2015 at 17:01. Reason: more information about validity bit
Toni Wilen is online now  
Old 17 January 2015, 19:40   #3
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,561
Does it work now? (winuae.zip has updated LUN stuff, no official beta yet because of problems with chipset updates..)
Toni Wilen is online now  
Old 17 January 2015, 21:15   #4
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,482
The change doesn't seem to have fixed the Fastlane behaviour, I still can't get it to boot.

In fact (this is probably the same as with the official beta 3) with an A3000/040-like config with Fastlane-connected NetBSD HDF, there doesn't seem to be any SCSI I/O to the Fastlane (get to purple insert disk screen). The only SCSI-related log output with -scsiemulog was "A3000 WD33C93 in use". With similar A4000 config there is no SCSI-related output at all. Or maybe there's something wrong with my config; booting from a WB 3.1 floppy and running SCSIConfig2 from the Fastlane software disk, that doesn't seem to detect the Fastlane board either.
Attached Files
File Type: zip NetBSD5.2_Fastlane_configs.zip (6.4 KB, 37 views)
mark_k is online now  
Old 17 January 2015, 21:27   #5
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,561
Not sure if this helps but add some Z3 fast or at least set UAE mapping mode to "real". (Old code that ignores Z3 init if z3 ram and z3 rtg are not used)

If still not working, attach also log.
(No idea about A3000 problem)
Toni Wilen is online now  
Old 18 January 2015, 17:05   #6
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,482
It didn't help (testing with 3.1.0b4 now).

It's really strange. I have one config which has a bootable UAE HDF plus Fastlane-connected blank HDF. On starting that there is SCSI I/O to the Fastlane. But with the other two configs I attached above, there was no SCSI I/O at all (with -scsiemulog).

Booting A3000/040 or A4000/040 configs with Fastlane-connected HDF, this line was repeated 14 times before the insert disk animation appears:
scsi_req_cancel
But that doesn't happen on every run.
Attached Files
File Type: zip Fastlane_problem_logs.zip (17.2 KB, 47 views)
mark_k is online now  
Old 18 January 2015, 17:21   #7
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,561
I managed to duplicate it with your config, driver appears to do things differently depending on type of RAM available (chip, z2 or z3).

winuae.zip updated.
Toni Wilen is online now  
Old 18 January 2015, 18:27   #8
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,482
Latest winuae.exe is a little different. With some configs (the ones with UAE HDF as well) there similar SCSI I/O logged to the first post in this thread. After that log output the boot process seems to hang.

With the NetBSD_5.2_A4000_040_Fastlane.uae config there's no SCSI I/O at all.
mark_k is online now  
Old 18 January 2015, 18:35   #9
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,561
Quote:
With the NetBSD_5.2_A4000_040_Fastlane.uae config there's no SCSI I/O at all.
I loaded your config, only changed HDF to my test RDB HDF and started it.

Code:
SCSIEMU HD 0: 00.00.00.00.00.00.00.00.00.00.00.00 CMDLEN=6 DATA=0EEF4538
SCSIEMU HD 0: 12.00.00.00.FE.00.00.00.00.00.00.00 CMDLEN=6 DATA=0EEF4538
-> DATAOUT=36 ST=0 SENSELEN=0 REPLYLEN=36
REPLY: 00.00.02.02.20.00.00.00.55.41.45.20.20.20.20.20.61.35.30.30.73.75.70.72.6
1.64.72.69.76.65.2E.20.30.2E.34.20.
SCSIEMU HD 0: 1B.00.00.00.01.00.00.00.00.00.00.00 CMDLEN=6 DATA=0EEF4538
-> DATAOUT=0 ST=0 SENSELEN=0 REPLYLEN=0
SCSIEMU HD 0: 00.00.00.00.00.00.00.00.00.00.00.00 CMDLEN=6 DATA=0EEF4538
SCSIEMU HD 0: 25.00.00.00.00.00.00.00.00.00.00.00 CMDLEN=10 DATA=0EEF4538
-> DATAOUT=8 ST=0 SENSELEN=0 REPLYLEN=8
REPLY: 00.3C.D0.DF.00.00.02.00.
SCSIEMU HD 0: 1A.00.00.00.0C.00.00.00.00.00.00.00 CMDLEN=6 DATA=0EEF4538
-> DATAOUT=12 ST=0 SENSELEN=0 REPLYLEN=12
REPLY: 0B.00.00.08.00.3C.D0.E0.00.00.02.00.
SCSIEMU HD 0: 28.00.00.00.00.00.00.00.01.00.00.00 CMDLEN=10 DATA=0EEF4538
-> DATAOUT=512 ST=0 SENSELEN=0 REPLYLEN=0
SCSIEMU HD 0: 28.00.00.00.00.01.00.00.01.00.00.00 CMDLEN=10 DATA=0EEF4538
-> DATAOUT=512 ST=0 SENSELEN=0 REPLYLEN=0
SCSIEMU HD 0: 28.00.00.00.00.03.00.00.01.00.00.00 CMDLEN=10 DATA=0EEF4538
-> DATAOUT=512 ST=0 SENSELEN=0 REPLYLEN=0
SCSIEMU HD 0: 28.00.00.00.00.04.00.00.01.00.00.00 CMDLEN=10 DATA=0EEF4538
-> DATAOUT=512 ST=0 SENSELEN=0 REPLYLEN=0
Toni Wilen is online now  
Old 20 January 2015, 14:10   #10
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,482
Maybe there's some other factor. Perhaps loading a new config doesn't fully reset which controller WinUAE thinks the HDF is connected to (hence no SCSI I/O sometimes)? I still haven't figured out how to get anything to boot on the Fastlane!
mark_k is online now  
Old 20 January 2015, 14:18   #11
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,561
Quote:
Originally Posted by mark_k View Post
Maybe there's some other factor. Perhaps loading a new config doesn't fully reset which controller WinUAE thinks the HDF is connected to (hence no SCSI I/O sometimes)? I still haven't figured out how to get anything to boot on the Fastlane!
Then remove the unknown variable and always quit completely before loading new config.
Toni Wilen is online now  
Old 23 January 2015, 14:42   #12
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,561
Does Fastlane appear in early boot expansion list? (I found bug that causes it to be not detected if Z3 autoconfig is not enabled and possibly in some other situations)
Toni Wilen is online now  
Old 23 January 2015, 15:08   #13
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,482
Trying just now with 3.1b5 and A3000/040-like config with no Z3 RAM, the Fastlane did appear in the boards list. And my usual HDF (from my old A2000, it may originally have been partitioned using the GVP FaastPrep program) did boot when connected to the Fastlane. Still no luck booting a NetBSD HDF.
mark_k is online now  
Old 23 January 2015, 16:25   #14
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,561
Driver seems to reject RDB or partition blocks. It reads them (data is correct), then it checks if LUN=1 exists, finally retries RDB blocks again and aborts.

"Normal" RDB: reads RDB blocks only once, LUN=1 check only once.
Toni Wilen is online now  
Old 23 January 2015, 17:43   #15
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,482
Strange, because in the NetBSD_4GB_HD.bin HDF's RDB flags the LAST, LASTLUN and LASTTID flags are all set, so you'd expect the boot ROM to not attempt to talk to LUN 1. I tried clearing those flags using RDBFlags but that made no difference.
mark_k is online now  
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
scsi emulation configuration problem shutter support.WinUAE 4 11 April 2013 08:31
Help! Trying to get my head around SCSI cabling issues... ElectroBlaster support.Hardware 3 19 February 2013 18:34
Blizzard SCSI-IV issues - MO Drive & CD-RW merlinkv support.Hardware 0 11 June 2010 11:04
3000D SCSI issues Dreamcast270mhz support.Hardware 8 08 February 2010 15:48
cyberstormPPC users, SCSI issues superBuster support.Hardware 28 07 December 2006 20:36

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 13:16.


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