MJoergen / C64MEGA65

Commodore 64 core for the MEGA65 based on the MiSTer FPGA C64 core
GNU General Public License v3.0
30 stars 4 forks source link

Make use of bi-directional joystick ports (R4/R5/R6) #98

Open sy2002 opened 1 year ago

sy2002 commented 1 year ago

Newer MEGA65 boards support bi-directional joystick ports.

Info/quotes from a Skype conversation from the MEGA65 team why this feature was added:

For now - as long as we don't have a test case/use case, we cannot yet implement anything to the C64 core.

MJoergen commented 11 months ago

Do we have some way of testing this? It's straight-forward to implement.

sy2002 commented 10 months ago

"Upcoming protopad": https://www.protovision.games/shop/protopad/protopad.php?language=de

dillof commented 2 months ago

The easiest way is probably to connect an LED with resistor from one of the pins to ground, then you should be able to toggle it on/off by setting the bit high/low.

Here is a list of hardware that I'm aware of that uses bi-directional joystick ports, unfortunately none of them are easy to purchase:

All of these (except the SmartMouse) are supported by my controller test program Joyride.

If you have a SNES controller and a SNES controller connector, it's easy to build an adapter to make it behave like the Trap Them controller. If you want, I can build one and send it to you. I have the CX21 PCBs, I can build one of those for you as well.

Alternatively, if you want me to test a pre-release core, I'd be happy to. I have an R6 mainboard and most of the hardware above.

sy2002 commented 2 months ago

Thank you, @dillof - this info is highly appreciated. It will take us a while until we tackle this one, but I am optimistic that we will tackle it eventually.

sy2002 commented 3 weeks ago

More info here: https://kugelblitz360.github.io/C64MEGA65DOCS/joysticks-paddles-mice.html#bi-directional-devices

@MJoergen possible not hard to do and therefore maybe a candidate for 5.3 but @Kugelblitz360 is there enough value "in the market" for that? Gentlemen, please share you thoughts here. Currently still tagging it as 6.0 or later.

dillof commented 3 weeks ago

Since this is one of the major enhancements of the R6 board, it would be nice to also support it in the C64 core.

sy2002 commented 3 weeks ago

@dillof Thank you for chiming in. Can you recommend a device for me to buy, a source where to get it and some software that makes use of it, so that I (or @MJoergen) can test it? I need to admit, that when I read Boris' analysis in the new documentation (https://kugelblitz360.github.io/C64MEGA65DOCS/joysticks-paddles-mice.html#bi-directional-devices) I was a bit turned-off by the obscurity. But still: Willing to move on here - maybe you can supply a few weblinks here.

Kugelblitz360 commented 3 weeks ago

I do not own ANY device that would use the functionality so it is impossible for me to test and really hard to judge. Looking at the install base of maybe 1000 C64 Cores currently, I would guess that we'd only find a handful of people that actually own these. Protovision must have abandoned the Protopad - would that ever go into production, we might have a good reason.

dillof commented 1 week ago

All controllers are supported by my program Joyride. As for regular software: There is a GEOS driver for the SmartMouse real time clock. The Trap Them Controller was developed for the game of the same name. Multijoy and CX21 are Atari devices that happen to also work on the C64, I'm not aware of software for it on the C64.