Difference between revisions of "83Plus:Software:usb8x/Asm Interface/Pad"

From WikiTI
Jump to: navigation, search
m
m (Fixed links.)
 
Line 1: Line 1:
The usb8x gamepad driver is compatible with some USB gamepad controllers.  It will (probably) not work with most analog sticks, but will (probably) work with most D-Pads and buttons.  The gamepad driver does not bind buttons to a particular function.  In other words, it doesn't know that the "down" button means down.  Unless you already know the appropriate button mappings for a particular gamepad (the mapping could be saved between program runs), you will have to prompt the user to map buttons with [[/PadSetup|PadSetup]].
+
The usb8x gamepad driver is compatible with some USB gamepad controllers.  It will (probably) not work with most analog sticks, but will (probably) work with most D-Pads and buttons.  The gamepad driver does not bind buttons to a particular function.  In other words, it doesn't know that the "down" button means down.  Unless you already know the appropriate button mappings for a particular gamepad (the mapping could be saved between program runs), you will have to prompt the user to map buttons with [[83Plus:Software:usb8x/Asm_Interface/Pad/PadSetup|PadSetup]].
  
  
The gamepad driver is initialized via [[/PadInit|PadInit]].  This entry point initializes both the driver and the gamepad hardware, so you may want to check to see if a device is connected via [[../IsDeviceConnected|IsDeviceConnected]] first.
+
The gamepad driver is initialized via [[83Plus:Software:usb8x/Asm_Interface/Pad/PadInit|PadInit]].  This entry point initializes both the driver and the gamepad hardware, so you may want to check to see if a device is connected via [[83Plus:Software:usb8x/Asm_Interface/IsDeviceConnected|IsDeviceConnected]] first.
  
  
After initializing the gamepad, use [[/PadSetup|PadSetup]] to help determine button mappings, unless you've already saved a previous mapping.  Then use [[/PadStart|PadStart]] to start receiving gamepad data to your callback function.  The callback will be passed raw data from the gamepad, and should use the masks it collected via PadSetup to determine which buttons have been pressed.
+
After initializing the gamepad, use [[83Plus:Software:usb8x/Asm_Interface/Pad/PadSetup|PadSetup]] to help determine button mappings, unless you've already saved a previous mapping.  Then use [[83Plus:Software:usb8x/Asm_Interface/Pad/PadStart|PadStart]] to start receiving gamepad data to your callback function.  The callback will be passed raw data from the gamepad, and should use the masks it collected via PadSetup to determine which buttons have been pressed.
  
 
== Entry Points ==
 
== Entry Points ==
 
{| border="1" cellpadding="2"  cellspacing="0"  
 
{| border="1" cellpadding="2"  cellspacing="0"  
 
|-
 
|-
| [[/PadInit|PadInit]] || Initialize gamepad driver and hardware
+
| [[83Plus:Software:usb8x/Asm_Interface/Pad/PadInit|PadInit]] || Initialize gamepad driver and hardware
 
|-
 
|-
| [[/PadSetup|PadSetup]] || Get offset and bitmask to detect a specific button (map buttons)
+
| [[83Plus:Software:usb8x/Asm_Interface/Pad/PadSetup|PadSetup]] || Get offset and bitmask to detect a specific button (map buttons)
 
|-
 
|-
| [[/PadStart|PadStart]] || Start sending gamepad data to the callback function
+
| [[83Plus:Software:usb8x/Asm_Interface/Pad/PadStart|PadStart]] || Start sending gamepad data to the callback function
 
|-
 
|-
| [[/PadVersion|PadVersion]] || Get driver version and RAM requirements
+
| [[83Plus:Software:usb8x/Asm_Interface/Pad/PadVersion|PadVersion]] || Get driver version and RAM requirements
 
|}
 
|}

Latest revision as of 07:54, 21 January 2011

The usb8x gamepad driver is compatible with some USB gamepad controllers. It will (probably) not work with most analog sticks, but will (probably) work with most D-Pads and buttons. The gamepad driver does not bind buttons to a particular function. In other words, it doesn't know that the "down" button means down. Unless you already know the appropriate button mappings for a particular gamepad (the mapping could be saved between program runs), you will have to prompt the user to map buttons with PadSetup.


The gamepad driver is initialized via PadInit. This entry point initializes both the driver and the gamepad hardware, so you may want to check to see if a device is connected via IsDeviceConnected first.


After initializing the gamepad, use PadSetup to help determine button mappings, unless you've already saved a previous mapping. Then use PadStart to start receiving gamepad data to your callback function. The callback will be passed raw data from the gamepad, and should use the masks it collected via PadSetup to determine which buttons have been pressed.

Entry Points

PadInit Initialize gamepad driver and hardware
PadSetup Get offset and bitmask to detect a specific button (map buttons)
PadStart Start sending gamepad data to the callback function
PadVersion Get driver version and RAM requirements