Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Original Challenge: *FAST* Joystick Library for QB!! ;*) !
#12
To Plasma357:

As for what you wrote, which was:

______________________________________________
1. Normally on idle state the capacitor C1 is fully charged (5V) and multivibator output gives out logic 1.
2. Computer writes to I/O address 201h to reset the multivibrators. The multivibrator get a triggger pulse from I/O write signal and it discharged capacitor C1. The multivibrator output goes to logic 0 because the capacitor is discharged (0V).
2. The capacitor starts to charge form the current which goes through R1 and the joystick potentiometer.
3. When the capacitor voltage reaches certain oltage threshold level, the multivibrator output goes back to logic 1.
The bigger the potentiometer resistance value is, the loger it takes from the capacitor to reach the threshold voltage. The time how long it take for each multivibator to reach the logic 1 after the triggering is measued using software and that value tells the resistance of the potentiometer (and the stick position as well because the potentiometer is connected to the stick). This simple method for measuring the resistance value is quite cheap, but not very accurate.
This simple joystick port hardware implementation (originally designed for 4.7 MHz IBM PC) causes many headaches to game programmers (problems of different computer speeds, joycitck port differences, problems in multitasking operating systems etc.). Big tolerances in joysticks and joystick ports mean that the every game must have an option to cablibrate the joystick (which actually means that the program adapts to accept the values in th range which the joystick reading routine does and then converts the values to it's internal format using the values measured in joystick calibration process).

______________________________________________

.........WOW, you sure know a lot more about joysticks in PCs than I do, because I’ll tell you something to get straight and to the point here, Plasma357:

You are MOST truly correct. Wink !

I mean, back in my 80’s/90’s days, I **NEVER** even had an actual joystick for an IBM (or compatible) PC, much less even used one myself. And that was _apparently_ part of the rather reason why I never knew much about joysticks/gamepads interfacing with those kinds of PCs, sadly. Sad But hey, at least your interesting answer is definitely ***QUITE*** a learning experience in how to tame such a intensified crash course in joysticks/gamepads as this. Big Grin !

So, **EXCELLENT** point, man, and thank you for your brutally honest insights, too! ;*) !!



GETTING YOUR POINT ACROSS IN SUCH A SERIOUS WAY,

[Image: AAPMini.gif]
Adigun Azikiwe Polack
One of the Founders of “Aura Flow”
Webmaster of the AAP Official Homepage
Official Founder of the “QuickBASIC Caliber Programming Compo”



P.S. You don’t have to enter this challenge if you don’t want to. I mean, I PLAIN refuse to even force you to enter, my man, especially since I love you with all of my heart, really! Wink !
url=http://dhost.hopto.org/aapproj/][Image: file.php?id=194][/url]
Your *official* home of the FreeBasic GFX Demo Central, now holding over 150 FB graphics demos so far!!! Big Grin !
Reply


Messages In This Thread
not an entry for this challenge, but... - by Meg - 08-23-2003, 03:01 AM
ooh nice - by Meg - 08-23-2003, 04:34 AM
MY, I see what you mean, man. You’re catching on here! :) - by Adigun A. Polack - 08-23-2003, 10:03 PM
STICK - by SCM - 08-24-2003, 11:46 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)