diff options
| author | iCatButler <i.am.catbutler@gmail.com> | 2016-03-30 15:07:35 +0100 |
|---|---|---|
| committer | iCatButler <i.am.catbutler@gmail.com> | 2016-03-30 15:07:35 +0100 |
| commit | 8b4350fee747708ffd376744ef5dc1e239a87ba6 (patch) | |
| tree | a9ab6e2f25e06edc7c668353f8000856704f7fa3 /libpcsxcore/sio.c | |
| parent | e3df273095a5800e3dcdcb63bd66e269c0c2d3a8 (diff) | |
| download | pcsxr-8b4350fee747708ffd376744ef5dc1e239a87ba6.tar.gz | |
Bring up to date with PCSX-R master (97809)
Diffstat (limited to 'libpcsxcore/sio.c')
| -rwxr-xr-x | libpcsxcore/sio.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libpcsxcore/sio.c b/libpcsxcore/sio.c index 22ca23e5..e4b8fea1 100755 --- a/libpcsxcore/sio.c +++ b/libpcsxcore/sio.c @@ -59,6 +59,10 @@ void SaveDongle( char *str ); static unsigned char buf[ BUFFER_SIZE ]; +//[0] -> dummy +//[1] -> memory card status flag +//[2] -> card 1 id, 0x5a->plugged, any other not plugged +//[3] -> card 2 id, 0x5d->plugged, any other not plugged unsigned char cardh[4] = { 0x00, 0x08, 0x5a, 0x5d }; // Transfer Ready and the Buffer is Empty @@ -722,10 +726,12 @@ void sioWrite8(unsigned char value) { StatReg |= RX_RDY; // Chronicles of the Sword - no memcard = password options - if( Config.NoMemcard || ((strlen(Config.Mcd1) <=0) && (strlen(Config.Mcd2) <=0)) ) { + if( Config.NoMemcard || (!Config.Mcd1[0] && !Config.Mcd2[0])) { memset(buf, 0x00, 4); } else { memcpy(buf, cardh, 4); + if (!Config.Mcd1[0]) buf[2]=0; // is card 1 plugged? (Codename Tenka) + if (!Config.Mcd2[0]) buf[3]=0; // is card 2 plugged? } parp = 0; @@ -883,8 +889,8 @@ void LoadMcd(int mcd, char *str) { if (mcd == 2) data = Mcd2Data; if (*str == 0) { - sprintf(str, "%s/.pcsxr/memcards/card%d.mcd", getenv("HOME"), mcd); // TODO: maybe just whine and quit.. - SysPrintf(_("No memory card value was specified - using a default card %s\n"), str); + SysPrintf(_("No memory card value was specified - card %i is not plugged.\n"), mcd); + return; } f = fopen(str, "rb"); if (f == NULL) { |
