FAQ  •  Register  •  Login

Joystick Library

Moderator: nitrofurano

<<

wilco2009

Posts: 28

Joined: Sat Nov 24, 2012 1:23 am

Post Fri Feb 08, 2013 9:12 pm

Joystick Library

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.

https://docs.google.com/folder/d/0B69T2 ... sp=sharing
<<

boriel

Site Admin

Posts: 1463

Joined: Wed Nov 01, 2006 6:18 pm

Location: Santa Cruz de Tenerife, Spain

Post Sat Feb 09, 2013 11:06 am

Re: Joystick Library

Awesome!! I would like to include it in the ZX Basic library. May I, please?
<<

wilco2009

Posts: 28

Joined: Sat Nov 24, 2012 1:23 am

Post Sat Feb 09, 2013 2:46 pm

Re: Joystick Library

Of course.
For me will be a honour. Please use it.

Return to Gallery

Who is online

Users browsing this forum: No registered users and 0 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by Vjacheslav Trushkin for Free Forums/DivisionCore.

phpBB SEO