diff --git a/src/boards/vrc5.cpp b/src/boards/vrc5.cpp index 6bdecc0f..4dc903eb 100644 --- a/src/boards/vrc5.cpp +++ b/src/boards/vrc5.cpp @@ -184,7 +184,7 @@ static DECLFR(QTAiRead) { // uint8 res2 = ((regs[0xD] & 1) << 7) | ((regs[0xC] & 0x1F) << 2) | (regs[0xB] & 3); uint8 tabl = conv_tbl[(regs[0xC] >> 5) & 3][(regs[0xD] & 0x7F) >> 4]; - uint8 res1 = 0x40 | (tabl & 0x3F) | ((regs[0xD] >> 1) & 7); + uint8 res1 = 0x40 | (tabl & 0x3F) | ((regs[0xD] >> 1) & 7) | ((regs[0xB] & 4) << 5); uint8 res2 = ((regs[0xD] & 1) << 7) | ((regs[0xC] & 0x1F) << 2) | (regs[0xB] & 3); if (tabl & 0x40) diff --git a/src/pputile.inc b/src/pputile.inc index c4f5431f..86fea166 100644 --- a/src/pputile.inc +++ b/src/pputile.inc @@ -115,12 +115,20 @@ pshift[1] <<= 8; pshift[1] |= C[0]; } #else + #ifdef PPU_VRC5FETCH + pshift[0] |= C[0]; + if(tmpd & 0x40) + pshift[1] |= (tmpd & 0x80) ? 0xFF : 0x00; + else + pshift[1] |= C[8]; + #else if(ScreenON) RENDER_LOGP(C); pshift[0] |= C[0]; if(ScreenON) RENDER_LOGP(C + 8); pshift[1] |= C[8]; + #endif #endif if ((RefreshAddr & 0x1f) == 0x1f)