Skip to content
This repository has been archived by the owner on Oct 11, 2020. It is now read-only.

Commit

Permalink
Fix Codename Tenka properly.
Browse files Browse the repository at this point in the history
Codename Tenka actually doesn't want a memory card to be inserted in slot 2.
Knowing this, the fix became easier.
  • Loading branch information
gameblabla committed Oct 7, 2019
1 parent 0f9fefa commit bf1accd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/sio.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,15 +251,13 @@ void sioWrite8(unsigned char value) {
return;
case 0x81: // start memcard
if (psxSio.CtrlReg & 0x2000) {
if (!sioMcdInserted(MCD2))
if (!sioMcdInserted(MCD2) || Config.MemoryCardHack == 1)
goto no_device;
memcpy(psxSio.buf, psxSio.cardh2, 4);
if (!Config.Mcd2[0] && Config.MemoryCardHack == 1) psxSio.buf[3]=0; // is card 2 plugged?
} else {
if (!sioMcdInserted(MCD1))
goto no_device;
memcpy(psxSio.buf, psxSio.cardh1, 4);
if (!Config.Mcd1[0] && Config.MemoryCardHack == 1) psxSio.buf[2]=0; // is card 1 plugged? (Codename Tenka)
}
psxSio.StatReg |= RX_RDY;
psxSio.parp = 0;
Expand Down

0 comments on commit bf1accd

Please sign in to comment.