![]() |
|
Joystick Library - Printable Version +- Boriel Basic Forum (https://forum.boriel.com) +-- Forum: Compilers and Computer Languages (https://forum.boriel.com/forumdisplay.php?fid=12) +--- Forum: ZX Basic Compiler (https://forum.boriel.com/forumdisplay.php?fid=11) +---- Forum: Gallery (https://forum.boriel.com/forumdisplay.php?fid=18) +---- Thread: Joystick Library (/showthread.php?tid=525) |
Joystick Library - wilco2009 - 2013-02-08 Attached is included my joystick library to manage the joystick Basically includes constants and macros to keep the same speed access that reading directly the keyboard ports. The file keyboard.bas is a interface library to manage the keyboard. Keyboard.bas is used by joystick.bas. It includes all the functions to manage the access to the joystick, The structure of joystick.bas as the following: - Keyboard (OPQA/Enter), Kempston, Sinclair (Two players) and Cursor Joystick are supported. - The active joystick is stored internally in the CtrlSelected variable and includes two functions to access it (SelectControl/GetSelectedControl). - The other functions lets read the state of all joystick buttons. - In order to let control two players (Sinclair case), are included in all functions a parameter called "played" with possible values PLAYER1/PLAYER2 (0/1). - The Sinclair right player is used for player 2. <!-- m --><a class="postlink" href="https://docs.google.com/folder/d/0B69T2laxW_ueenc4SmJBTzFEeEU/edit?usp=sharing">https://docs.google.com/folder/d/0B69T2 ... sp=sharing</a><!-- m --> Re: Joystick Library - boriel - 2013-02-09 Awesome!! I would like to include it in the ZX Basic library. May I, please? Re: Joystick Library - wilco2009 - 2013-02-09 Of course. For me will be a honour. Please use it. |