home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / sun / hardware / 5652 < prev    next >
Encoding:
Text File  |  1992-11-16  |  8.5 KB  |  275 lines

  1. Xref: sparky comp.sys.sun.hardware:5652 comp.sys.sun.misc:5282 comp.multimedia:3372
  2. Path: sparky!uunet!pmcgw!ds5200.personal-media.co.jp
  3. From: ishikawa@ds5200.personal-media.co.jp (Chiaki Ishikawa)
  4. Newsgroups: comp.sys.sun.hardware,comp.sys.sun.misc,comp.multimedia
  5. Subject: SUMMARY. Non-SUN SCSI CDROM. It DOES work.
  6. Message-ID: <ISHIKAWA.92Nov16171151@ds5200.personal-media.co.jp>
  7. Date: 16 Nov 92 08:11:51 GMT
  8. Sender: news@pmcgw.personal-media.co.jp
  9. Reply-To: ishikawa@personal-media.co.jp
  10. Followup-To: comp.sys.sun.hardware
  11. Organization: Personal Media Corp., Tokyo Japan
  12. Lines: 260
  13. Nntp-Posting-Host: ds5200
  14.  
  15.  
  16. About 3 weeks ago, I asked the net if a non-SUN SCSI CDROM drive can
  17. be hooked up to a Sun workstation to read the files on CDROM.
  18.  
  19. I have received many replies. In the end, I could use a little program
  20. posted by Bob Hayes earlier this year to connect DENON DS-253 CD drive
  21. to our sparcstation and read a mounted CDROM file system!
  22.  
  23. It took me a while to post the summary since I wanted to test the
  24. little program to see if it works with our CDROM drive, and there was
  25. a little trepidation on my side to connect the unknown hardware to
  26. Sparcstation, but I am happy to report that I've found it works!
  27.  
  28. Thank you again everyone for the answers!
  29.  
  30. Here are the EDITED answers.
  31.  
  32. -------------------------------------------------------
  33. Guy Harris
  34. From: pmcgw!uunet!auspex.com!guy (Guy Harris)
  35.  
  36. The Sun driver probably assumes that the CD-ROM drive can be put into
  37. "512 bytes per block" mode, or is always in that mode. 
  38.  
  39. The "hsfs_*.o" files implement a High Sierra/ISO 9660 file system, and
  40. in 4.1.2 and later releases also implements the "Rock Ridge"
  41. extensions to better support UNIX-style file names and the like.
  42.  
  43. ----------------------------------------
  44. Clifton Liles
  45. From: Clifton Liles 282-4736 <pmcgw!uunet!sweetpea.jsc.nasa.gov!liles>
  46.  
  47. My information is other SCSI players will work for everything BUT
  48. booting.  You can not build a system from the distrbution media!  
  49.  
  50. [Ishikawa comment: I wonder why.]
  51.  
  52. ----------------------------------------
  53. Dan Lanciani
  54. Return-Path: <pmcgw!uunet!burrhus.harvard.edu!ddl>
  55.  
  56. NEC CDR-72 doesn't work with a Sun-3, using either the SCSI-2 or
  57. SCSI-3 host adapters.  It generated a string of horrible SCSI bus
  58. errors and corrupted the hard disk to the extent that I had to
  59. reformat...
  60.  
  61. [Ishikawa comment: My colleague who actually tested the connection
  62. told me that he experienced a disk error when he switched on/off the
  63. CD drive while the system is running. So DON'T try to turn on/off the
  64. CD drive WHILE the system is running!]
  65.  
  66. ----------------------------------------
  67. Derek Fawcus
  68. Return-Path: <pmcgw!uunet!eyrie.demon.co.uk!df>
  69.  
  70. You could look at the linux CDROM file system sources, they're
  71. available on tsx-11.mit.edu and AFAIK it fully implements the ISO
  72. format with rock ridge extensions.
  73.  
  74. ----------------------------------------
  75. Andrew Speedie
  76. From: uunet!cs.bham.ac.uk!A.H.Speedie-SE0
  77.  
  78. According to a Sun engineer, most CD drives will work on SUN 3/80 and
  79. up, without any special modification to the kernel. The only problem
  80. is that you can only boot from a SUN CD drive and they are SONY drives
  81. with a firmware upgrade. And also you can't boot a 3/80 from a CD.
  82.  
  83. [ishikawa comment: I have not tested Sun3 hardware yet.]
  84.  
  85. ----------------------------------------
  86. Kasukawa, Masaatsu
  87. From: kasukawa@gssm.otsuka.tsukuba.ac.jp (Masaatsu Kasukawa)
  88. Hikita, Hiroyuki
  89. Return-Path: <hikita@trl.mei.co.jp>
  90.  
  91. From the two gentlemen above, I have received a copy of an article Bob
  92. Hayes posted earlier this year to comp.sun.hardware. This ultimately
  93. enabled me to connect the DENON DS-253 CDROM drive to a Sparcstation
  94. successfully!  (Unfortunately since it is encased in an external
  95. chassis, and I don't want to open the box right now, I don't know
  96. exactly whose CDROM drive is in the box.)
  97.  
  98. For your information, I attach the copy of Bob Hayes article: I
  99. believe there must be many people wondering if they can connect
  100. non-SUN CDROM to Sunworkstations.
  101.  
  102. Thank you again everyone for the information!
  103.  
  104. ishikawa@personal-media.co.jp
  105.  
  106. -------- quote --------------------------
  107.  
  108. From: bob@henson.cc.wwu.edu (Bob Hayes)
  109. Newsgroups: comp.sys.sun.hardware
  110. Subject: SUMMARY: CD-ROMS- not SUN/SONY
  111. Summary: CDROM drives other than Sun/Sony
  112. Keywords: cdrom drives
  113. Message-ID: <1992Feb5.221925.24826@henson.cc.wwu.edu>
  114. Date: 5 Feb 92 22:19:25 GMT
  115. Organization: Western Washington University
  116. Lines: 156
  117.  
  118.  
  119. My original query- can you use a CD-ROM drive other than
  120. a Sony for Suns...Specifically a Toshiba 3301B from a
  121. NeXT... generated several replies, from YES to NO-WAY...
  122.  
  123. The answer is YES for data, probably yes for audio.
  124. For other drives than Toshiba??? Lets hear your results
  125. when you try it!!
  126.  
  127. begin SOAPBOX
  128. Let me say *THANKS* to EVERYONE who wrote to express
  129. ANY thoughts !! We need all the discusion that we can handle,
  130. we need all the ideas that we can think of, and then we can
  131. sift for what ideas we need most, and save some for later.
  132.  
  133. This network stuff is the most far reaching, inclusive,
  134. responsive, and open communications forum to have existed
  135. on the planet! (add more adjectives as required)
  136. May we continue the free, open interchange of ideas and
  137. information!
  138. end SOAPBOX
  139.  
  140. So what about the CD-ROM stuff??
  141. The problem seems to be in the sector size read from the
  142. scsi interface--- Sun expects 512 bytes, the default format
  143. of the CD1 spec is (mode 1, with ECC) 2048 bytes per 'block'.
  144.  
  145. Is there an ftp site for the (red/blue/green?? rainbow) books
  146. which have the CD specs and mode descriptions???
  147.  
  148. This is on a Sun LPC, SunOS 4.1.1b--
  149. Patches which I tried in the kernel were not effective.
  150. I posted. I read the mail. I tried it. IT WORKED!!
  151.  
  152. And the  GOOD STUFF, Thanks and a tip 'o the hat to Ralph,
  153. who wrote:
  154.  
  155. ~From: rkling@austin.intel.com (Ralph Kling)
  156.     YES, it is possible! I have managed to connect one to a SS-2.
  157.     However, there are a few differences between the SUN (=SONY) drive
  158.     and the Toshiba drive. In particular, the SUN drive seems to use
  159.     a default transfer block size of 512 bytes versus 2048 for the
  160.     Toshiba. I wrote a little program that uses SUNs user-scsi-driver
  161.     to correct this. You have to run that before trying to mount the
  162.     drive! The "unrecognized vendor" message can be neglected.
  163.     If you want to use the CD-audio capabilities you'll have to write
  164.     your own driver (also via SUNs user-scsi-driver) since those commands
  165.     are totally different from the SUN drive. Call Toshiba of America
  166.     (sorry, I lost the number) and order the CD rom drive spec from them
  167.     (will cost you $15).
  168.     One more thing: The scsi-id for the CD rom needs to be 6.
  169.     Good luck!!!
  170.  
  171.     Ralph
  172.  
  173.  
  174.     Here is the program to set the transfer length to 512 bytes:
  175.  
  176.     -----------
  177.     # include <sys/types.h>
  178.     # include <sys/buf.h>
  179.     # include <sun/dkio.h>
  180.     # include <scsi/targets/srdef.h>
  181.     # include <scsi/impl/uscsi.h>
  182.     # include <strings.h>
  183.  
  184.     # include <stdio.h>
  185.  
  186.     char cdrom[] =    "/dev/rsr0";
  187.  
  188.     extern char *    cdrom_status();
  189.  
  190.     /* group 0 commands */
  191.  
  192.     #define TEST        0x00
  193.     #define REZERO        0x01
  194.     #define SENSEREQ    0x03
  195.     #define READ        0x08
  196.     #define SEEK        0x0b
  197.     #define NOP        0x0d
  198.     #define INQ        0x12
  199.     #define MODESEL        0x15
  200.     #define RESERVE        0x16
  201.     #define RELEASE        0x17
  202.     #define MODESENSE    0x1a
  203.     #define STARTSTOP    0x1b
  204.     #define DIAGRCV        0x1c
  205.     #define DIAGSND        0x1d
  206.     #define MEDIUMLOCK    0x1e
  207.  
  208.     /* group 1 commands */
  209.  
  210.     #define READCAP        0x25
  211.     #define READEXT        0x28
  212.     #define SEEKEXT        0x2b
  213.  
  214.     /* group 6 commands */
  215.  
  216.     #define AUDIOTRACK    0xc0
  217.     #define AUDIOPLAY    0xc1
  218.     #define AUDIOSTILL    0xc2
  219.     #define AUDIOSTOP    0xc3
  220.     #define EJECT        0xc4
  221.     #define CLOSE        0xc5
  222.     #define AUDIOSUB    0xc6
  223.     #define AUDIODISK    0xc7
  224.     #define ROMMODE        0xc8
  225.  
  226.     /***/
  227.  
  228.     #define CMDLEN(cmd) ((cmd >= 0x20) ? 10 :  6)
  229.  
  230.     /***/
  231.  
  232.     main() {
  233.         int            fd;
  234.         int            i;
  235.         struct uscsi_cmd    ucmd;
  236.         char *             s_command;
  237.         char *            s_buffer;
  238.  
  239.         if ((fd = open(cdrom, 0)) == -1) {
  240.             fprintf(stderr, "open: ");
  241.             perror(cdrom);
  242.             exit(1);
  243.         }
  244.         s_command = (char *) malloc(10);
  245.         if (s_command == NULL) {
  246.             printf("malloc error (command)\n");
  247.             exit(-1);
  248.         }
  249.         bzero(s_command, 10);
  250.         s_buffer = (char *) malloc(256);
  251.         if (s_buffer == NULL) {
  252.             printf("malloc error (buffer)\n");
  253.             exit(-1);
  254.         }
  255.         bzero(s_buffer, 256);
  256.         s_command[0] = MODESEL;
  257.         s_command[1] = 0x10;
  258.         s_command[4] = 12;
  259.         s_buffer[3] = 0x08;
  260.         s_buffer[10] = 0x02;
  261.         ucmd.uscsi_cdb = s_command;
  262.         ucmd.uscsi_cdblen = 6;
  263.         ucmd.uscsi_bufaddr = s_buffer;
  264.         ucmd.uscsi_buflen = 4096;
  265.         ucmd.uscsi_flags = USCSI_WRITE;
  266.         i = ioctl(fd, USCSICMD, ucmd);
  267.         close(fd);
  268.         exit(i);
  269.     }
  270. **************** end of Ralph's goodie ****************
  271. I can hear those odd-ball Cd-rom drives being hooked onto
  272. scsi busses already! 
  273. Bob Hayes <bob@cs.wwu.edu>
  274. -------- quote end --------------------------
  275.