Page 1 of 1

Request to try out joystick interfacing program

Posted: Wed Dec 04, 2024 12:24 am
by russell-s-harper
I previously requested users to test a demo in progress using actual hardware, and there were issues with rendering and the joystick. The rendering issue was traced to a problem in VERA, so that leaves the joystick.

After some research, I think the issue was that I was using JOY_1 as the joystick to read, and my understanding now is that this is mapped to the keyboard as an emulated joystick. I think JOY_2 might be the one that connects to the actual joystick port. The documentation isn't 100% clear on this.

I've written and attached a short program JOYSTICK.PRG to confirm. If someone can run it and try it out, that would be great. Basically I mapped the digits 1, 2, 3 to JOY_1, JOY_2, and JOY_2 + 1 (doesn't appear to be a JOY_3). So you can type 1, 2, or 3, then try out the joystick. If the code is reading from the joystick, there should be a lot of diagnostic output.

If it works, can you let me know which of 1, 2, 3 you used? I need only the left port, but if you want to try the same with the right port, that's great, too.

I'm also going by some images I found on the web of the CX16 hardware, if the ports are actually vertically aligned, then please substitute top and bottom for left and right.

Thank you,

Russell

Re: Request to try out joystick interfacing program

Posted: Fri Dec 06, 2024 4:42 pm
by kelli217
There's a header on the motherboard for hooking up a third and fourth controller. But systems that have those wired up are likely to be pretty rare.

Re: Request to try out joystick interfacing program

Posted: Sat Dec 07, 2024 1:50 am
by the_seb
i have tried it, there is an offset:

when i push 1 i get joy(0) the keybord
when i push 2 i get joy(1) port 1 controller
when i push 3 i get joy(2) port 2 controller

Re: Request to try out joystick interfacing program

Posted: Sun Dec 08, 2024 12:15 pm
by russell-s-harper
Thank you very much for testing. I was confused by how CC65 labels the joysticks vs how CX16 labels them. It was only when I read a similar thread in one of the forums here that I figured out that CC65 JOY_1 refers to the keyboard emulator. I'm waiting now for a fix to the VERA FX Line Helper in 4 bpp mode. /Russell