Newsgroups: fj.sys.sun
Path: galaxy.trc.rwcp.or.jp!jaist-news!cs.titech!nirvana.cs.titech!wnoc-tyo-news!sh.wide!wnoc-kyo-news!rinsgw!fujii
From: fujii@eletex (Fujii Daisuke)
Subject: Q:JCClassic to 3 devices(long)
Message-ID: <CpvJMp.BL1@rins.ryukoku.ac.jp>
Summary: Summary of answers
Sender: news@rins.ryukoku.ac.jp
Nntp-Posting-Host: eletex.elec.ryukoku.ac.jp
Organization: Ryukoku Univ., Seta, Otsu, Japan
X-Newsreader: TIN [version 1.2 PL0]
Date: Mon, 16 May 1994 02:44:48 GMT
Lines: 192
Xref: galaxy.trc.rwcp.or.jp fj.sys.sun:5446
X-originally-archived-at: http://galaxy.rwcp.or.jp/text/cgi-bin/newsarticle2?ng=fj.sys.sun&nb=5446&hd=a
X-reformat-date: Mon, 18 Oct 2004 15:18:22 +0900
X-reformat-comment: Tabs were expanded into 4 column tabstops by the Galaxy's archiver. See http://katsu.watanabe.name/ancientfj/galaxy-format.html for more info.

$BF#0fBgJe!wN6C+Bg(B(fujii@rins.ryukoku.ac.jp)$B$G$9!#(B

$B8fNi(B&Summary$B$,CY$/$J$C$F$b$&$7$o$1$"$j$^$;$s!#(B

$B!v$3$A$i$N@_Dj$NIT<j:]$G!"(BFrom$B$NMs$K%I%a%$%sL>$,$D$-$^$;$s!#(B
$B!v$?$@$$$^D4@0$7$F$$$^$9$N$G!"$*$f$k$7$/$@$5$$$^$;!#(B

printer,CD-ROM,EXABYTE$B$K$+$s$7$F<ALd$r$5$;$F$$$?$@$-$^$7$?$,!"(B
$B%a!<%k$*$h$S%K%e!<%9>e$G$$$m$$$m$H%"%I%P%$%9$r$$$?$@$-$^$7$?!#(B
$B0J2<$K$^$H$a$5$;$F$$$?$@$-$^$9!#(B($B$^$?$b$d(Blong MSG$B$G$9$,!&!&(B)


