Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!rpi!brutus.cs.uiuc.edu!samsung!munnari.oz.au!rgg From: rgg@munnari.oz.au (Rupert Graham Goldie) Newsgroups: comp.sys.atari.st Subject: How to read the joystick ? Keywords: joystick technical Message-ID: <3006@munnari.oz.au> Date: 15 Jan 90 12:20:37 GMT Sender: news@cs.mu.oz.au Lines: 47 I have been using code similar to the following to read the joystick, but I want to know whether this is a 'legal' method. I know it works on TOS 1.0 and 1.4 (Yes you can get TOS 1.4 in Oz now 8-) but I haven't tested it on other versions of TOS and I would like to be able to sure it will work with future versions. Here is the code: ------- #include main() { int i; int *loc; long *ssp; loc = 0xfffc02; ssp = Super(0); for (i = 0; i < 500; i++) printf("%d %d\n ", Bconin(4), *loc); printf("turning off mouse.\n"); Bconout(4, 0x12); printf("turning joystick on.\n"); Bconout(4, 0x14); for (i = 0; i < 500; i++) printf("%d %d %x\n ", Bconin(4), *loc, *loc); printf("Turning mouse on.\n"); Bconout(4, 0x08); Super(ssp); } ------- By the way the Bconin doesn't seem to provide anything useful, just a constant value. Thanks in advance for any help, Rupert G. Goldie rgg@munmurra.cs.mu.OZ.AU uunet!munnari.mu.oz!munmurra!rgg