all repos — mgba @ 5b1e65052c04b48ba2f5ef44847aa140ef27c2aa

mGBA Game Boy Advance Emulator

GB: Clean up startup messages
Vicki Pfau vi@endrift.com
Fri, 04 Aug 2017 08:21:18 -0700
commit

5b1e65052c04b48ba2f5ef44847aa140ef27c2aa

parent

41e00148bfa2e75ee72505030f4fd91fe5c13cfb

2 files changed, 11 insertions(+), 10 deletions(-)

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

@@ -163,7 +163,6 @@ void GBResizeSram(struct GB* gb, size_t size) {

if (gb->memory.sram && size <= gb->sramSize) { return; } - mLOG(GB, INFO, "Resizing SRAM to %"PRIz"u bytes", size); struct VFile* vf = gb->sramVf; if (vf) { if (vf == gb->sramRealVf) {
M src/gb/io.csrc/gb/io.c

@@ -171,15 +171,17 @@ 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; + if (gb->model >= GB_MODEL_CGB) { + 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); }