Path: utzoo!attcan!uunet!cbmvax!daveh From: daveh@cbmvax.commodore.com (Dave Haynie) Newsgroups: comp.sys.amiga.hardware Subject: Re: Message-ID: <15803@cbmvax.commodore.com> Date: 12 Nov 90 16:48:01 GMT References: <1990Nov11.212521.13944@ecst.csuchico.edu> Reply-To: daveh@cbmvax.commodore.com (Dave Haynie) Organization: Commodore, West Chester, PA Lines: 65 In article <1990Nov11.212521.13944@ecst.csuchico.edu> mrush@ecst.csuchico.edu (Matt "C P." Rush) writes: > When I plug a DIGITAL joystick into Port 0 (the Mouse Port) for two >player games, the port seems to be sending a continuous Left signal. As it >were, the player using that joystick ends up flying over to the Left side of >the screen, and can't get back! It just so happens I wrote up this quick hack to monitor joysick activity just last Friday. If you really have a problem in your port 0 with a continuous left being sent, you should see that one being pressed with no joystick or mouse installed. Mouse and joystick functions are handled by a TTL multiplexer and the Denise chip. ------------------ /* Cheap-ass joystick test program hacked together in five minutes by Dave Haynie. Use this to check out your joysticks or similar things, but not as an example of joystick programming. It's quite evil in that latter regard. Type ^C to end it. */ #include volatile unsigned short *JOY0DAT = (short *)0x00dff00a; volatile unsigned short *JOY1DAT = (short *)0x00dff00c; void printjoy(FILE *disp, short jval) { if ((jval>>9) & 1) fprintf(disp,"\2337mL\2330m "); else fprintf(disp,"L "); if ((jval>>1) & 1) fprintf(disp,"\2337mR\2330m "); else fprintf(disp,"R "); if (((jval>>1) & 1)^(jval & 1)) fprintf(disp,"\2337mB\2330m "); else fprintf(disp,"B "); if (((jval>>9) & 1)^((jval>>8) & 1)) fprintf(disp,"\2337mF\2330m "); else fprintf(disp,"F "); } void main() { FILE *disp; disp = fopen("CON:50/50/300/40/JoyTest!","w"); fprintf(disp,"\n JOY1: L R B F JOY2: L R B F\233\60\40\160\n"); do { fprintf(disp,"\233A\2339C"); printjoy(disp,*JOY0DAT); fprintf(disp,"\2338C"); printjoy(disp,*JOY1DAT); fprintf(disp,"\n"); } while (1); } ---------- -- Dave Haynie Commodore-Amiga (Amiga 3000) "The Crew That Never Rests" {uunet|pyramid|rutgers}!cbmvax!daveh PLINK: hazy BIX: hazy Standing on the shoulders of giants leaves me cold -REM