Merged Super Game Boy MLT_REQ fix [devinacker]
This commit is contained in:
byuu 2020-02-18 20:07:05 +09:00
parent 7053a0b605
commit c13745d753
4 changed files with 9 additions and 10 deletions

View File

@ -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";

View File

@ -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;

View File

@ -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)

View File

@ -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 {