X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libpcsxcore%2Fsio.c;h=ae3e634a9b00e4f6dc5de46ef6e4a4c93d4a43aa;hb=d526ed8c645d7e2147b7d454f29d123b4cfa311d;hp=b3732d298ba623ad296c9a640931354e30c8b53a;hpb=6f18d16a0abcbc0655ed82fd30796fa06242c2b8;p=pcsx_rearmed.git diff --git a/libpcsxcore/sio.c b/libpcsxcore/sio.c index b3732d29..ae3e634a 100644 --- a/libpcsxcore/sio.c +++ b/libpcsxcore/sio.c @@ -17,6 +17,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. * ***************************************************************************/ +#include + /* * SIO functions. */ @@ -117,6 +119,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 +425,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; @@ -416,11 +438,11 @@ void LoadMcd(int mcd, char *str) { if (*str == 0) return; - f = fopen(str, "rb"); + f = fopen_utf8(str, "rb"); if (f == NULL) { SysPrintf(_("The memory card %s doesn't exist - creating it\n"), str); CreateMcd(str); - f = fopen(str, "rb"); + f = fopen_utf8(str, "rb"); if (f != NULL) { struct stat buf; @@ -461,7 +483,7 @@ void SaveMcd(char *mcd, char *data, uint32_t adr, int size) { if (mcd == NULL || *mcd == 0 || strcmp(mcd, "none") == 0) return; - f = fopen(mcd, "r+b"); + f = fopen_utf8(mcd, "r+b"); if (f != NULL) { struct stat buf; @@ -498,7 +520,7 @@ void CreateMcd(char *mcd) { int s = MCD_SIZE; int i = 0, j; - f = fopen(mcd, "wb"); + f = fopen_utf8(mcd, "wb"); if (f == NULL) return;