From: Peter M Newsgroups: comp.os.msdos.djgpp Subject: Reading Joystick port Date: Wed, 21 Jun 2000 13:40:08 +1000 Organization: Pacific Internet (Australia) Lines: 18 Message-ID: <39503918.DA19A551@pacific.net.au> NNTP-Posting-Host: ppp17.dyn148.pacific.net.au Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: nina.pacific.net.au 961558545 24171 210.23.148.17 (21 Jun 2000 03:35:45 GMT) X-Complaints-To: abuse AT pacific DOT net DOT au NNTP-Posting-Date: 21 Jun 2000 03:35:45 GMT X-Mailer: Mozilla 4.61 [en]C-CCK-MCD PI (Win98; I) X-Accept-Language: en To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi all, I am experimenting with reading switches from the Joystick port, but have struck a strange problem. The code inportb(0x201) will correctly work when running under as a DOS box in W98, but when I reboot to DOS from W98, it fails to read the status and continually returns 0xFF. The only possible solution I have seen is a reference to writing out to the port before reading it (though I suspect that this just to prep the positional controllers), but this did not work. Note that this problem could be due to me being a newbie to DJGPP, and not having the correct environment set up under DOS. I thought I had CWSDPMI running/available but I am not too sure what I am doing at the moment :-) Regards Peter