USIO: Fixed "Card Reader Not Connected" Error

This commit is contained in:
brian218 2022-12-05 15:24:53 +08:00 committed by Megamouse
parent 0a3e540a10
commit 9274b3f14d
1 changed files with 10 additions and 3 deletions

View File

@ -394,15 +394,22 @@ void usb_device_usio::usio_read(u8 channel, u16 reg, u16 size)
{
// Get Buffer, rarely gives a reply on real HW
// First U16 seems to be a timestamp of sort
// Purpose seems related to BananaPass
// Purpose seems related to connectivity check
q_replies.push({0x7E, 0xE4, 0x00, 0x00, 0x74, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00});
break;
}
case 0x0080:
{
// Purpose unknown
// Card reader check - 1
ensure(size == 0x10);
q_replies.push({0x02, 0x03, 0x00, 0x00, 0xFF, 0x0F, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x10, 0x00});
q_replies.push({0x02, 0x03, 0x06, 0x00, 0xFF, 0x0F, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x10, 0x00});
break;
}
case 0x7000:
{
// Card reader check - 2
ensure(size == 0x06);
// No data returned
break;
}
case 0x1080: