X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fjerry.cpp;h=e0255c49d394b071e5e290711a282d37a274996a;hb=00f18c4ebbfda2eb5a398cc3166c6ef1692c4f30;hp=9ff7ac6af141faeb92409025c5193051aa9ec8ee;hpb=7228359373eb7602c26f7b098d6b2271ff5727a1;p=virtualjaguar diff --git a/src/jerry.cpp b/src/jerry.cpp index 9ff7ac6..e0255c4 100644 --- a/src/jerry.cpp +++ b/src/jerry.cpp @@ -435,7 +435,18 @@ WriteLog("JERRY: Unhandled timer read (BYTE) at %08X...\n", offset); // else if (offset >= 0xF17C00 && offset <= 0xF17C01) // return anajoy_byte_read(offset); else if (offset >= 0xF14000 && offset <= 0xF14003) - return JoystickReadByte(offset) | EepromReadByte(offset); +// return JoystickReadByte(offset) | EepromReadByte(offset); + { + uint16_t value = JoystickReadWord(offset & 0xFE); + + if (offset & 0x01) + value &= 0xFF; + else + value >>= 8; + + // This is wrong, should only have the lowest bit from $F14001 + return value | EepromReadByte(offset); + } else if (offset >= 0xF14000 && offset <= 0xF1A0FF) return EepromReadByte(offset); @@ -568,7 +579,10 @@ WriteLog("JERRY: Unhandled timer write (BYTE) at %08X...\n", offset); }*/ else if ((offset >= 0xF14000) && (offset <= 0xF14003)) { - JoystickWriteByte(offset, data); +WriteLog("JERRYWriteByte: Unhandled byte write to JOYSTICK by %s.\n", whoName[who]); +// JoystickWriteByte(offset, data); + JoystickWriteWord(offset & 0xFE, (uint16_t)data); +// This is wrong, EEPROM is never written here EepromWriteByte(offset, data); return; }