Page 1 of 1

Need help with testing joysticks

Posted: Sun Sep 01, 2019 7:57 am
by Wmaalouli
Hi.
I'm working on the controller extension for Turbo Pascal 3 based on the Hacker's Manual info, but I am running into some issues. I am able to read the joysticks fine, but the values returned are totally different from what the Hacker's Manual says. Not a big deal.
The main issue is that I have been unable to read the keypad. The manual says we should be able to read them from ports $FC and $FE, but these ports only return the joysticks values, not the keypad. I know my joysticks are a bit flaky, so I was hoping someone here would run the test routine called Joytest on the attached disk with known good working joysticks and let me know if the keypads register at all.
Thanks!

Re: Need help with testing joysticks

Posted: Sun Sep 01, 2019 11:26 am
by Milli
What do you have going on in this image? when I start it in AdamEM it just keeps reseting.

Re: Need help with testing joysticks

Posted: Sun Sep 01, 2019 11:56 am
by Wmaalouli
Not sure why it's doing this. It's just a CP/M disk. Must have gotten corrupted somehow during the upload.
Try this image. Should work.

Re: Need help with testing joysticks

Posted: Mon Sep 02, 2019 2:43 pm
by pearsoe
I know this is CP/M but you might want to review the POLLER and READ AND DEBOUNCE GAME CONTROLLER ($E206) subroutine in the EOS 5 source code to see how the game controllers are read and decoded in EOS.

http://adamarchive.org/archive/Adam/Tec ... 20code.zip

Re: Need help with testing joysticks

Posted: Mon Sep 02, 2019 10:09 pm
by Wmaalouli
pearsoe wrote:
Mon Sep 02, 2019 2:43 pm
I know this is CP/M but you might want to review the POLLER and READ AND DEBOUNCE GAME CONTROLLER ($E206) subroutine in the EOS 5 source code to see how the game controllers are read and decoded in EOS.

http://adamarchive.org/archive/Adam/Tec ... 20code.zip
Thank you! That was exactly the information I needed. The hacker's guide made it sound like a simple port read when in reality it's actually a little more involved. In any case I got it all to work, and I can now differentiate between the joystick, keypad and the 2 fire buttons. Sweet!
I'll be releasing the sound and controller extensions to Turbo Pascal tomorrow once I write the documentation for them.