C4P joystick project

Steve Gray
Posts: 283
Joined: Mon Oct 06, 2008 1:54 pm
Location: Markham, Ontario, Canada
Contact:

Re: C4P joystick project

Post by Steve Gray » Fri Mar 29, 2019 5:49 pm

On the C4P the joysticks are wired into the same lines as the keyboard matrix, so yes they will generate keys when moved.
Joystick "a" is wired on the "1234567" row, and joystick "b" is wired on the "wertyui" row.

Code: Select all

VALUE: 128  64   32   16   8    4    2    1
       ==== ==== ==== ==== ==== ==== ==== ====
KEY  : 1    2    3    4    5    6    7    none
JOY A: ---- ---- ---- up   down rght left fire

KEY  : W    E    R    T    Y    U    I    none
JOY B: fire down up   rght left ---- ---- ----
Refer to page 42 in the C4P manual

Steve
C4P working, C1P working. 600D Replica working, C4P+D&N floppy not working. 505 board, 610 board, Mittendorf board, TOSIE hacker board need testing, PicoDOS disk untested.

mjmalecha
Posts: 12
Joined: Fri Oct 08, 2010 7:46 pm

Re: C4P joystick project

Post by mjmalecha » Sun Mar 31, 2019 7:07 pm

Thanks Steve. this was helpful. I now have joy B providing these exact correct values per your table. Joy A is also correct, but there is another issue because the "fire" key freezes up the computer every time pushed with joy A.

My next question though - using Joy B, is that I cannot get a value for PEEK(57088) AND 248. I ran a short program to disable control C, initialize Joy B and then perform this PEEK, but it returns a 0 regardless if any of the joystick keys are pressed ?? program is as follows:

10 REM
15 B=5 (to ensure it was not already 0)
20 POKE 2073.96 (disable control C)
30 POKE 57088,16 (enable joy B)
35 FOR Y=1 to 500
40 B=PEEK(57088) AND 248
45 PRINT B
50 NEXT Y
60 END

from the manual, it seems that this should work, so not sure what the issue is as I am getting the correct letters on the screen with the joystick - unless its somehow related to the freeze up situation with Joy A?

thanks!

Mike

Steve Gray
Posts: 283
Joined: Mon Oct 06, 2008 1:54 pm
Location: Markham, Ontario, Canada
Contact:

Re: C4P joystick project

Post by Steve Gray » Sun Mar 31, 2019 10:09 pm

It does look good according to the manual. One thing I'm not sure about is the disable control-c poke. In my personal C4P manual from back in the day I have the following beside that poke: poke 530,1
I don't know if the manual is wrong, this is for C4P, or for C4PMF (I think the disk basic is totally different)
It's worth a try.

Steve
C4P working, C1P working. 600D Replica working, C4P+D&N floppy not working. 505 board, 610 board, Mittendorf board, TOSIE hacker board need testing, PicoDOS disk untested.

mjmalecha
Posts: 12
Joined: Fri Oct 08, 2010 7:46 pm

Re: C4P joystick project

Post by mjmalecha » Sun Mar 31, 2019 11:16 pm

Interesting, I will give it a try. I believe this is not the MF. IS there an easy way too tell? It has cassette interface, I assumed the C4PMF did not have cassette interface.

mike

mjmalecha
Posts: 12
Joined: Fri Oct 08, 2010 7:46 pm

Re: C4P joystick project

Post by mjmalecha » Sun Mar 31, 2019 11:23 pm

That was it, changed the control C disable commend to POKE 530,1 and now I can get all the correct numerical values during the program with the joystick!

I have a working joystick on my C4P !! Now I just need to get ahold of a program that uses the joystick :)

thank you much for your assistance

mike

Steve Gray
Posts: 283
Joined: Mon Oct 06, 2008 1:54 pm
Location: Markham, Ontario, Canada
Contact:

Re: C4P joystick project

Post by Steve Gray » Mon Apr 01, 2019 12:04 am

Hey, great! The C4P is based on the 502 CPU board, which has the cassette, BASIC roms, and 8k ram onboard. You will get the “C/W/M” prompt. The C4P-MF is based on the 505 CPU board. It has no cassette, no BASIC roms, no ram, but does include the floppy controller. You should see a “H/D/M” prompt. Of course it’s possible to add a floppy controller to a 502 board system. You need to reconfigure the monitor rom for the correct boot options.

It's also possible to have a 3rd-party monitor rom like CEGMON which might give you "D/C/W/M" options.

I wrote and/or converted a few programs that use joystick. They are available on my web page but you'd need to get them back to tape to load them, or think about connecting the OSI to the PC via serial port. WALTERMIXXX and I have been working on getting a bluetooth connection for our C1P/superboards but requires a couple hardware mods to make it work. I have a working C4P which I'd also like to get working with bluetooth. Check some of the other posts for more info.
C4P working, C1P working. 600D Replica working, C4P+D&N floppy not working. 505 board, 610 board, Mittendorf board, TOSIE hacker board need testing, PicoDOS disk untested.

mjmalecha
Posts: 12
Joined: Fri Oct 08, 2010 7:46 pm

Re: C4P joystick project

Post by mjmalecha » Mon Apr 01, 2019 12:34 am

Yes, mine is the 502, I get C/W/M.

I also think my Joy A may not have a problem, it also produces all correct values when I run the program for joy A. But the fire button as noted on your table is the far right column which has no associated keyboard value, so I am not sure what is happening when I press the fire button. I realize now it is not actually freeing up the computer, but does freeze the screen. so I need to break and W.

but if the program is running, I get the right value for fire button and the computer does not freeze, so I think Joy A works as well.

I will start by writing a program that uses joy A and Joy B to better test. But I think I a there

thanks

mike

Mark
Posts: 57
Joined: Tue Sep 16, 2008 6:04 am
Contact:

Re: C4P joystick project

Post by Mark » Tue Apr 02, 2019 1:44 am

Yup, the SYNMON keypoller $FD00 locks up in an endless loop when you press a key in the bit0 column that is not shift-lock.
I discovered this when adding Joystick support to WinOSI, you can actually break into the debugger & see the loop endless searching for a set bit.
OS65D3.3 uses it's own keypoller which does not have this problem.
When using joystick A you must ensure the ROM $FD00 keypoller is never called.
-Mark

Post Reply