From: ishikawa@ds5200.personal-media.co.jp (Chiaki Ishikawa)
Newsgroups: fj.sys.sun
Subject: Summary -- Using non-SUN SCSI CDROM. It DOES work.
Date: 16 Nov 92 07:42:32 GMT
Reply-To: ishikawa@personal-media.co.jp
Distribution: fj
Organization: Personal Media Corp., Tokyo Japan


$@@P@n!w(Jpersonal-media.co.jp$@$G$9!#(J

$@;0=54V$[$I$^$($K(JSUN$@$N%^%7%s$K(J SUN$@=c@5$G$J$$(JSCSI CD$@%I%i%$%V$r$D$J$0$3$H(J
$@$O$G$-$J$$$@$m$&$+$H$$$&<ALd$rEj9F$7$?$H$3$m<!$NJ}!9$+$i0J2<(J$@$N$h$&$JJV(J
$@;v$r$$$?$@$-$^$7$?!#(J

$@:G=*E*$K$O(J DENON DRD-253 $@$H$$$&%I%i%$%V$r!"(JSparcstation$@$K$D$J$$$G%^%&(J
$@%s%H$7$F%U%!%$%k$rFI$`$3$H$,$G$-$^$7$?!#$I$&$b3'$5$s$"$j$,$H$&$4$6$$$^(J
$@$9!#(J

$@0J2<$K$$$?$@$$$?JV;v$N%5(J$@%^%j!<$r$N$;$^$9!#(J

=======================================
Guy Harris
From: pmcgw!uunet!auspex.com!guy (Guy Harris)

SUN $@$N(J CD $@%I%i%$%V$O$I$&$b(J 512 byte/block $@E>Aw%b!<%I$rA0Ds$H$7$F$$$k$N(J
$@$G(J CD $@%I%i%$%V(J$@$b!"$3$N%I%i%$%P$NA[Dj$7$F$$$k%V%m%C%/%5%$%:$K2q$o$;$FE>(J
$@Aw$9$kI,MW$,$"$k$G$7$g$&!#(J

$@%7%9%F%`$N%3%s%U(J$@%#%.%e%l!<%7%g%s$r9T$J$&%*%V%8%'%/%H$NCf$N(Jhsfs_*.o $@$O(J 
High Sierra/ISO 9660 file system $@$r%5%]!<%H$7$F(J$@$$$F(J4.1.2 $@0J9_$G$O(J 
UNIX-style $@%U%!%$%kL>$r%5%]!<%H$9$k(J"Rock Ridge" $@3HD%$bF~$C$F$$$k$H;W$$(J
$@$^$9!#(J

========================================
Clifton Liles
Return-Path: <pmcgw!uunet!sweetpea.jsc.nasa.gov!liles>

SUN $@=c@5$G$J$/$F$b!"(J $@%V!<%H$G$-$J$$$3$H$r$N$>$1$P(J CD $@%I%i%$%V$O$D$J$,(J
$@$k$O$:$G$"$k!#!J$^$?%V!<(J$@%H$G$-$J$$0J30$K%7%9%F%`$N:F%j%s%/$,(JSUN$@$N(J CD 
$@G^BN$+$i$OD>@\$G$-$^$;$s!*(J[$@@P@n%3%a%s%H!'$J$<$+$o$+$i$J(J$@$$$,(J] $@!K(J

====================
Dan Lanciani
Return-Path: <pmcgw!uunet!burrhus.harvard.edu!ddl>

NEC CDR-72$@$O$=$N$^$^$G$O(J Sun3$@$H$O(J SCSI-2$@$G$b(J SCSI-3$@$G$b$&$^$/$D$J$,$j(J
$@$^$;$s!#$H$/$K(JSCSI-2$@$G$O!"(J $@?<9o$J(JSCSI $@%P%9%(%i!<$rBgNL$K5/$3$7$F$D$J$,$C(J
$@$F$$$F%G%#%9%/$N%j%U%)!<%^%C%H$,I,MW$K$J$C$F$7$^$$$^$7$?!#(J:-(

[$@@P@n%3%a%s%H!'(J512 bytes $@$H(J $@$=$&$G$J$$%V%m%C%/$N:9$G$7$g$&$+!)$^$?!"EE(J
$@8;$r$$$l$?$j@Z$C$?$j$K$h$C$F$b%((J$@%i!<$,5/$-$k$h$&$G$9!#(JCD$@%I%i%$%V$NEE8;(J
$@$OK\BN$,;_$^$C$?>uBV$G(Jon/off$@$7$^$7$g$&!#(J]

==============================
Derek Fawcus
Replyto: df@eyrie.demon.co.uk

$@$b$7%I%i%$%P!<$r$D$/$k$D$b$j$G%=!<%9$r$$$8$k5$(J$@$,$"$l$P!"(Jlinux$@$N(J CDROM
$@%U%!%$%k%5%]!<%H$N%=!<%9%U%!%$%k$,;29M$K$J$k$G$7$g$&!#(Jtsx-11.mit.edu$@$K(J
$@$"$j!"(J$@;d$NCN$k8B$j$G$O(JISO$@%U%)!<%^%C%H$H(J Rock Ridge$@3HD%$r%5%]!<%H$7$F$$(J
$@$^$9!#(J

========================================
Andrew Speedie
Return-Path: <pmcgw!uunet!cs.bham.ac.uk!A.H.Speedie-SE0>

SUN$@$N%(%s%8%K%"(J$@$+$iJ9$$$?$H$3$m$K$h$k$H!"$?$$$F$$$N(JCD$@%I%i%$%V$O(JSUN3/80
$@0J9_$N%^%7%s$J$i$P%+!<%M%k$NJQ99$J$7$K$D$J$,$k(J$@$H$$$&OC$7$G$9!#$?$@$7!"(J
$@%V!<%H$O(JSUN$@$N%I%i%$%V$+$i$7$+$G$-$^$;$s!#(J(SUN$@$N$b$N$O(JSONY$@$N%I%i%$%V$N(J
ROM$@$r=q(J$@$-JQ$($?$b$N$@$H$$$&$3$H$G$9!#(J) $@$G$9$+$i!"(JSUN3/80$@$K(JCD$@$r$D$J$$$G(J
$@$b%V!<%H$O$G$-$^$;$s!#E,Ev$J(JCD$@%I%i%$%V(J$@$G$?$a$7$F$_$?$i$I$&$G$7$g$&$+!#(J
Sun3/80$@$J$i$PF0$/$N$G$O$J$$$+$H;W$$$^$9!#(J

============================

$@Gt@n(J
From: kasukawa@gssm.otsuka.tsukuba.ac.jp (Masaatsu Kasukawa)
$@$R$-$?(J
From: hikita@trl.mei.co.jp (Hiroyuki Hikita)

$@0J>e$N$*Fs?M$+$i0JA0(Jcomp.sys.sun.hardware$@$K$J$,$l$?(JBob Hayes$@$N5-;v$r$$(J
$@$?$@$-$^(J$@$7$?!#$3$NCf$N5-;v$K$"$k%W%m%0%i%`$r;H$C$F!"(JDENON DRD-253 $@$H$$$&(JCD 
$@%I%i%$%V$r(JSparcstation$@$K$D$J$$$@$H(J$@$3$m%^%&%s%H$7$F%U%!%$%k$rFI$`$3$H$,(J
$@$G$-$^$7$?!#(J

$@0J>e$NJ}!9$I$&$b5-;v$r$"$j$,$H$&$4$6$$$^$7$?!#(J

$@5-(J$@;v$NCf$N%W%m%0%i%`$r;H$C$FF0:n<B83$9$k$N$K;~4V$,$+$+$j!JL$CN$N%O!<%I(J
$@%&%'%"$r$D$J$4$&$H$$$&$N$GB?>/$?(J$@$a$i$$$,$"$j$^$7$?!K!"%5%^%j!<$rEj9F$9(J
$@$k$N$,Aw$l$^$7$?$,!"F0:n$9$k$H$$$&7k2L$r$*CN$i$;$G$-$F9,$$$G$9(J$@!#(J

$@$$$?$@$$$?(JBob Hayes$@$N5-;v$rE:IU$7$^$9!#(J

	From: bob@henson.cc.wwu.edu (Bob Hayes)
	Newsgroups: comp.sys.sun.hardware
	Subject: SUMMARY: CD-ROMS- not SUN/SONY
	Summary: CDROM drives other than Sun/Sony
	Keywords: cdrom drives
	Message-ID: <1992Feb5.221925.24826@henson.cc.wwu.edu>
	Date: 5 Feb 92 22:19:25 GMT
	Organization: Western Washington University
	Lines: 156


My original query- can you use a CD-ROM drive other than
a Sony for Suns...Specifically a Toshiba 3301B from a
NeXT... generated several replies, from YES to NO-WAY...

The answer is YES for data, probably yes for audio.
For other drives than Toshiba??? Lets hear your results
when you try it!!

begin SOAPBOX
Let me say *THANKS* to EVERYONE who wrote to express
ANY thoughts !! We need all the discusion that we can handle,
we need all the ideas that we can think of, and then we can
sift for what ideas we need most, and save some for later.

This network stuff is the most far reaching, inclusive,
responsive, and open communications forum to have existed
on the planet! (add more adjectives as required)
May we continue the free, open interchange of ideas and
information!
end SOAPBOX

So what about the CD-ROM stuff??
The problem seems to be in the sector size read from the
scsi interface--- Sun expects 512 bytes, the default format
of the CD1 spec is (mode 1, with ECC) 2048 bytes per 'block'.

Is there an ftp site for the (red/blue/green?? rainbow) books
which have the CD specs and mode descriptions???

This is on a Sun LPC, SunOS 4.1.1b--
Patches which I tried in the kernel were not effective.
I posted. I read the mail. I tried it. IT WORKED!!

And the  GOOD STUFF, Thanks and a tip 'o the hat to Ralph,
who wrote:

~From: rkling@austin.intel.com (Ralph Kling)
	YES, it is possible! I have managed to connect one to a SS-2.
	However, there are a few differences between the SUN (=SONY) drive
	and the Toshiba drive. In particular, the SUN drive seems to use
	a default transfer block size of 512 bytes versus 2048 for the
	Toshiba. I wrote a little program that uses SUNs user-scsi-driver
	to correct this. You have to run that before trying to mount the
	drive! The "unrecognized vendor" message can be neglected.
	If you want to use the CD-audio capabilities you'll have to write
	your own driver (also via SUNs user-scsi-driver) since those commands
	are totally different from the SUN drive. Call Toshiba of America
	(sorry, I lost the number) and order the CD rom drive spec from them
	(will cost you $15).
	One more thing: The scsi-id for the CD rom needs to be 6.
	Good luck!!!

	Ralph


	Here is the program to set the transfer length to 512 bytes:

	-----------
	# include <sys/types.h>
	# include <sys/buf.h>
	# include <sun/dkio.h>
	# include <scsi/targets/srdef.h>
	# include <scsi/impl/uscsi.h>
	# include <strings.h>

	# include <stdio.h>

	char cdrom[] =	"/dev/rsr0";

	extern char *	cdrom_status();

	/* group 0 commands */

	#define TEST		0x00
	#define REZERO		0x01
	#define SENSEREQ	0x03
	#define READ		0x08
	#define SEEK		0x0b
	#define NOP		0x0d
	#define INQ		0x12
	#define MODESEL		0x15
	#define RESERVE		0x16
	#define RELEASE		0x17
	#define MODESENSE	0x1a
	#define STARTSTOP	0x1b
	#define DIAGRCV		0x1c
	#define DIAGSND		0x1d
	#define MEDIUMLOCK	0x1e

	/* group 1 commands */

	#define READCAP		0x25
	#define READEXT		0x28
	#define SEEKEXT		0x2b

	/* group 6 commands */

	#define AUDIOTRACK	0xc0
	#define AUDIOPLAY	0xc1
	#define AUDIOSTILL	0xc2
	#define AUDIOSTOP	0xc3
	#define EJECT		0xc4
	#define CLOSE		0xc5
	#define AUDIOSUB	0xc6
	#define AUDIODISK	0xc7
	#define ROMMODE		0xc8

	/***/

	#define CMDLEN(cmd) ((cmd >= 0x20) ? 10 :  6)

	/***/

	main() {
		int			fd;
		int			i;
		struct uscsi_cmd	ucmd;
		char * 			s_command;
		char *			s_buffer;

		if ((fd = open(cdrom, 0)) == -1) {
			fprintf(stderr, "open: ");
			perror(cdrom);
			exit(1);
		}
		s_command = (char *) malloc(10);
		if (s_command == NULL) {
			printf("malloc error (command)\n");
			exit(-1);
		}
		bzero(s_command, 10);
		s_buffer = (char *) malloc(256);
		if (s_buffer == NULL) {
			printf("malloc error (buffer)\n");
			exit(-1);
		}
		bzero(s_buffer, 256);
		s_command[0] = MODESEL;
		s_command[1] = 0x10;
		s_command[4] = 12;
		s_buffer[3] = 0x08;
		s_buffer[10] = 0x02;
		ucmd.uscsi_cdb = s_command;
		ucmd.uscsi_cdblen = 6;
		ucmd.uscsi_bufaddr = s_buffer;
		ucmd.uscsi_buflen = 4096;
		ucmd.uscsi_flags = USCSI_WRITE;
		i = ioctl(fd, USCSICMD, ucmd);
		close(fd);
		exit(i);
	}
	**************** end of Ralph's goodie ****************
	I can hear those odd-ball Cd-rom drives being hooked onto
	scsi busses already! 
	Bob Hayes <bob@cs.wwu.edu>
Newsgroups: fj.sys.sun