Jump to content
IGNORED

[SOLVED] Any example on how to use libti99 to read the joystick?


Fabrizio Caruso

Recommended Posts

[SOLVED]

 

I would like to implement joystick support for the TI99 in Cross-Lib. I wanted to use libti99 but I cannot find any example or documentation on how to use kscan or fastkscan.

Could you please help me on this?

 

I have partially figured it out. I can read the directions from KSCAN_JOYX and KSCAN_JOYY but I cannot see how to detect FIRE.
What confuses me is the output of kscan.

 

Edited by Fabrizio Caruso
Link to comment
Share on other sites

9 hours ago, Fabrizio Caruso said:

@Tursi 

I would like to implement joystick support for the TI99 in Cross-Lib. I wanted to use libti99 but I cannot find any example or documentation on how to use kscan or fastkscan.

Could you please help me on this?

 

I have partially figured it out. I can read the directions from KSCAN_JOYX and KSCAN_JOYY but I cannot see how to detect FIRE.
What confuses me is the output of kscan.

 

Is it possible that the fire button is detected the same way as it is in Extended basic, by scanning the keyboard for input (with no separate call)? Just guessing.

Link to comment
Share on other sites

The topic already says solved, but for anyone else who is curious, yes, the calls are based on the Extended BASIC functions.

 

#include "kscan.h"

 

So "joystfast(1)" will scan the first stick (2 for the second), and you use KSCAN_JOYX and KSCAN_JOYY to check the results. Results are -4, 0, +4 like XB.

"kscanfast(1)" will scan the first stick's fire button (2 for the second stick), and it will return '18' like the console does, or 0xff for not pressed.

 

  • Thanks 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...