mirror of https://github.com/PCSX2/pcsx2.git
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:
parent
462c40cf4b
commit
6cd7c74d51
|
@ -421,6 +421,7 @@ SIO_WRITE memcardSector(u8 data)
|
||||||
{
|
{
|
||||||
static u8 xor_check = 0;
|
static u8 xor_check = 0;
|
||||||
static bool sectorDone = false;
|
static bool sectorDone = false;
|
||||||
|
static u16 length = 0;
|
||||||
|
|
||||||
if(!sectorDone)
|
if(!sectorDone)
|
||||||
{
|
{
|
||||||
|
@ -432,12 +433,12 @@ SIO_WRITE memcardSector(u8 data)
|
||||||
case 5: mcd->sectorAddr |= data << 24; xor_check ^= data; break;
|
case 5: mcd->sectorAddr |= data << 24; xor_check ^= data; break;
|
||||||
case 6: mcd->goodSector = data == xor_check; break;
|
case 6: mcd->goodSector = data == xor_check; break;
|
||||||
case 8: mcd->transferAddr = (512+16) * mcd->sectorAddr; 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
|
else
|
||||||
{
|
{
|
||||||
if(data == 0x81) // SET_SECTOR End
|
if(length > 0xFF && data == 0x81) // SET_SECTOR End
|
||||||
{
|
{
|
||||||
SIO_STAT_READY();
|
SIO_STAT_READY();
|
||||||
sectorDone = false;
|
sectorDone = false;
|
||||||
|
@ -445,6 +446,8 @@ SIO_WRITE memcardSector(u8 data)
|
||||||
siomode = SIO_MEMCARD_TRANSFER;
|
siomode = SIO_MEMCARD_TRANSFER;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
length++;
|
||||||
}
|
}
|
||||||
|
|
||||||
SIO_WRITE memcardInit()
|
SIO_WRITE memcardInit()
|
||||||
|
|
Loading…
Reference in New Issue