GBA Video: Null renderer should return proper register values
Jeffrey Pfau jeffrey@endrift.com
Fri, 29 Apr 2016 00:32:12 -0700
1 files changed,
32 insertions(+),
1 deletions(-)
jump to
M
src/gba/video.c
→
src/gba/video.c
@@ -226,7 +226,38 @@ }
static uint16_t GBAVideoDummyRendererWriteVideoRegister(struct GBAVideoRenderer* renderer, uint32_t address, uint16_t value) { UNUSED(renderer); - UNUSED(address); + switch (address) { + case REG_BG0CNT: + case REG_BG1CNT: + value &= 0xDFFF; + break; + case REG_BG2CNT: + case REG_BG3CNT: + value &= 0xFFFF; + break; + case REG_BG0HOFS: + case REG_BG0VOFS: + case REG_BG1HOFS: + case REG_BG1VOFS: + case REG_BG2HOFS: + case REG_BG2VOFS: + case REG_BG3HOFS: + case REG_BG3VOFS: + value &= 0x01FF; + break; + case REG_BLDCNT: + value &= 0x3FFF; + break; + case REG_BLDALPHA: + value &= 0x1F1F; + break; + case REG_WININ: + case REG_WINOUT: + value &= 0x3F3F; + break; + default: + break; + } return value; }