Fabrizio Caruso Posted Thursday at 08:36 AM Share Posted Thursday at 08:36 AM (edited) [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 Thursday at 05:48 PM by Fabrizio Caruso Quote Link to comment Share on other sites More sharing options...
Cheung Posted Thursday at 05:44 PM Share Posted Thursday at 05:44 PM 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. Quote Link to comment Share on other sites More sharing options...
Tursi Posted Thursday at 07:48 PM Share Posted Thursday at 07:48 PM 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. 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.