Path: utzoo!censor!geac!torsqnt!lethe!yunexus!ists!helios.physics.utoronto.ca!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!zaphod!rpi!peck From: peck@ral.rpi.edu (Joseph Peck) Newsgroups: comp.sys.amiga.programmer Subject: Help: *@$#%! Joysticks.... Message-ID: <`42^3D|@rpi.edu> Date: 15 Jan 91 15:16:27 GMT Organization: Rensselaer Polytechnic Institute, Troy NY Lines: 35 Nntp-Posting-Host: ral.rpi.edu I was wondering if anyone could give me a hand before I hunt down the guy at Commodore who wrote the gameport.device and commit some illegal act..... Oh wait, that goes in .advocacy. Look there for a companion article soon. I am writing a two player game, and I would like to use both gameports for joysticks. Sooooo, I look in the RKM's for some help. It says that I should check if the gameport unit is in use before I run off and change it to my desired type (absolute joystick). Well, it also says that unit 1 (the mouseport) is normally in use already as type mouse. Is there a nice way to steal the port when I run my game, and then return it when either the game is paused or quit? I tried being nasty in several different ways: Simply pretending that it is not in use and setting it to whatever I want. Checking what it is currently being used as, stuffing the new type in, and then changing it back to what it originally was when I exit. Reading the hardware directly. So far, the only thing that has worked has been reading the hardware directly. The other methods work occasionally, sometimes reading the joystick like a joystick, and other times completely ignoring the port. They do either screw up the port when the program ends, or crash the machine (one of those times it was a very pretty blue display :) I am hoping that I simply missed something in the RKM's, and that this will be easy to fix..... I am *attempting* to be multi-tasking friendly and not do anything that will trash other programs running in the background. (Geee, where's Mike Farren when you need him? I think the February BADGE meeting should be moved to Troy, NY. A possibility? :) Anyhow, thanks for your help, Joe Peck peck@ral.rpi.edu