From 724023ee5ca65da8cb0e3bf1f89498a8219789f7 Mon Sep 17 00:00:00 2001 From: "SND\\shalma_cp" Date: Sat, 11 Dec 2010 20:32:53 +0000 Subject: Wipeout 3 - sio.c - Fix NegCon commands - Adds device support git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@61083 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- libpcsxcore/sio.c | 61 +++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 50 insertions(+), 11 deletions(-) (limited to 'libpcsxcore') diff --git a/libpcsxcore/sio.c b/libpcsxcore/sio.c index 5c365404..e1b8a3e1 100644 --- a/libpcsxcore/sio.c +++ b/libpcsxcore/sio.c @@ -145,6 +145,23 @@ void sioWrite8(unsigned char value) { #endif switch (padst) { case 1: SIO_INT(SIO_CYCLES); + /* + $41-4F + $41 = Find bits in poll respones + $42 = Polling command + $43 = Config mode (Dual shock?) + $44 = Digital / Analog (after $F3) + $45 = Get status info (Dual shock?) + + ID: + $41 = Digital + $73 = Analogue Red LED + $53 = Analogue Green LED + + $23 = NegCon + $12 = Mouse + */ + if ((value & 0x40) == 0x40) { padst = 2; parp = 1; if (!Config.UseNet) { @@ -164,17 +181,39 @@ void sioWrite8(unsigned char value) { bufcount = 2 + 32; } else { bufcount = 2 + (buf[parp] & 0x0f) * 2; - } - if (buf[parp] == 0x41) { - switch (value) { - case 0x43: - buf[1] = 0x43; - break; - case 0x45: - buf[1] = 0xf3; - break; - } - } + } + + + // Digital / Dual Shock Controller + if (buf[parp] == 0x41) { + switch (value) { + // enter config mode + case 0x43: + buf[1] = 0x43; + break; + + // get status + case 0x45: + buf[1] = 0xf3; + break; + } + } + + + // NegCon - Wipeout 3 + if( buf[parp] == 0x23 ) { + switch (value) { + // enter config mode + case 0x43: + buf[1] = 0x79; + break; + + // get status + case 0x45: + buf[1] = 0xf3; + break; + } + } } else padst = 0; return; -- cgit v1.2.3