From 4a5cd93bcf8c9b9bb53a5ce1e4c9979daec91808 Mon Sep 17 00:00:00 2001 From: "SND\\shalma_cp" Date: Mon, 11 Oct 2010 23:09:25 +0000 Subject: 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 --- libpcsxcore/sio.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'libpcsxcore') 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) { -- cgit v1.2.3