all repos — mgba @ 3ead128a2d1868917c2765c3e71571a54a530327

mGBA Game Boy Advance Emulator

GB: Initialize some GBC registers
Jeffrey Pfau jeffrey@endrift.com
Sun, 21 Feb 2016 02:22:41 -0800
commit

3ead128a2d1868917c2765c3e71571a54a530327

parent

c1f146c565b106238014b63e7de2ae4c3f39d1f8

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

jump to
M src/gb/io.csrc/gb/io.c

@@ -84,6 +84,15 @@ GBIOWrite(gb, REG_OBP0, 0xFF);

GBIOWrite(gb, REG_OBP1, 0xFF); GBIOWrite(gb, REG_WY, 0x00); GBIOWrite(gb, REG_WX, 0x00); + GBIOWrite(gb, REG_VBK, 0); + GBIOWrite(gb, REG_BCPS, 0); + GBIOWrite(gb, REG_OCPS, 0); + GBIOWrite(gb, REG_SVBK, 1); + GBIOWrite(gb, REG_HDMA1, 0xFF); + GBIOWrite(gb, REG_HDMA2, 0xFF); + GBIOWrite(gb, REG_HDMA3, 0xFF); + GBIOWrite(gb, REG_HDMA4, 0xFF); + gb->memory.io[REG_HDMA5] = 0xFF; GBIOWrite(gb, REG_IE, 0x00); }