GB: Fix palette I/O writeback when not incrementing
Jeffrey Pfau jeffrey@endrift.com
Sat, 13 Aug 2016 17:46:57 -0700
1 files changed,
2 insertions(+),
2 deletions(-)
jump to
M
src/gb/video.c
→
src/gb/video.c
@@ -356,8 +356,8 @@ ++video->bcpIndex;
video->bcpIndex &= 0x3F; video->p->memory.io[REG_BCPS] &= 0x80; video->p->memory.io[REG_BCPS] |= video->bcpIndex; - video->p->memory.io[REG_BCPD] = video->palette[video->bcpIndex >> 1] >> (8 * (video->bcpIndex & 1)); } + video->p->memory.io[REG_BCPD] = video->palette[video->bcpIndex >> 1] >> (8 * (video->bcpIndex & 1)); break; case REG_OCPD: if (video->ocpIndex & 1) {@@ -373,8 +373,8 @@ ++video->ocpIndex;
video->ocpIndex &= 0x3F; video->p->memory.io[REG_OCPS] &= 0x80; video->p->memory.io[REG_OCPS] |= video->ocpIndex; - video->p->memory.io[REG_OCPD] = video->palette[8 * 4 + (video->ocpIndex >> 1)] >> (8 * (video->ocpIndex & 1)); } + video->p->memory.io[REG_OCPD] = video->palette[8 * 4 + (video->ocpIndex >> 1)] >> (8 * (video->ocpIndex & 1)); break; } }