all repos — mgba @ 225729b79c6f6c1529c78e63a2863c2b2e5d0e49

mGBA Game Boy Advance Emulator

Implement BGxHOFS/BGxVOFS
Jeffrey Pfau jeffrey@endrift.com
Sun, 21 Apr 2013 14:43:28 -0700
commit

225729b79c6f6c1529c78e63a2863c2b2e5d0e49

parent

3ec0afa8fc5785f45f0c7a24a24ac5a684ab769f

1 files changed, 32 insertions(+), 0 deletions(-)

jump to
M src/gba/renderers/video-software.csrc/gba/renderers/video-software.c

@@ -88,6 +88,38 @@ case REG_BG3CNT:

value &= 0xFFCF; GBAVideoSoftwareRendererWriteBGCNT(&softwareRenderer->bg[3], value); break; + case REG_BG0HOFS: + value &= 0x01FF; + softwareRenderer->bg[0].x = value; + break; + case REG_BG0VOFS: + value &= 0x01FF; + softwareRenderer->bg[0].y = value; + break; + case REG_BG1HOFS: + value &= 0x01FF; + softwareRenderer->bg[1].x = value; + break; + case REG_BG1VOFS: + value &= 0x01FF; + softwareRenderer->bg[1].y = value; + break; + case REG_BG2HOFS: + value &= 0x01FF; + softwareRenderer->bg[2].x = value; + break; + case REG_BG2VOFS: + value &= 0x01FF; + softwareRenderer->bg[2].y = value; + break; + case REG_BG3HOFS: + value &= 0x01FF; + softwareRenderer->bg[3].x = value; + break; + case REG_BG3VOFS: + value &= 0x01FF; + softwareRenderer->bg[3].y = value; + break; default: GBALog(GBA_LOG_STUB, "Stub video register write: %03x", address); }