summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSND\shalma_cp <SND\shalma_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-10-11 23:09:25 +0000
committerSND\shalma_cp <SND\shalma_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-10-11 23:09:25 +0000
commit4a5cd93bcf8c9b9bb53a5ce1e4c9979daec91808 (patch)
tree17055ddc6da2ed5ae59073c69a762405759c8c9c
parent1d2caefc0940340a6c10733da1a8b912eb76f2d9 (diff)
downloadpcsxr-4a5cd93bcf8c9b9bb53a5ce1e4c9979daec91808.tar.gz
Rhapsody: sio.c
- Turn off Receive / Transmit ready until SIO ready - Fixes joypad problems with both dynarec / interpreter git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@58321 e17a0e51-4ae3-4d35-97c3-1a29b211df97
-rw-r--r--libpcsxcore/sio.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/libpcsxcore/sio.c b/libpcsxcore/sio.c
index 518e714d..3857d909 100644
--- a/libpcsxcore/sio.c
+++ b/libpcsxcore/sio.c
@@ -87,13 +87,22 @@ static int DongleInit;
psxRegs.interrupt |= (1 << PSXINT_SIO); \
psxRegs.intCycle[PSXINT_SIO].cycle = eCycle; \
psxRegs.intCycle[PSXINT_SIO].sCycle = psxRegs.cycle; \
- } \
+ } \
+ \
+ StatReg &= ~RX_RDY; \
+ StatReg &= ~TX_RDY; \
}
+
+#define SIO_CYCLES (BaudReg * 8)
+
+
// clk cycle byte
// 4us * 8bits = (PSXCLK / 1000000) * 32; (linuzappz)
// TODO: add SioModePrescaler and BaudReg
-#define SIO_CYCLES 535
+
+// ePSXe 1.6.0
+//#define SIO_CYCLES 535
// ePSXe 1.7.0
//#define SIO_CYCLES 635
@@ -775,6 +784,10 @@ void sioInterrupt() {
// SysPrintf("Sio Interrupt\n");
StatReg |= IRQ;
psxHu32ref(0x1070) |= SWAPu32(0x80);
+
+ // Rhapsody: fixes input problems
+ StatReg |= TX_RDY;
+ StatReg |= RX_RDY;
}
void LoadMcd(int mcd, char *str) {