Add libretro VFS and use VFS for windows target
[pcsx_rearmed.git] / libpcsxcore / sio.c
index b3732d2..4e26907 100644 (file)
 #include "sio.h"
 #include <sys/stat.h>
 
+#ifdef USE_LIBRETRO_VFS
+#include <streams/file_stream_transforms.h>
+#endif
+
 // Status Flags
 #define TX_RDY         0x0001
 #define RX_RDY         0x0002
@@ -117,6 +121,20 @@ void sioWrite8(unsigned char value) {
                                                        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;
@@ -409,6 +427,12 @@ void LoadMcd(int mcd, char *str) {
        }
 
        McdDisable[mcd - 1] = 0;
+#ifdef HAVE_LIBRETRO
+       // memcard1 is handled by libretro
+       if (mcd == 1)
+               return;
+#endif
+
        if (str == NULL || strcmp(str, "none") == 0) {
                McdDisable[mcd - 1] = 1;
                return;