<1> PS$B%W%j%s%?$H$N@\B3$K$D$$$F(B

$B!!!&4pK\E*$J$3$H$@$=$&$G$9$,!"%G!<%?$rAw$C$?$"$H$K(B'^D'$B$rAw$k$3$H$r(B
$B!!!!$7$F$$$^$;$s$G$7$?!#(B'^D'$B$rAw$k$h$&$J9)IW$r$7$?$H$3$m!"LdBj$J$/(B
$B!!!!0u;z$G$-$k$h$&$K$J$j$^$7$?!#(B
$B!!!&8=:_$N@_Dj$r$^$H$a$F$*$-$^$9!#(B

- $B%]!<%H(B :/dev/ttya
- $BB.EY(B   :19200 bps
- XON/OFF: on
- /etc/printcap$B$NFbMF$O!&!&!&(B

lp|oki|psprt|ML-801PS Oki Micro Line 801PS by ttya port:\
:lp=/dev/ttya:\
:br#19200:fc#0177777:fs#06320\
:px#1888:py#2710:\
:pl#88:pw#128:ln#66:mx#0:Wr:\
:ms=-parity,-tabs,ocrnl,onlcr,-onlret,ixon:\
:sd=/usr/spool/lp:lf=/usr/adm/lpd-errs:\
:af=/usr/adm/lpd-acct:\
:if=/usr/local/lib/filter/autoend:\
:sh:sb:sf:

- if$B$G;XDj$7$?(B /usr/local/lib/filter/autoend $B$NFbMF$O!&!&(B

#!/bin/sh
cat
/usr/local/lib/filter/sendend

$B$3$l$G%U%!%$%k$rN.$79~$_!":G8e$K(B'^D'$B$rAw$j$^$9!#(B
$B$3$N(B'cat'$B$N$+$o$j$K(B'a2ps','jtops -v'$B$J$I$r;XDj$9$l$P!"%F%-%9%H(B
$B%G!<%?$rD>@\(BPS$B%W%j%s%?$K(Blpr$B$G$-$^$9!#(B'dvi2ps','jdvi2kps'$B$J$I$G!"(B
dvi$B%U%!%$%k$rD>@\=PNO$G$-$^$9$,!"(Ba2ps$B$J$I$O%X%C%@$d=L>.$J$I$N(B
$B%*%W%7%g%s$,B?$/MQ0U$5$l$F$$$^$9$N$G!"%f!<%6$,D>@\;XDj$9$k$[$&(B
$B$,$h$$$H;W$$$^$9!#N>J}MQ0U$7$F$*$/$N$b$$$$$+$b!#(B

- /usr/local/lib/sendend $B$NFbMF$O!&!&(B

#include <stdio.h>
void main()
{
fprintf(stdout, "\004");
exit(0);
}

$B$H$$$&C1=c$J$b$N$G$9!#(Bperl$B$d(Bawk$B$G$b$G$-$=$&$G$9$M!#(B


<2> CD-ROM(Apple CD-300)$B$K$D$$$F(B

$B!&%V%m%C%/%5%$%:$r(BSCSI$B%G%P%$%9%I%i%$%P$KBP$7$FJQ99$9$l$P!"%^%&%s%H(B
  $B$G$-$k$h$&$K$J$j$^$7$?!#(B
$B!&6qBNE*$K$O!"0J2<$N$h$&$J%W%m%0%i%`$r%3%s%Q%$%k$7!"(Bmount$B%3%^%s%I$N(B
$B!!A0$K<B9T$9$l$P!"(BOK$B$G$9!#(B

---- start of source code ----
#include <fcntl.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <scsi/generic/commands.h>
#include <scsi/generic/mode.h>
#include <scsi/impl/uscsi.h>

struct uscsi_cmd cmd;

union scsi_cdb cdb;
u_char md[12] = {                       /* random data */
    0,                                  /* reserved */
    0,                                  /* medium type */
    0,                                  /* reserved */
    8,                                  /* block descriptor length */
    0,                                  /* density */
    0,0,0,                              /* # of blocks */
    0,                                  /* reserved */
    0,2,0,                              /* block length (512b) */
};

main()
{
    int fd;

    if ((fd = open("/dev/rsr0", O_RDWR | O_NDELAY)) == -1) {
        perror("open");
        exit (1);
    }

    cdb.scc_cmd = SCMD_MODE_SELECT;
    cdb.low_count = 12;

    cmd.uscsi_cdb = (caddr_t) &cdb;
    cmd.uscsi_cdblen = CDB_GROUP0;
    cmd.uscsi_bufaddr = (caddr_t) md;
    cmd.uscsi_buflen = sizeof(md);
    cmd.uscsi_flags = USCSI_DIAGNOSE | USCSI_ISOLATE; /* write */

    if ((ioctl(fd, USCSICMD, (struct uscsi_cmd *) &cmd)) == -1) {
        perror("ioctl");
        exit (1);
    }
    exit(0);
}
---- end of source code ----
$B!vCp(B1


<3> EXABYTE $B$K$D$$$F(B

$B!&(BEXABYTE$B$O!"7k9=@\B3$K%J!<%P%9$@$H$$$&$3$H$,$o$+$j$^$7$?!#(B
$B!&4X78=qN`(B(?)$B$,!"$$$/$D$+$"$k$N$G!"$=$l$,;29M$K$J$k$+$b$7$l$^$;$s!#(B

ftp.center.osaka-u.ac.jp : /sun-info/sunspots
sunsite.sut.ac.jp : /pub/sun-info/sun-us/sun-fixes

$B$J$I$G$9$,!">\:Y$J%A%'%C%/$O$^$@$7$F$*$j$^$;$s!#(B(_o_);
$B:#8e$NJs9p$r$*BT$A$/$@$5$$(B(^-^)<$B!#(B


$B"!:G8e$K!"%a!<%k$*$h$S(BMSG$B$N%U%)%m!<$r2<$5$C$?3'MM$K46<U$$$?$7$^$9!#(B

$B?92<(B $B$*Be41MM(B $B#M#a#N#M#O#S!w#H#2(B $B$5$s(B
$B;38}(B@XEROX  $B$5$s(B
$B1)Eg!wElBg(B $B$5$s(B
$B6aF#!w002=@.>pJs%7%9%F%`(B $B$5$s(B
Thomas.Tornblom@Nexus.Comm.SE $B$5$s(B


$B!vCp(B1
$B!&$3$N%=!<%9$O;38}(B@XEROX$B$5$s$h$j$$$?$@$$$?$b$N$G$9$,!"(B
> $B;d$O!"$3$N%W%m%0%i%`$N=P<+$rCN$j$^$;$s!#@5<0$JL>A0$b!"CN$j$^$;$s!#(B
> $B$I$J$?$+65$($F$/$@$5$$!#(B
$B$H$"$j$^$7$?$N$G!"$o$?$7$ND4$Y$?$+$.$j$r$4Js9p$7$^$9!#(B

$B!&$o$?$7$NCN$C$F$$$k=P=j$O(B alt.cd-rom $B$G!"(B
$B:n<T$O(B Thomas.Tornblom@Nexus.Comm.SE $B$5$s$G$9!#(B
$B0J2<$K%=!<%9%3!<%I0J30$N86J8$r$"$2$F$*$-$^$9!#(B
-----
>Article 9781 (135 more) in alt.cd-rom:
>From: Thomas.Tornblom@Nexus.Comm.SE (Thomas Tornblom)
>Subject: Other CDROMS on a Sun, was Sun CD-ROM on PCs???
>In-Reply-To: jk@tools.de's message of 15 Apr 93 20: 16:31 GMT
>Message-ID: <THOMAS.TORNBLOM.93Apr20165117@beck.Nexus.Comm.SE>
>Followup-To: alt.cd-rom
>Sender: news@nexus.comm.se
>Organization: Communicator Nexus AB
>References: <1qc5gd$13o@marleen.isi.edu> <lsmq0kINNn0m@exodus.Eng.Sun.COM>
>        <JK.93Apr14173040@leo.tools.de>
>        <1993Apr14.195220.21701@nb.rockwell.com>
>        <1993Apr15.040231.17561@c3p0.novell.de> <JK.93Apr15211632@leo.tools.de>
>Date: Tue, 20 Apr 1993 15:51:17 GMT
>Lines: 68
>
>I got inspired by this and modified a tiny hack I did a while back to
>allow an Apple CD-ROM to be used on a Sun.
>
>As there is nothing in it that depends on the particular brand I guess
>it would work with other types as well.
>
>It justs sets the block size to 512 byte, which is kosher on the Suns.
>Most other drives seem to use 2k.
>
>So get a cable that fits both ends, set the SCSI id to 6, compile the
>following piece and run it as root. After it has been run you should
>be able to use it as any Sun CD-ROM.
>
>Probably only works on Sparcs running SunOS 4.1.x.
>
>When I can find the time I'll do the opposite, set the Sun CD-ROM to
>2k to allow it to be used on Macs.
>--
>Real life:      Thomas Tornblom          Email:  Thomas.Tornblom@Nexus.Comm.SE 
>Snail mail:     Communicator Nexus AB    Phone:  +46 18 171814
>                Box 857                  Fax:    +46 18 696516
>                S - 751 08 Uppsala, Sweden

--
    ========  (@@  ()  o  ===== $BF#0fBgJe(B(Fujii,Daisuke) =========
   ========  /|_/$B!@(B/     ===== Faculty of Science & Technology =
  ========  ^ </        ===== fujii@rins.ryukoku.ac.jp ========
 ========     V>       ===== 0775-43-7438, FAX 0775-43-7428 ==
========  Ryukoku Univ.,SETA,OHTSU 520-21,JAPAN($BN6C+Bg3X(B) ===
