GB: SGB bug compat

This commit is contained in:
Vicki Pfau 2019-09-06 21:24:51 -07:00
parent 77a89e52c9
commit 7c8d253123
1 changed files with 3 additions and 0 deletions

View File

@ -701,6 +701,9 @@ void GBVideoWriteSGBPacket(struct GBVideo* video, uint8_t* data) {
case SGB_ATTR_SET:
break;
case SGB_MLT_REQ:
if ((video->sgbPacketBuffer[1] & 0x3) == 2) { // XXX: This unmasked increment appears to be an SGB hardware bug
++video->p->sgbCurrentController;
}
video->p->sgbControllers = video->sgbPacketBuffer[1] & 0x3;
video->p->sgbCurrentController &= video->p->sgbControllers;
return;