Joypad Interface from Ian Jeffray - save button assignments

discuss the archimedes & risc pc, peripherals and risc os/risc os on pi
Post Reply
Pandemo69
Posts: 20
Joined: Wed Jan 12, 2022 5:49 am
Contact:

Joypad Interface from Ian Jeffray - save button assignments

Post by Pandemo69 »

Thank you Ian, for the great JoyPad interface.

https://ian.jeffray.co.uk/riscos/joypad/

I built the interface, and it works fine. In the help file you mentioned a possibility to save the assignment of the keys.
Thanks to the idea of !FOZ! I created a way to save the setting. Thank you !FOZ!

All you have to do is change or add the following lines:

Code: Select all

 
  570
  580CFG=OPENIN("<Obey$Dir>.!JoyCfg")
  581  FORn=1TO12
  582    w$=GET$#CFG:map(n)=VAL(w$)
  583  NEXT
  584  m$=GET$#CFG:movement=VAL(m$)
  585IF VAL(m$)=1 PROCr(keyboard2, 108, movement<<1)
  586CLOSE#CFG
  590

 3220A$="":MO$="0"

 3230IF movement A$=" -move":MO$="1"

 3271CFG=OPENOUT("<Obey$Dir>.!JoyCfg")
 
 3351BPUT#CFG,MO$
 3352BPUT#CFG,"JoyKeysEmulateMouse "+A$
 3353CLOSE#CFG
 
The data “!JoyCfg” is also required BEFORE THE FIRST START (can be blank). Now every time you exit !JoyKeys, the key assignment and mouse settings are saved and loaded the next time you start.
It's probably not the most elegant solution, but I wrote my last BASIC listing years ago.
If someone likes it, I hope you enjoy it.

@Ian: It's a shame that the keyboard1 (for A30x0) never was finished. :)

Greetings.
Pandemo
Attachments
!JoyKeys.zip
(23.12 KiB) Downloaded 2 times
Post Reply

Return to “32-bit acorn hardware”