diff --git a/docs/index.html b/docs/index.html index 223bc60a9..bc6ab9195 100644 --- a/docs/index.html +++ b/docs/index.html @@ -273,10 +273,11 @@ Atari 2600 FPGA project, including cycle-exact audio, analog interference from mixing of audio channels, as well as stereo sound support; dynamic sound resampling is also included -
  • Emulates the Atari 2600 Joystick, Paddle, Driving, CBS Booster Grip, Sega Genesis, QuadTari controllers using your computer's keyboard, - joysticks or mouse
  • -
  • Emulates CX22/CX80 style Trak-Balls, Amiga/Atari mouse, MindLink controller and the Light Gun using your - computer's mouse
  • +
  • Emulates the Atari 2600 Joystick, Paddle, Driving, CBS Booster Grip, + Sega Genesis, Joy 2B+, + QuadTari controllers using your computer's keyboard, joysticks or mouse
  • +
  • Emulates CX22/CX80 style Trak-Balls, Amiga/Atari mouse, MindLink controller + and the Light Gun using your computer's mouse
  • Emulates the Atari 2600 Keyboard controllers using your computer's keyboard
  • Emulates Spectravideo CompuMate system using your computer's keyboard, including mapping of CompuMate 'Backspace', 'Space' and 'Enter' functionality to @@ -992,6 +993,108 @@ +

    Joy 2B+ Controller (cannot be remapped, always associated with joystick and Booster Grip controllers)

    + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Left Pad
    FunctionKey
    Pad UpSame as Left Joystick 'Up'
    Pad DownSame as Left Joystick 'Down'
    Pad LeftSame as Left Joystick 'Left'
    Pad RightSame as Left Joystick 'Right'
    Button 'B'Same as Left Joystick 'Fire'
    Button 'C'Same as Left Joystick 'Top Booster Button'
    Button '3'Same as Left Joystick 'Handle Grip Trigger'
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Right Pad
    FunctionKey
    Pad UpSame as Right Joystick 'Up'
    Pad DownSame as Right Joystick 'Down'
    Pad LeftSame as Right Joystick 'Left'
    Pad RightSame as Right Joystick 'Right'
    Button 'B'Same as Right Joystick 'Fire'
    Button 'C'Same as Right Joystick 'Top Booster Button'
    Button '3'Same as Right Joystick 'Handle Grip Trigger'
    +
    +

    Driving Controller (can be remapped)

    @@ -2556,7 +2659,7 @@ Booster Grip ✓ - ✓ + ✓ (+ extra) ✓ (+ extra) ✕ ✓ (+ extra) @@ -2569,6 +2672,14 @@ ✕ ✕ + + Joy 2B+ + ✓ + ✓ (+ extra) + ✓ (+ extra) + ✕ + ✕ (+ extra) + Keyboard ✓ @@ -5260,6 +5371,7 @@ Ms Pac-Man (Stella extended codes): AtariVox ¹A SpeakJet based unlimited-vocabulary speech/sound synthesizer with 32K EEPROM. SaveKeyA 32K EEPROM for saving high scores, etc. (the EEPROM portion of an AtariVox). Genesis Sega Genesis controller, which can be used similar to a Booster Grip, giving an extra button. + Joy2B+ Joy 2B+ controller, which can be used similar to a Booster Grip, giving two extra buttons. CompuMate ¹Spectravideo CompuMate (if either left or right is set, CompuMate is used for both). LightgunAtari XG-1 compatible Light Gun. MindLink ¹MindLink controller. diff --git a/src/debugger/gui/Joy2BPlusWidget.hxx b/src/debugger/gui/Joy2BPlusWidget.hxx new file mode 100644 index 000000000..baa32400d --- /dev/null +++ b/src/debugger/gui/Joy2BPlusWidget.hxx @@ -0,0 +1,53 @@ +//============================================================================ +// +// SSSS tt lll lll +// SS SS tt ll ll +// SS tttttt eeee ll ll aaaa +// SSSS tt ee ee ll ll aa +// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator" +// SS SS tt ee ll ll aa aa +// SSSS ttt eeeee llll llll aaaaa +// +// Copyright (c) 1995-2022 by Bradford W. Mott, Stephen Anthony +// and the Stella Team +// +// See the file "License.txt" for information on usage and redistribution of +// this file, and for a DISCLAIMER OF ALL WARRANTIES. +//============================================================================ + +#ifndef JOY2BPLUS_WIDGET_HXX +#define JOY2BPLUS_WIDGET_HXX + +#include "Control.hxx" +#include "ControllerWidget.hxx" + +class Joy2BPlusWidget : public ControllerWidget +{ + public: + Joy2BPlusWidget(GuiObject* boss, const GUI::Font& font, int x, int y, + Controller& controller); + ~Joy2BPlusWidget() override = default; + + private: + enum { kJUp = 0, kJDown, kJLeft, kJRight, kJButtonB, kJButtonC, kJButton3 }; + + std::array myPins{nullptr}; + static constexpr std::array ourPinNo = {{ + Controller::DigitalPin::One, Controller::DigitalPin::Two, + Controller::DigitalPin::Three, Controller::DigitalPin::Four, + Controller::DigitalPin::Six + }}; + + private: + void loadConfig() override; + void handleCommand(CommandSender* sender, int cmd, int data, int id) override; + + // Following constructors and assignment operators not supported + Joy2BPlusWidget() = delete; + Joy2BPlusWidget(const Joy2BPlusWidget&) = delete; + Joy2BPlusWidget(Joy2BPlusWidget&&) = delete; + Joy2BPlusWidget& operator=(const Joy2BPlusWidget&) = delete; + Joy2BPlusWidget& operator=(Joy2BPlusWidget&&) = delete; +}; + +#endif diff --git a/src/debugger/gui/Joy2PlusWidget.cxx b/src/debugger/gui/Joy2PlusWidget.cxx new file mode 100644 index 000000000..78775b09d --- /dev/null +++ b/src/debugger/gui/Joy2PlusWidget.cxx @@ -0,0 +1,133 @@ +//============================================================================ +// +// SSSS tt lll lll +// SS SS tt ll ll +// SS tttttt eeee ll ll aaaa +// SSSS tt ee ee ll ll aa +// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator" +// SS SS tt ee ll ll aa aa +// SSSS ttt eeeee llll llll aaaaa +// +// Copyright (c) 1995-2022 by Bradford W. Mott, Stephen Anthony +// and the Stella Team +// +// See the file "License.txt" for information on usage and redistribution of +// this file, and for a DISCLAIMER OF ALL WARRANTIES. +//============================================================================ + +#include "Joy2BPlusWidget.hxx" + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Joy2BPlusWidget::Joy2BPlusWidget(GuiObject* boss, const GUI::Font& font, + int x, int y, Controller& controller) + : ControllerWidget(boss, font, x, y, controller) +{ + const string& label = isLeftPort() ? "Left (Joy 2B+)" : "Right (Joy 2B+)"; + + const int fontHeight = font.getFontHeight(); + int xpos = x, ypos = y, lwidth = font.getStringWidth("Right (Joy 2B+)"); + StaticTextWidget* t; + + t = new StaticTextWidget(boss, font, xpos, ypos+2, lwidth, + fontHeight, label, TextAlign::Left); + xpos += t->getWidth()/2 - 5; ypos += t->getHeight() + 10; + myPins[kJUp] = new CheckboxWidget(boss, font, xpos, ypos, "", + CheckboxWidget::kCheckActionCmd); + myPins[kJUp]->setID(kJUp); + myPins[kJUp]->setTarget(this); + + ypos += myPins[kJUp]->getHeight() * 2 + 10; + myPins[kJDown] = new CheckboxWidget(boss, font, xpos, ypos, "", + CheckboxWidget::kCheckActionCmd); + myPins[kJDown]->setID(kJDown); + myPins[kJDown]->setTarget(this); + + xpos -= myPins[kJUp]->getWidth() + 5; + ypos -= myPins[kJUp]->getHeight() + 5; + myPins[kJLeft] = new CheckboxWidget(boss, font, xpos, ypos, "", + CheckboxWidget::kCheckActionCmd); + myPins[kJLeft]->setID(kJLeft); + myPins[kJLeft]->setTarget(this); + + xpos += (myPins[kJUp]->getWidth() + 5) * 2; + myPins[kJRight] = new CheckboxWidget(boss, font, xpos, ypos, "", + CheckboxWidget::kCheckActionCmd); + myPins[kJRight]->setID(kJRight); + myPins[kJRight]->setTarget(this); + + xpos -= (myPins[kJUp]->getWidth() + 5) * 2; + ypos = 20 + (myPins[kJUp]->getHeight() + 10) * 3; + myPins[kJButtonB] = new CheckboxWidget(boss, font, xpos, ypos, "Button B", + CheckboxWidget::kCheckActionCmd); + myPins[kJButtonB]->setID(kJButtonB); + myPins[kJButtonB]->setTarget(this); + + ypos += myPins[kJButtonB]->getHeight() + 5; + myPins[kJButtonC] = new CheckboxWidget(boss, font, xpos, ypos, "Button C", + CheckboxWidget::kCheckActionCmd); + myPins[kJButtonC]->setID(kJButtonC); + myPins[kJButtonC]->setTarget(this); + + ypos += myPins[kJButtonC]->getHeight() + 5; + myPins[kJButton3] = new CheckboxWidget(boss, font, xpos, ypos, "Button 3", + CheckboxWidget::kCheckActionCmd); + myPins[kJButton3]->setID(kJButton3); + myPins[kJButton3]->setTarget(this); + + addFocusWidget(myPins[kJUp]); + addFocusWidget(myPins[kJLeft]); + addFocusWidget(myPins[kJRight]); + addFocusWidget(myPins[kJDown]); + addFocusWidget(myPins[kJButtonB]); + addFocusWidget(myPins[kJButtonC]); + addFocusWidget(myPins[kJButton3]); +} + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +void Joy2BPlusWidget::loadConfig() +{ + myPins[kJUp]->setState(!getPin(ourPinNo[kJUp])); + myPins[kJDown]->setState(!getPin(ourPinNo[kJDown])); + myPins[kJLeft]->setState(!getPin(ourPinNo[kJLeft])); + myPins[kJRight]->setState(!getPin(ourPinNo[kJRight])); + myPins[kJButtonB]->setState(!getPin(ourPinNo[kJButtonB])); + + myPins[kJButton3]->setState( + getPin(Controller::AnalogPin::Five) == AnalogReadout::connectToGround()); + myPins[kJButtonC]->setState( + getPin(Controller::AnalogPin::Nine) == AnalogReadout::connectToGround()); +} + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +void Joy2BPlusWidget::handleCommand( + CommandSender* sender, int cmd, int data, int id) +{ + if(cmd == CheckboxWidget::kCheckActionCmd) + { + switch(id) + { + case kJUp: + case kJDown: + case kJLeft: + case kJRight: + case kJButtonB: + setPin(ourPinNo[id], !myPins[id]->getState()); + break; + case kJButtonC: + setPin(Controller::AnalogPin::Nine, + myPins[id]->getState() ? AnalogReadout::connectToGround() + : AnalogReadout::connectToVcc()); + break; + case kJButton3: + setPin(Controller::AnalogPin::Five, + myPins[id]->getState() ? AnalogReadout::connectToGround() + : AnalogReadout::connectToVcc()); + break; + default: + break; + } + } +} + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +constexpr std::array Joy2BPlusWidget::ourPinNo; diff --git a/src/debugger/gui/RiotWidget.cxx b/src/debugger/gui/RiotWidget.cxx index 9dfa26c0a..9182848ed 100644 --- a/src/debugger/gui/RiotWidget.cxx +++ b/src/debugger/gui/RiotWidget.cxx @@ -40,6 +40,7 @@ #include "AtariMouseWidget.hxx" #include "TrakBallWidget.hxx" #include "QuadTariWidget.hxx" +#include "Joy2BPlusWidget.hxx" #include "RiotWidget.hxx" @@ -537,6 +538,8 @@ ControllerWidget* RiotWidget::addControlWidget(GuiObject* boss, const GUI::Font& return new DrivingWidget(boss, font, x, y, controller); case Controller::Type::Genesis: return new GenesisWidget(boss, font, x, y, controller); + case Controller::Type::Joy2BPlus: + return new Joy2BPlusWidget(boss, font, x, y, controller); case Controller::Type::Joystick: return new JoystickWidget(boss, font, x, y, controller); case Controller::Type::Keyboard: @@ -544,14 +547,14 @@ ControllerWidget* RiotWidget::addControlWidget(GuiObject* boss, const GUI::Font& // case Controller::Type::KidVid: // TODO - implement this // case Controller::Type::MindLink: // TODO - implement this // case Controller::Type::Lightgun: // TODO - implement this + case Controller::Type::QuadTari: + return new QuadTariWidget(boss, font, x, y, controller); case Controller::Type::Paddles: return new PaddleWidget(boss, font, x, y, controller); case Controller::Type::SaveKey: return new SaveKeyWidget(boss, font, x, y, controller); case Controller::Type::TrakBall: return new TrakBallWidget(boss, font, x, y, controller); - case Controller::Type::QuadTari: - return new QuadTariWidget(boss, font, x, y, controller); default: return new NullControlWidget(boss, font, x, y, controller); } diff --git a/src/debugger/gui/module.mk b/src/debugger/gui/module.mk index 268f5566f..f0c64410c 100644 --- a/src/debugger/gui/module.mk +++ b/src/debugger/gui/module.mk @@ -56,13 +56,14 @@ MODULE_OBJS := \ src/debugger/gui/CartDebugWidget.o \ src/debugger/gui/CpuWidget.o \ src/debugger/gui/DataGridOpsWidget.o \ - src/debugger/gui/DataGridRamWidget.o \ + src/debugger/gui/DataGridRamWidget.o \ src/debugger/gui/DataGridWidget.o \ src/debugger/gui/DebuggerDialog.o \ src/debugger/gui/DelayQueueWidget.o \ src/debugger/gui/DrivingWidget.o \ src/debugger/gui/FlashWidget.o \ src/debugger/gui/GenesisWidget.o \ + src/debugger/gui/Joy2BPlusWidget.o \ src/debugger/gui/JoystickWidget.o \ src/debugger/gui/KeyboardWidget.o \ src/debugger/gui/PaddleWidget.o \ diff --git a/src/emucore/Booster.cxx b/src/emucore/Booster.cxx index 6abb6f76f..bf0413271 100644 --- a/src/emucore/Booster.cxx +++ b/src/emucore/Booster.cxx @@ -23,13 +23,13 @@ BoosterGrip::BoosterGrip(Jack jack, const Event& event, const System& system) { if(myJack == Jack::Left) { - myTriggerEvent = Event::LeftJoystickFire5; - myBoosterEvent = Event::LeftJoystickFire9; + myBoosterEvent = Event::LeftJoystickFire5; + myTriggerEvent = Event::LeftJoystickFire9; } else { - myTriggerEvent = Event::RightJoystickFire5; - myBoosterEvent = Event::RightJoystickFire9; + myBoosterEvent = Event::RightJoystickFire5; + myTriggerEvent = Event::RightJoystickFire9; } setPin(AnalogPin::Five, AnalogReadout::disconnect()); @@ -48,6 +48,6 @@ void BoosterGrip::updateButtons() updateMouseButtons(firePressed, boosterPressed); setPin(DigitalPin::Six, !getAutoFireState(firePressed)); - setPin(AnalogPin::Five, triggerPressed ? AnalogReadout::connectToVcc() : AnalogReadout::disconnect()); - setPin(AnalogPin::Nine, boosterPressed ? AnalogReadout::connectToVcc() : AnalogReadout::disconnect()); + setPin(AnalogPin::Five, boosterPressed ? AnalogReadout::connectToVcc() : AnalogReadout::disconnect()); + setPin(AnalogPin::Nine, triggerPressed ? AnalogReadout::connectToVcc() : AnalogReadout::disconnect()); } diff --git a/src/emucore/Console.cxx b/src/emucore/Console.cxx index c45949b0b..edb160d1e 100644 --- a/src/emucore/Console.cxx +++ b/src/emucore/Console.cxx @@ -40,6 +40,7 @@ #include "TrakBall.hxx" #include "Lightgun.hxx" #include "QuadTari.hxx" +#include "Joy2BPlus.hxx" #include "M6502.hxx" #include "M6532.hxx" #include "TIA.hxx" @@ -1015,6 +1016,10 @@ unique_ptr Console::getControllerPort(const Controller::Type type, controller = make_unique(port, myOSystem, *mySystem, myProperties); break; + case Controller::Type::Joy2BPlus: + controller = make_unique(port, myEvent, *mySystem); + break; + default: // What else can we do? // always create because it may have been changed by user dialog diff --git a/src/emucore/Control.cxx b/src/emucore/Control.cxx index 7fd196b8c..7ffc779be 100644 --- a/src/emucore/Control.cxx +++ b/src/emucore/Control.cxx @@ -111,7 +111,7 @@ string Controller::getName(const Type type) "Amiga mouse", "Atari mouse", "AtariVox", "Booster Grip", "CompuMate", "Driving", "Sega Genesis", "Joystick", "Keyboard", "Kid Vid", "MindLink", "Paddles", "Paddles_IAxis", "Paddles_IAxDr", "SaveKey", "Trak-Ball", - "Light Gun", "QuadTari" + "Light Gun", "QuadTari", "Joy 2B+" }; return NAMES[static_cast(type)]; @@ -126,7 +126,7 @@ string Controller::getPropName(const Type type) "AMIGAMOUSE", "ATARIMOUSE", "ATARIVOX", "BOOSTERGRIP", "COMPUMATE", "DRIVING", "GENESIS", "JOYSTICK", "KEYBOARD", "KIDVID", "MINDLINK", "PADDLES", "PADDLES_IAXIS", "PADDLES_IAXDR", "SAVEKEY", "TRAKBALL", - "LIGHTGUN", "QUADTARI" + "LIGHTGUN", "QUADTARI", "JOY2B+" }; return PROP_NAMES[static_cast(type)]; diff --git a/src/emucore/Control.hxx b/src/emucore/Control.hxx index a687ef689..62e1b8747 100644 --- a/src/emucore/Control.hxx +++ b/src/emucore/Control.hxx @@ -102,7 +102,7 @@ class Controller : public Serializable AmigaMouse, AtariMouse, AtariVox, BoosterGrip, CompuMate, Driving, Genesis, Joystick, Keyboard, KidVid, MindLink, Paddles, PaddlesIAxis, PaddlesIAxDr, SaveKey, TrakBall, - Lightgun, QuadTari, + Lightgun, QuadTari, Joy2BPlus, LastType }; diff --git a/src/emucore/ControllerDetector.cxx b/src/emucore/ControllerDetector.cxx index c54b3b715..5bf9b2986 100644 --- a/src/emucore/ControllerDetector.cxx +++ b/src/emucore/ControllerDetector.cxx @@ -71,8 +71,10 @@ Controller::Type ControllerDetector::autodetectPort( type = Controller::Type::AtariMouse; else if(isProbablyAmigaMouse(image, size)) type = Controller::Type::AmigaMouse; - else if(usesKeyboard(image, size, port) && !usesJoystickDirections(image, size)) - type = Controller::Type::Keyboard; + else if(usesKeyboard(image, size, port)) // must be detected before Genesis! + type = usesJoystickDirections(image, size) + ? Controller::Type::Joy2BPlus + : Controller::Type::Keyboard; else if(usesGenesisButton(image, size, port)) type = Controller::Type::Genesis; else if(isProbablyLightGun(image, size, port)) diff --git a/src/emucore/Joy2BPlus.cxx b/src/emucore/Joy2BPlus.cxx new file mode 100644 index 000000000..214a3660b --- /dev/null +++ b/src/emucore/Joy2BPlus.cxx @@ -0,0 +1,53 @@ +//============================================================================ +// +// SSSS tt lll lll +// SS SS tt ll ll +// SS tttttt eeee ll ll aaaa +// SSSS tt ee ee ll ll aa +// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator" +// SS SS tt ee ll ll aa aa +// SSSS ttt eeeee llll llll aaaaa +// +// Copyright (c) 1995-2022 by Bradford W. Mott, Stephen Anthony +// and the Stella Team +// +// See the file "License.txt" for information on usage and redistribution of +// this file, and for a DISCLAIMER OF ALL WARRANTIES. +//============================================================================ + +#include "Joy2BPlus.hxx" + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Joy2BPlus::Joy2BPlus(Jack jack, const Event& event, const System& system) + : Joystick(jack, event, system, Controller::Type::Joy2BPlus) +{ + if(myJack == Jack::Left) + { + myButtonCEvent = Event::LeftJoystickFire5; + myButton3Event = Event::LeftJoystickFire9; + } + else + { + myButtonCEvent = Event::RightJoystickFire5; + myButton3Event = Event::RightJoystickFire9; + } + + setPin(AnalogPin::Five, AnalogReadout::connectToVcc()); + setPin(AnalogPin::Nine, AnalogReadout::connectToVcc()); +} + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +void Joy2BPlus::updateButtons() +{ + bool firePressed = myEvent.get(myFireEvent) != 0; + // The Joy 2B+ has two more buttons on it. These buttons are + // connected to the inputs usually used by paddles. + bool buttonCPressed = myEvent.get(myButtonCEvent) != 0; + const bool button3Pressed = myEvent.get(myButton3Event) != 0; + + updateMouseButtons(firePressed, buttonCPressed); + + setPin(DigitalPin::Six, !getAutoFireState(firePressed)); + setPin(AnalogPin::Five, buttonCPressed ? AnalogReadout::connectToGround() : AnalogReadout::connectToVcc()); + setPin(AnalogPin::Nine, button3Pressed ? AnalogReadout::connectToGround() : AnalogReadout::connectToVcc()); +} diff --git a/src/emucore/Joy2BPlus.hxx b/src/emucore/Joy2BPlus.hxx new file mode 100644 index 000000000..b359be0a9 --- /dev/null +++ b/src/emucore/Joy2BPlus.hxx @@ -0,0 +1,71 @@ +//============================================================================ +// +// SSSS tt lll lll +// SS SS tt ll ll +// SS tttttt eeee ll ll aaaa +// SSSS tt ee ee ll ll aa +// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator" +// SS SS tt ee ll ll aa aa +// SSSS ttt eeeee llll llll aaaaa +// +// Copyright (c) 1995-2022 by Bradford W. Mott, Stephen Anthony +// and the Stella Team +// +// See the file "License.txt" for information on usage and redistribution of +// this file, and for a DISCLAIMER OF ALL WARRANTIES. +//============================================================================ + +#ifndef JOY2BPLUS_HXX +#define JOY2BPLUS_HXX + +#include "Joystick.hxx" + +/** + The Joy 2B+ 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) and + button '3' through INPT0 (analog pin 9). + + @author Thomas Jentzsch +*/ +class Joy2BPlus : public Joystick +{ + public: + /** + Create a new Joy 2B+ joystick plugged into the specified jack + + @param jack The jack the controller is plugged into + @param event The event object to use for events + @param system The system using this controller + */ + Joy2BPlus(Jack jack, const Event& event, const System& system); + ~Joy2BPlus() override = default; + + public: + /** + Returns the name of this controller. + */ + string name() const override { return "Joy 2B+"; } + + private: + /** + Update the button pin states. + */ + void updateButtons() override; + + private: + // Pre-compute the events we care about based on given port + // This will eliminate test for left or right port in update() + Event::Type myButton3Event, myButtonCEvent; + + private: + // Following constructors and assignment operators not supported + Joy2BPlus() = delete; + Joy2BPlus(const Joy2BPlus&) = delete; + Joy2BPlus(Joy2BPlus&&) = delete; + Joy2BPlus& operator=(const Joy2BPlus&) = delete; + Joy2BPlus& operator=(Joy2BPlus&&) = delete; +}; + +#endif + diff --git a/src/emucore/module.mk b/src/emucore/module.mk index 40626cdf7..4b1796a5f 100644 --- a/src/emucore/module.mk +++ b/src/emucore/module.mk @@ -67,7 +67,8 @@ MODULE_OBJS := \ src/emucore/FSNode.o \ src/emucore/Genesis.o \ src/emucore/GlobalKeyHandler.o \ - src/emucore/Joystick.o \ + src/emucore/Joy2BPlus.o \ + src/emucore/Joystick.o \ src/emucore/Keyboard.o \ src/emucore/KidVid.o \ src/emucore/Lightgun.o \ diff --git a/src/gui/GameInfoDialog.cxx b/src/gui/GameInfoDialog.cxx index 0406c469a..e9192c223 100644 --- a/src/gui/GameInfoDialog.cxx +++ b/src/gui/GameInfoDialog.cxx @@ -294,6 +294,7 @@ void GameInfoDialog::addControllersTab() VarList::push_back(items, "AtariVox", "ATARIVOX"); VarList::push_back(items, "SaveKey", "SAVEKEY"); VarList::push_back(items, "Sega Genesis", "GENESIS"); + VarList::push_back(items, "Joy2B+", "JOY_2B+"); VarList::push_back(items, "Kid Vid", "KIDVID"); VarList::push_back(items, "Light Gun", "LIGHTGUN"); VarList::push_back(items, "MindLink", "MINDLINK"); diff --git a/src/gui/QuadTariDialog.cxx b/src/gui/QuadTariDialog.cxx index 9a2f23994..d59d11054 100644 --- a/src/gui/QuadTariDialog.cxx +++ b/src/gui/QuadTariDialog.cxx @@ -55,6 +55,7 @@ QuadTariDialog::QuadTariDialog(GuiObject* boss, const GUI::Font& font, int max_w VarList::push_back(ctrls, "AtariVox", "ATARIVOX"); VarList::push_back(ctrls, "SaveKey", "SAVEKEY"); //VarList::push_back(ctrls, "Sega Genesis", "GENESIS"); + //VarList::push_back(items, "Joy2B+", "JOY_2B+"); //VarList::push_back(ctrls, "Kid Vid", "KIDVID"); //VarList::push_back(ctrls, "Light Gun", "LIGHTGUN"); //VarList::push_back(ctrls, "MindLink", "MINDLINK"); diff --git a/src/gui/StellaSettingsDialog.cxx b/src/gui/StellaSettingsDialog.cxx index 3d3be7893..4652e0da3 100644 --- a/src/gui/StellaSettingsDialog.cxx +++ b/src/gui/StellaSettingsDialog.cxx @@ -193,6 +193,7 @@ void StellaSettingsDialog::addGameOptions(WidgetArray& wid, int xpos, int& ypos) VarList::push_back(ctrls, "Atari mouse", "ATARIMOUSE"); VarList::push_back(ctrls, "Trak-Ball", "TRAKBALL"); VarList::push_back(ctrls, "Sega Genesis", "GENESIS"); + VarList::push_back(ctrls, "Joy2B+", "JOY_2B+"); // TODO: should work, but needs testing with real hardware VarList::push_back(ctrls, "QuadTari", "QUADTARI"); int pwidth = _font.getStringWidth("Sega Genesis"); diff --git a/src/libretro/Makefile.common b/src/libretro/Makefile.common index e162bb1dc..13926bb04 100644 --- a/src/libretro/Makefile.common +++ b/src/libretro/Makefile.common @@ -107,6 +107,7 @@ SOURCES_CXX := \ $(CORE_DIR)/emucore/FSNode.cxx \ $(CORE_DIR)/emucore/Genesis.cxx \ $(CORE_DIR)/emucore/GlobalKeyHandler.cxx \ + $(CORE_DIR)/emucore/Joy2BPlus.cxx \ $(CORE_DIR)/emucore/Joystick.cxx \ $(CORE_DIR)/emucore/Keyboard.cxx \ $(CORE_DIR)/emucore/KidVid.cxx \ diff --git a/src/libretro/Stella.vcxproj b/src/libretro/Stella.vcxproj index 43472ef65..452b74065 100644 --- a/src/libretro/Stella.vcxproj +++ b/src/libretro/Stella.vcxproj @@ -259,6 +259,7 @@ + diff --git a/src/windows/Stella.vcxproj b/src/windows/Stella.vcxproj index a2919d866..c439d7890 100755 --- a/src/windows/Stella.vcxproj +++ b/src/windows/Stella.vcxproj @@ -827,6 +827,7 @@ true + true @@ -885,6 +886,7 @@ + @@ -2013,6 +2015,7 @@ true + true @@ -2087,6 +2090,7 @@ + diff --git a/src/windows/Stella.vcxproj.filters b/src/windows/Stella.vcxproj.filters index 27088d7c7..dc1e30743 100644 --- a/src/windows/Stella.vcxproj.filters +++ b/src/windows/Stella.vcxproj.filters @@ -1140,6 +1140,12 @@ Source Files\debugger + + Source Files\emucore + + + Source Files\debugger + @@ -2360,6 +2366,12 @@ Header Files\debugger + + Header Files\emucore + + + Header Files\debugger +