Need help with testing joysticks

Post your CP/M & TDOS questions here
Post Reply
User avatar
Wmaalouli
Posts: 61
Joined: Sat Jul 20, 2019 2:09 pm

Need help with testing joysticks

Post by Wmaalouli » Sun Sep 01, 2019 7:57 am

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!
Attachments
Test.zip
(16.36 KiB) Downloaded 6 times

User avatar
Milli
Site Admin
Posts: 52
Joined: Fri Jul 19, 2019 3:13 pm
Location: Beaver Falls PA
Contact:

Re: Need help with testing joysticks

Post by Milli » Sun Sep 01, 2019 11:26 am

What do you have going on in this image? when I start it in AdamEM it just keeps reseting.
Milli

User avatar
Wmaalouli
Posts: 61
Joined: Sat Jul 20, 2019 2:09 pm

Re: Need help with testing joysticks

Post by Wmaalouli » Sun Sep 01, 2019 11:56 am

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.
Attachments
Test.zip
(16.68 KiB) Downloaded 6 times

User avatar
pearsoe
Posts: 9
Joined: Sun Jul 21, 2019 3:28 pm

Re: Need help with testing joysticks

Post by pearsoe » 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

User avatar
Wmaalouli
Posts: 61
Joined: Sat Jul 20, 2019 2:09 pm

Re: Need help with testing joysticks

Post by Wmaalouli » Mon Sep 02, 2019 10:09 pm

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.

Post Reply