all repos — mgba @ ac4ae6d4e66b8a03751d634a8ef252ad3372e6f6

mGBA Game Boy Advance Emulator

GB: Fix palette I/O writeback when not incrementing
Jeffrey Pfau jeffrey@endrift.com
Sat, 13 Aug 2016 17:46:57 -0700
commit

ac4ae6d4e66b8a03751d634a8ef252ad3372e6f6

parent

d9f486fd6aec27eca693db3fa5f7a69d9a6b8baf

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M src/gb/video.csrc/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; } }