Path: utzoo!attcan!uunet!abcfd20.larc.nasa.gov!amiga-request From: amiga-request@abcfd20.larc.nasa.gov (Amiga Sources/Binaries Moderator) Newsgroups: comp.sources.amiga Subject: v90i265: stickmouse 1.0 - change port and device of internal input.device , Part01/01 Message-ID: Date: 8 Oct 90 21:22:53 GMT Reply-To: hgschmie@faui41.informatik.uni-erlangen.de (Henning Schmiedehausen) Lines: 442 Approved: tadguy@uunet.UU.NET (Tad Guy) X-Mail-Submissions-To: amiga@uunet.uu.net X-Post-Discussions-To: comp.sys.amiga Submitted-by: hgschmie@faui41.informatik.uni-erlangen.de (Henning Schmiedehausen) Posting-number: Volume 90, Issue 265 Archive-name: util/stickmouse-1.0/part01 [ uuencoded executable enclosed ...tad ] This program changes the port and the device used by the internal input.device to control the Mouse-Pointer. #!/bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh 'MakeFile' <<'END_OF_FILE' X# Makefile for X# Stickmouse X# will work with Manx C V 3.6 X# X XCFLAGS = +l -n -s X# remove -n after your finished Debugging X XStickmouse: Stickmouse.o X ln -t -g -o StickMouse Stickmouse.o -lc32 X# remove -t and -g after you finished Debugging X XStickmouse.o: Stickmouse.c X END_OF_FILE if test 268 -ne `wc -c <'MakeFile'`; then echo shar: \"'MakeFile'\" unpacked with wrong size! fi # end of 'MakeFile' fi if test -f 'StickMouse.doc' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'StickMouse.doc'\" else echo shar: Extracting \"'StickMouse.doc'\" \(2168 characters\) sed "s/^X//" >'StickMouse.doc' <<'END_OF_FILE' X/***************************************************\ X * * X * S T I C K M O U S E * X * * X * 901002 V 1.0 written and released by Dr. Music * X * * X * Dr. Music is: * X * Henning Schmiedehausen * X * Glueckstrasse 3 * X * D-8520 Erlangen * X * GERMANY * X * hgschmie@faui41.informatik.uni-erlangen.de * X * * X * This program is placed in the public domain * X * It may be distributed freely as long as this * X * message is left unchanged. * X * You may add it to any PD-Disk you want, as long * X * as you don't charge more money than necessary * X * to distribute the Disk. * X * * X\***************************************************/ X X XThis program changes the port and the device used by the Xinternal input.device to control the Mouse-Pointer. X XThe useage of this little program is X XSTICKMOUSE , where X X is either 0 or 1 for the Gameports. X is either JOY or MOUSE for the device. X XJust STICKMOUSE and Return will reset to Mouse and Port 0. X XThe C-Code is included in this package, it should contain: X XMakefile: 268 Bytes XStickmouse.c: 3949 Bytes XStickmouse: 6708 Bytes XStickmouse.doc: 2168 Bytes X XThis is PD. Use it or discard it. X X X Henning X X ___ _________________________________________________________________ X ONLY //// |Henning Schmiedehausen | You can call me | Opinions are X___ //// |Glueckstr. 3 8520 Erlangen| Dr. Music, 'cause | mine, Typos X\\\\ //// |Germany | Music is my name - BOC| and Grammars X \\\X/// +--------------------------+---------------+-------+------+ are X \XXX/AMIGA|hgschmie@faui41.informatik.uni-erlangen.de| HACK IS BACK!| yours END_OF_FILE if test 2168 -ne `wc -c <'StickMouse.doc'`; then echo shar: \"'StickMouse.doc'\" unpacked with wrong size! fi # end of 'StickMouse.doc' fi if test -f 'StickMouse.uu' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'StickMouse.uu'\" else echo shar: Extracting \"'StickMouse.uu'\" \(9432 characters\) sed "s/^X//" >'StickMouse.uu' <<'END_OF_FILE' Xbegin 644 StickMouse XM```#\P`````````#``````````(```7A````K@````$```/I```%X4[Z!%Q.8 XM5?_^&VT`#___(&T`"#%\``X`'$'M__\B;0`((T@`*"!M``@A?`````$`)"\M< XM``A.NA9D6$].74YU3E7__AMM``___R!M``@Q?``/`!Q![?__(FT`""-(`"@@W XM;0`((7P````!`"0O+0`(3KH6*EA/3EU.=4Y5__XO!`RM`````P`(;```D`RM$ XM`````0`(9@Q"+?__&WP``?_^8'0,K0````(`"&96(&T`#")H``0,$0`_9DA() XM>@&F3KH(+%A/2'H!SDZZ"")83TAZ`>A.N@@86$](>@'^3KH(#EA/2'H"&DZZ4 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S_____6$]F"G#_R XM3-\,$$Y=3G5@&"\M__!.DK"\_____UA/9@1P_V#B4JW_^"`M_^A3K?_HL*W_O XMY&[:0JW_X&`D(&W_W%*M_]P0$$B`2,`O`$Z2L+S_____6$]F!'#_8*I2K?_@/ XM(&W_W$H09PH@+?_@L*W_[&W*("W_X-&M__A*K?_T9BI@&DAX`"!.DK"\____< XM_UA/9@9P_V``_W!2K?_X("W_Z%.M_^BPK?_D;MA@&"\$3I*PO/____]83V8&M XM/__+RT`#$ZZ) XM`/Q03R@?3EU.=6#X3E4``"\*)&T`#"!2L>H`!&4:("T`","\````_R\`+PI.W XMN@#.4$\D7TY=3G4@4E*2$"T`"Q"`2(!(P,"\````_V#D3E4``"\*0>R`EB1(@ XM($K5_````!8O"&$06$]![().MH`""@(+P0O*@`($"H`U XM#4B`2,`O`$ZZ`I:PA$_O``QG$`CJ``0`#$*20JH`!'#_8+P,K?____\`#&80I XM"*H``@`,0I)"J@`$<`!@HDJJ``AF""\*3KH`I%A/#&H``0`09C`;;0`/__](F XM>``!2&W__Q`J``U(@$C`+P!.N@(RL+P````!3^\`#&:8("T`#&``_UXDJ@`(/ XM,"H`$$C`T*H`""5```0(Z@`"``P@4E*2$"T`#Q"`2(!(P,"\````_V``_RY.U XM50``+PI![("6)$A**@`,9QC5_````!9![().M`0`3KH`PBM`__Q83V88-7P``0`0($K1R XM_`````XE2``()%].74YU-7P$```0".H``0`,)6W__``($"H`#4B`2,`O`$ZZ7 XM`-Y*@%A/9P8`*@"```Q@S$Y5``!(YP`P)&R"8F`4)E(@*@`$4(`O`"\*3KH&4 XM0E!/)$L@"F;H0JR"8DS?#`!.74YU3E4``"\*0?K_QBE(@II"IR`M``A0@"\`E XM3KH%TB1`2H!03V8(<``D7TY=3G4DK()B)6T`"``$*4J"8B`*4(!@YDY5```OV XM+0`(8;983TY=3G5.50``2.<`,)?+)&R"8F`.(&T`"%&(LR"PP+().P?P`!B\`+RR"``$""X`!`$I9Q0O#4OZ``I.KO_B*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N[_?$[Z``(B;P`$("\`""QL@FI.[O\N("\`< XM!"QL@FI.[OZP(&\`!"QL@FI.[OZ,(&\`!""(6)!"J``$(4@`"$YU(&\`!$SOB XM`@$`""(O`!`L;()J3N[^1"QL@FHB;P`$("\`"$[N_=@B;P`$+&R":D[N_I@B\ XM;P`$+&R":D[N_H9,[P`#``0L;()J3N[^SB!O``0L;()J3N[^@$SO`P``!"QLP XM@I).[O^@(&\`!"QL@I).[O^F(&\`!"QL@I).[O^R```#[`````$````!```$P XMT@````````/R```#Z@```)8P,3(S-#4V-S@Y86)C9&5F````("`@("`@("`@, XM,#`P,#`@("`@("`@("`@("`@("`@(""00$!`0$!`0$!`0$!`0$!`#`P,#`P,( XM#`P,#$!`0$!`0$`)"0D)"0D!`0$!`0$!`0$!`0$!`0$!`0$!`4!`0$!`0`H*. XM"@H*"@("`@("`@("`@("`@("`@("`@("0$!`0"```````````````````0``Q XM```!``````````````````````$!`````0`````````````````````!`@``' XM``$`````````````````````````````````````````````````````````! XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````%`````````````````/R```#ZP````$`X X#``/RU X`` Xend Xsize 6708 END_OF_FILE if test 9432 -ne `wc -c <'StickMouse.uu'`; then echo shar: \"'StickMouse.uu'\" unpacked with wrong size! fi # end of 'StickMouse.uu' fi if test -f 'Stickmouse.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Stickmouse.c'\" else echo shar: Extracting \"'Stickmouse.c'\" \(3949 characters\) sed "s/^X//" >'Stickmouse.c' <<'END_OF_FILE' X/***************************************************\ X * * X * S T I C K M O U S E * X * * X * 901002 V 1.0 written and released by Dr. Music * X * * X * Dr. Music is: * X * Henning Schmiedehausen * X * Glueckstrasse 3 * X * D-8520 Erlangen * X * GERMANY * X * hgschmie@faui41.informatik.uni-erlangen.de * X * * X * This program is placed in the public domain * X * It may be distributed freely as long as this * X * message is left unchanged. * X * You may add it to any PD-Disk you want, as long * X * as you don't charge more money than necessary * X * to distribute the Disk. * X * * X\***************************************************/ X X/* This program will switch the intuition-input.device X to use different ports and Devices at the external ports to X control the mouse-pointer. The trigger button will simulate X the left mouse button, the right button must be simulated via X Right-Amiga and ALT X*/ X X/* Usage of this program: STICKMOUSE */ X/* just STICKMOUSE X will set the port to 0 and the device to MOUSE (default) */ X X#include X#include X#include X#include X Xvoid SetMousePort(request,port) Xstruct IOStdReq *request; XUBYTE port; X { XUBYTE MyPort; X MyPort = port; X request->io_Command = (UWORD)IND_SETMPORT; X request->io_Data = (APTR)&MyPort; X request->io_Length = 1L; X DoIO(request); X } X Xvoid SetMouseDev(request,dev) Xstruct IOStdReq *request; XUBYTE dev; X { XUBYTE MyDev; X MyDev = dev; X request->io_Command = (UWORD)IND_SETMTYPE; X request->io_Data = (APTR)&MyDev; X request->io_Length = 1L; X DoIO(request); X } X Xstatic struct IOStdReq *StickMouseReq; Xstatic struct MsgPort *StickMousePort; X Xmain(argc,argv) Xint argc; XSTRPTR argv[]; X { X Xregister COUNT i; /* for our loops */ X XUBYTE Stick_Port, /* This will keep the Port-Number */ X Stick_Dev; /* and this one the Device-Type */ X X if((argc<3)) X { X if(argc==1) X { X Stick_Port = 0; X Stick_Dev = GPCT_MOUSE; /* Default-Settings for MOUSE */ X } X else X if((argc==2) && (argv[1][0] == '?')) X { X printf("\n\n STICKMOUSE: switches the Mouse-Pointer-Device\n"); X printf(" USAGE: STICKMOUSE \n"); X printf(" = 0/1 for the Joyports\n"); X printf(" = MOUSE/JOY for the Device\n"); X printf(" STICKMOUSE without params will set to default\n"); X printf(" written by Dr. Music 1990\n"); X exit(10); X } X else X { X printf("Useage: StickMouse or StickMouse ? for help\n"); X exit(10); X } X } X else X { X Stick_Port = (short)((char)argv[1][0] - '0'); X if((Stick_Port < 0) || (Stick_Port > 1)) X { X printf("Port-Number must be 0 or 1\n"); X exit(10); X } X for(i=0;i. Mail comments to the moderator at . Post requests for sources, and general discussion to comp.sys.amiga.