<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>What button is what on your gamepad(s)?</title>
		<link>http://www.allegro.cc/forums/view/608275</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Sat, 10 Sep 2011 06:04:41 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I am making a game that uses a gamepad for input so I&#39;d like to get an idea of what button number in Allegro (e.g., 0, 1, 2, etc.) maps to what physical button (e.g., A, B, X, triangle, etc.) on various gamepads. So, I would appreciate it if anyone who uses a gamepad with Allegro wouldn&#39;t mind posting what button maps to what physical button on your gamepad.</p><p>For example, something like &quot;on my Super NES controller that I somehow managed to plug into my PC button 0 is B, button 1 is Y, button 2 is X ...&quot; and so on.</p><p>My PS1 controller with a USB adapter uses the scheme<br />Button 0 = Triangle<br />Button 1 = Circle<br />Button 2 = X<br />Button 3 = Square<br />Button 4 = L2<br />Button 5 = R2<br />Button 6 = L1<br />Button 7 = R1<br />Button 8 = Select<br />Button 9 = Start<br />Button 10 = Left Stick Button<br />Button 11 = Right Stick Button</p><p>I find this scheme to be a little strange because I&#39;d usually think of X (or A on an xbox controller) to be the &quot;first&quot; button, but this could just be my impression clashing with how things work internally... hence my curiosity about how the numbers work for other people&#39;s devices.</p><p>If your controller is not (or doesn&#39;t resemble) something used on a popular console, a link to a picture would also be appreciated. <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" /></p><p>Thank you. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (amber)</author>
		<pubDate>Thu, 08 Sep 2011 11:42:59 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Wow I edit too much</p><p>Logitech F510 Rumble(Supports 2 different input modes)<br />(Using DirectInput)<br />And is made for use with PCs<br />Resembles a Xbox360 controller<br />Except the left joystick and control pad are placed exactly like on a PS controller<br />Actually, it looks like A PS controller except the buttons have the XBox labels on them</p><p>Button 0 = X (Square on PS controller)<br />Button 1 = A (X on on PS controller)<br />Button 2 = B (Circle on PS controller)<br />Button 3 = Y (Triangle on PS controller)<br />Button 4 = LB (L1)<br />Button 5 = RB (R1)<br />Button 6 = LT (L2)<br />Button 7 = RT (R2)<br />Button 8 = Back (Select)<br />Button 9 = Start<br />Button 10 = Left stick button (L3)<br />Button 11 = Right stick button (R3)</p><p>I&#39;ve quickly tested this with the Allegro ex_joystick_events example, I think those little squares are in an ascending sequence.<br />On all the older gamepads that I&#39;ve used, the Square (Like on PS) was the first button<br />I&#39;ve put where the buttons would be located on a PS controller layout between brackets.</p><p>I&#39;ll put what happens when I use XInput later, still have stuff to do.<br />But I do know the buttons are mapped differently.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (l j)</author>
		<pubDate>Thu, 08 Sep 2011 16:33:32 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>This is informative, particularly the part about other gamepads also corresponding to this pattern. Perhaps I&#39;m right that my gamepad&#39;s layout is rather odd, but wrong that A is the &quot;first&quot; button, and what you have here is more of a &quot;standard&quot; arrangement, at least when using DirectInput.</p><p>I don&#39;t use XInput at all, so no need to post information on that for my sake, if you&#39;re busy.</p><p>Thank you for the response! <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (amber)</author>
		<pubDate>Thu, 08 Sep 2011 21:19:32 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I have to wait until I get home to verify this, but the 360 controller might have A as button 0.</p><p>I do know, however, that with DirectInput, what would be l2 and r2 are on a single axis (so holding both down at once is the same as not holding them down)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (MiquelFire)</author>
		<pubDate>Thu, 08 Sep 2011 21:50:04 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>With Rumble Gamepad F510 working in XInput mode (should be the same as an XBOX360 controller):</p><p>Button 0 = A<br />Button 1 = B<br />Button 2 = X<br />Button 3 = Y<br />Button 4 = LB<br />Button 5 = RB<br />Button 6 = Back<br />Button 7 = Start<br />Button 8 = Left Stick Button<br />Button 9 = Right Stick Button</p><p>LT and RT are mapped to an axis.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Oscar Giner)</author>
		<pubDate>Thu, 08 Sep 2011 22:17:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>That Xbox layout is closer to what I expected. Thanks. <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (amber)</author>
		<pubDate>Fri, 09 Sep 2011 05:22:14 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Oscar, if you were using XInput mode, LT and RT would each be on their own axis, not shared. Just an FYI.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (MiquelFire)</author>
		<pubDate>Fri, 09 Sep 2011 06:17:00 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Allegro 5 uses DirectInput for joystick handling on Windows. In ex_joystick_events, I get two separate axes for LT and RT or I&#39;m a monkey&#39;s uncle. I didn&#39;t try it right now, but I will on a $50+ bet.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Trent Gamblin)</author>
		<pubDate>Fri, 09 Sep 2011 06:29:44 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>According to MSDN, DirectInput puts LT and RT on a shared axis.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>The combination of the left and right triggers in DirectInput is by design. Games have always assumed that DirectInput device axes are centered when there is no user interaction with the device. However, the Xbox 360 controller was designed to register minimum value, not center, when the triggers are not being held. Older games would therefore assume user interaction.</p><p>The solution was to combine the triggers, setting one trigger to a positive direction and the other to a negative direction, so no user interaction is indicative to DirectInput of the &#39;control&#39; being at center.</p></div></div><p>
(From <a href="http://msdn.microsoft.com/en-us/library/ee417014%28v=vs.85%29.aspx">http://msdn.microsoft.com/en-us/library/ee417014%28v=vs.85%29.aspx</a> )</p><p>I don&#39;t know if Allegro 5 does something to the input, though.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (amber)</author>
		<pubDate>Fri, 09 Sep 2011 07:03:01 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>For me, it&#39;s on the same axis. Allegro5 was my first exposure to this behavior actually.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (MiquelFire)</author>
		<pubDate>Fri, 09 Sep 2011 07:34:01 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Well then thanks for not taking that bet because I&#39;m probably wrong <img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" />.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Trent Gamblin)</author>
		<pubDate>Fri, 09 Sep 2011 07:41:30 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Wii Classic controller connected with MayFlash adapter:</p><p>Button 0 = a<br />Button 1 = b<br />Button 2 = x<br />Button 3 = y<br />Button 4 = l<br />Button 5 = r<br />Button 6 = zl<br />Button 7 = zr<br />Button 8 = -<br />Button 9 = +<br />Button 10 = home<br />Button 11 = up<br />Button 12 = left<br />Button 13 = down<br />Button 14 = right
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Ben Delacob)</author>
		<pubDate>Fri, 09 Sep 2011 14:16:16 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Gamecube controller via USB adapter:</p><p>0 - A<br />1 - B<br />2 - X<br />3 - Y<br />4 - L trigger click<br />5 - R trigger click<br />6 - Z<br />7 - Start
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Sirocco)</author>
		<pubDate>Sat, 10 Sep 2011 06:04:41 +0000</pubDate>
	</item>
</rss>
