6 button joystick support
I have not found any zxbasic examples that would indicate there is a an easy way to handle joystick input.
In its eventual, more fully featured state would I would like to see such a command make it easy to monitor the input from (up to at least) two 6 button Mega Drive compatible joypads or joysticks for Next users and of course it should also support legacy Spectrum (and Atari?) joysticks too.
Looking into this a bit more it seems Boriel has the IN keyword but as far as I can tell IN can only be used for (one button) Kempston joysticks?
Could IN be expanded to cover 6 button Mega Drive controllers or could we have a new keyword to support these?
Exactly. You have to use the IN command to read the ports. IN just maps to an assembly instruction. You need to find out which IN ports you need to read the button states and how to operate with them, or look for a library made by someone.
I asked about this on a FB ZXN group and it seems Boriel's IN keyword supports 3 buttons (and START) on the Next.
It doesn't seem that the Boriel docs can be publicly edited. Could you add some extra info on this to the IN keyword page or maybe add a simple demo that shows how to use a Mega Drive controller on the next?
I think the button codes to use with IN can be found via the joypad testing tool that ships with the next, someone said but I've not verified that.
Isn't there a wiki for Boriel?
This is unrelated to Joystick support. The Keyword IN supports whatever the ZX Spectrum hardware does, because it's an exact implementation of the IN command.
The wiki for boriel is (at this moment) at https://zxbasic.readthedocs.io Also, I recommend you to join the official Telegram channels, so you can discuss these things there:
- Official channel (English) https://t.me/+ag4E7W05dvRkZmZk
- Official channel (Spanish) https://t.me/+QIG2XK_Ou3o3MWU0
These links rotate periodically to prevent spammer bots.