SIO: Latest changes from KrossX which solves problems with Metal Gear Solid 3 and Shining Force EXA.

You might need to make a  new memory card for those games if you had a problem.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5774 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
refraction 2013-12-27 22:40:40 +00:00
parent 462c40cf4b
commit 6cd7c74d51
1 changed files with 5 additions and 2 deletions

View File

@ -421,6 +421,7 @@ SIO_WRITE memcardSector(u8 data)
{
static u8 xor_check = 0;
static bool sectorDone = false;
static u16 length = 0;
if(!sectorDone)
{
@ -432,12 +433,12 @@ SIO_WRITE memcardSector(u8 data)
case 5: mcd->sectorAddr |= data << 24; xor_check ^= data; break;
case 6: mcd->goodSector = data == xor_check; break;
case 8: mcd->transferAddr = (512+16) * mcd->sectorAddr; break;
case 9: memset8<0xFF>(sio.buf); sectorDone = true;
case 9: memset8<0xFF>(sio.buf); sectorDone = true; length = 9;
}
}
else
{
if(data == 0x81) // SET_SECTOR End
if(length > 0xFF && data == 0x81) // SET_SECTOR End
{
SIO_STAT_READY();
sectorDone = false;
@ -445,6 +446,8 @@ SIO_WRITE memcardSector(u8 data)
siomode = SIO_MEMCARD_TRANSFER;
};
}
length++;
}
SIO_WRITE memcardInit()