<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://wikiti.brandonw.net/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wikiti.brandonw.net/index.php?action=history&amp;feed=atom&amp;title=83Plus%3ASoftware%3Ausb8x%2FAsm_Interface%2FPad%2FPadSetup</id>
		<title>83Plus:Software:usb8x/Asm Interface/Pad/PadSetup - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wikiti.brandonw.net/index.php?action=history&amp;feed=atom&amp;title=83Plus%3ASoftware%3Ausb8x%2FAsm_Interface%2FPad%2FPadSetup"/>
		<link rel="alternate" type="text/html" href="https://wikiti.brandonw.net/index.php?title=83Plus:Software:usb8x/Asm_Interface/Pad/PadSetup&amp;action=history"/>
		<updated>2026-04-06T02:57:39Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.5</generator>

	<entry>
		<id>https://wikiti.brandonw.net/index.php?title=83Plus:Software:usb8x/Asm_Interface/Pad/PadSetup&amp;diff=5274&amp;oldid=prev</id>
		<title>Dan Englender at 01:50, 10 September 2006</title>
		<link rel="alternate" type="text/html" href="https://wikiti.brandonw.net/index.php?title=83Plus:Software:usb8x/Asm_Interface/Pad/PadSetup&amp;diff=5274&amp;oldid=prev"/>
				<updated>2006-09-10T01:50:44Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Synopsis ==&lt;br /&gt;
'''Name:''' PadSetup&lt;br /&gt;
&lt;br /&gt;
'''Minimum usb8x version:''' 0.11&lt;br /&gt;
&lt;br /&gt;
Gets an offset and bitmask to help map buttons to functions.&lt;br /&gt;
&lt;br /&gt;
=== Inputs ===&lt;br /&gt;
''None''&lt;br /&gt;
&lt;br /&gt;
=== Outputs ===&lt;br /&gt;
* B: Offset byte&lt;br /&gt;
* C: Bit mask&lt;br /&gt;
* NC: Success&lt;br /&gt;
&lt;br /&gt;
=== Destroys ===&lt;br /&gt;
* AF, BC, DE, HL&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
Be sure to initialize the gamepad driver with [[../PadInit|PadInit]] before using this routine.&lt;br /&gt;
&lt;br /&gt;
PadSetup waits for the user to press a button on the gamepad, and then returns the byte offset into the data array and the bit mask to use to check for that button.  You can use this information to determine, from the data passed to the callback function, whether a particular button is being pressed.&lt;br /&gt;
&lt;br /&gt;
PadSetup will return failure if any one of the following conditions occurs:&lt;br /&gt;
# PadSetup cannot determine the offset and bitmask for the button pressed.  This means the gamepad is either incompatible or that particular button is not reported in a way that the gamepad driver understands.  Analog sticks, for example, will probably not be correctly read by the gamepad driver.&lt;br /&gt;
# The function times out (timeout occurs after about 2 seconds).  On failure, you can call the function a couple of times to reach the timeout length you would like.&lt;br /&gt;
# The user has pressed the [on] button.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[../PadStart|PadStart]] - Start relaying gamepad data to the callback function.&lt;/div&gt;</summary>
		<author><name>Dan Englender</name></author>	</entry>

	</feed>