[Coco] OS9 Joystick/Mouse question
Bill Pierce
ooogalapasooo at aol.com
Sat Sep 7 18:02:48 EDT 2013
Steve, I figured as much. I don't recall any program ever "auto-recognizing" a mouse, but then again..... I've found quite a few things lately that programmers didn't ever do. It wasn't that it couldn't be done, they just didn't do it because it was too much trouble, not enough knowledge, or lack of the proper equipment. Usually a little of all three.
I guess on first run, I could prompt for "Press a button if using a mouse/joystick else hit ENTER" and then save it as a default in the program's config file. Of course this can be changed later in an options menu if so desired.
Bill Pierce
My Music from the Tandy/Radio Shack Color Computer 2 & 3
https://sites.google.com/site/dabarnstudio/
Co-Webmaster of The TRS-80 Color Computer Archive
http://www.colorcomputerarchive.com/
Co-Contributor, Co-Editor for CocoPedia
http://www.cocopedia.com/wiki/index.php/Main_Page
E-Mail: ooogalapasooo at aol.com
-----Original Message-----
From: Steve Bjork <6809er at srbsoftware.com>
To: CoCoList for Color Computer Enthusiasts <coco at maltedmedia.com>
Sent: Sat, Sep 7, 2013 2:50 pm
Subject: Re: [Coco] OS9 Joystick/Mouse question
Bill,
No.
Have you every wonder why CoCo games ask if you using a Joystick or
Keyboard to play? That's why. (If they did not then they must have the
joystick plug in to play.)
The Joystick hardware in the CoCo can only gives a value from 0 to 63
based on the Position/Voltage. There is not data that can be returned,
like an error state of no device plugged in.
Yes, there is a number returned when nothing is plugged in. But, that
number is same as the Joystick in that same position.
My easy trick was to look for the Button pressed of the joystick the
player wanted to use and go from there.
Steve
On 9/7/2013 10:32 AM, Bill Pierce wrote:
> Hi,
> Is there a way (in software) in OS9 to check to see if a joystick or mouse are
connected?
> I konoy how to turn the mouse on/off, check it's values, set the resolution
and what side it's on, but I haven't found a way to check to see if one is
connected.
> The idea is for a program to do a mouse check on startup, if present then
default to it, if not, default to the keyboard.
>
> Thanks
--
Coco mailing list
Coco at maltedmedia.com
http://five.pairlist.net/mailman/listinfo/coco
More information about the Coco
mailing list