diff --git a/bsnes/emulator/emulator.hpp b/bsnes/emulator/emulator.hpp index 6ae643f1..ad4119dc 100644 --- a/bsnes/emulator/emulator.hpp +++ b/bsnes/emulator/emulator.hpp @@ -29,7 +29,7 @@ using namespace nall; namespace Emulator { static const string Name = "bsnes"; - static const string Version = "114.3"; + static const string Version = "114.4"; static const string Author = "byuu"; static const string License = "GPLv3"; static const string Website = "https://byuu.org"; diff --git a/bsnes/sfc/coprocessor/icd/interface.cpp b/bsnes/sfc/coprocessor/icd/interface.cpp index 37f8eeb0..c80d90a6 100644 --- a/bsnes/sfc/coprocessor/icd/interface.cpp +++ b/bsnes/sfc/coprocessor/icd/interface.cpp @@ -88,14 +88,6 @@ auto ICD::joypWrite(bool p14, bool p15) -> void { if(packetLock == 1) { if(p14 == 0 && p15 == 1) { - if((joypPacket[0] >> 3) == 0x11) { - mltReq = joypPacket[1] & 3; - if(mltReq == 0) joypID &= 0; //1-player mode - if(mltReq == 1) joypID &= 1; //2-player mode - if(mltReq == 2) joypID &= 3; //4-player mode (unverified; but the most likely behavior) - if(mltReq == 3) joypID &= 3; //4-player mode - } - if(packetSize < 64) packet[packetSize++] = joypPacket; packetLock = 0; pulseLock = 1; diff --git a/bsnes/sfc/coprocessor/icd/io.cpp b/bsnes/sfc/coprocessor/icd/io.cpp index 4c4f0b6e..1f32b2a9 100644 --- a/bsnes/sfc/coprocessor/icd/io.cpp +++ b/bsnes/sfc/coprocessor/icd/io.cpp @@ -55,6 +55,13 @@ auto ICD::writeIO(uint addr, uint8 data) -> void { if((r6003 & 0x80) == 0x00 && (data & 0x80) == 0x80) { power(true); //soft reset } + + mltReq = data >> 4 & 3; + if(mltReq == 0) joypID &= ~0; //1-player mode + if(mltReq == 1) joypID &= ~1; //2-player mode + if(mltReq == 2) joypID &= ~3; //4-player mode (unverified; but the most likely behavior) + if(mltReq == 3) joypID &= ~3; //4-player mode + auto frequency = clockFrequency(); switch(data & 3) { case 0: this->frequency = frequency / 4; break; //fast (glitchy, even on real hardware) diff --git a/bsnes/target-bsnes/settings/settings.cpp b/bsnes/target-bsnes/settings/settings.cpp index a7d03d2d..96ab5524 100644 --- a/bsnes/target-bsnes/settings/settings.cpp +++ b/bsnes/target-bsnes/settings/settings.cpp @@ -24,7 +24,7 @@ SettingsWindow& settingsWindow = Instances::settingsWindow(); auto Settings::load() -> void { Markup::Node::operator=(BML::unserialize(string::read(location), " ")); process(true); - file::write(locate("settings.bml"), BML::serialize(*this, " ")); + save(); } auto Settings::save() -> void {