From a7e0be447500736f0640d06016aed03a8d350a8a Mon Sep 17 00:00:00 2001 From: stephena Date: Thu, 25 Feb 2010 21:49:30 +0000 Subject: [PATCH] Changed the second button on the Genesis controller to correspond to the BoosterGrip 'booster' button, since they both use the same analog pin (pin 5). git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1958 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- src/emucore/Genesis.cxx | 7 ++++--- src/emucore/Genesis.hxx | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/emucore/Genesis.cxx b/src/emucore/Genesis.cxx index 24a6d4fd0..f5da509db 100644 --- a/src/emucore/Genesis.cxx +++ b/src/emucore/Genesis.cxx @@ -30,7 +30,7 @@ Genesis::Genesis(Jack jack, const Event& event, const System& system) myLeftEvent = Event::JoystickZeroLeft; myRightEvent = Event::JoystickZeroRight; myFire1Event = Event::JoystickZeroFire1; - myFire2Event = Event::JoystickZeroFire2; + myFire2Event = Event::JoystickZeroFire3; } else { @@ -39,11 +39,12 @@ Genesis::Genesis(Jack jack, const Event& event, const System& system) myLeftEvent = Event::JoystickOneLeft; myRightEvent = Event::JoystickOneRight; myFire1Event = Event::JoystickOneFire1; - myFire2Event = Event::JoystickOneFire2; + myFire2Event = Event::JoystickOneFire3; } // Analog pin 9 is not connected to this controller at all - // Analog pin 5 corresponds to button 'C' on the gamepad + // Analog pin 5 corresponds to button 'C' on the gamepad, and corresponds + // to the 'booster' button on a BoosterGrip controller myAnalogPinValue[Five] = myAnalogPinValue[Nine] = maximumResistance; } diff --git a/src/emucore/Genesis.hxx b/src/emucore/Genesis.hxx index a58a90cf7..a21e90b2e 100644 --- a/src/emucore/Genesis.hxx +++ b/src/emucore/Genesis.hxx @@ -27,7 +27,8 @@ The standard Sega Genesis controller works with the 2600 console for joystick directions and some of the buttons. Button 'B' corresponds to the normal fire button (joy0fire), while button 'C' is read through - INPT1 (analog pin 5), which is normally mapped to the BoosterGrip trigger. + INPT1 (analog pin 5), which is normally mapped to the BoosterGrip + booster button. @author Stephen Anthony */