diff options
| author | SND\shalma_cp <SND\shalma_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2010-12-11 20:32:53 +0000 |
|---|---|---|
| committer | SND\shalma_cp <SND\shalma_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2010-12-11 20:32:53 +0000 |
| commit | 724023ee5ca65da8cb0e3bf1f89498a8219789f7 (patch) | |
| tree | 915c23b038d6997908af70c5e226075c262c59f0 | |
| parent | 7fca0741b4a47de8318e0e5489f5a4654b42470c (diff) | |
| download | pcsxr-724023ee5ca65da8cb0e3bf1f89498a8219789f7.tar.gz | |
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
| -rw-r--r-- | libpcsxcore/sio.c | 61 |
1 files changed, 50 insertions, 11 deletions
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; |
