diff --git a/cinema/gb/mooneye-gb/misc/boot_hwio-C/xbaseline_0000.png b/cinema/gb/mooneye-gb/misc/boot_hwio-C/xbaseline_0000.png index cb37cb619..fb836d344 100644 Binary files a/cinema/gb/mooneye-gb/misc/boot_hwio-C/xbaseline_0000.png and b/cinema/gb/mooneye-gb/misc/boot_hwio-C/xbaseline_0000.png differ diff --git a/src/gb/gb.c b/src/gb/gb.c index 9c13b795b..998505c04 100644 --- a/src/gb/gb.c +++ b/src/gb/gb.c @@ -489,11 +489,6 @@ void GBSkipBIOS(struct GB* gb) { const struct GBCartridge* cart = (const struct GBCartridge*) &gb->memory.rom[0x100]; int nextDiv = 0; - if (gb->model >= GB_MODEL_CGB && !(cart->cgb & 0x80)) { - gb->model = GB_MODEL_DMG; - GBVideoDisableCGB(&gb->video); - } - switch (gb->model) { case GB_MODEL_AUTODETECT: // Silence warnings gb->model = GB_MODEL_DMG; @@ -559,6 +554,12 @@ void GBSkipBIOS(struct GB* gb) { cpu->e = 0x08; cpu->l = 0x7C; gb->timer.internalDiv = 0x260; + gb->model = GB_MODEL_DMG; + gb->memory.io[GB_REG_KEY1] = 0xFF; + gb->memory.io[GB_REG_BCPS] = 0x88; // Faked writing 4 BG palette entries + gb->memory.io[GB_REG_OCPS] = 0x90; // Faked writing 8 OBJ palette entries + gb->memory.io[GB_REG_SVBK] = 0xFF; + GBVideoDisableCGB(&gb->video); } nextDiv = 0xC; break; diff --git a/src/gb/io.c b/src/gb/io.c index e46e50412..612e4d819 100644 --- a/src/gb/io.c +++ b/src/gb/io.c @@ -214,7 +214,11 @@ void GBIOReset(struct GB* gb) { GBIOWrite(gb, GB_REG_HDMA3, 0xFF); GBIOWrite(gb, GB_REG_HDMA4, 0xFF); gb->memory.io[GB_REG_HDMA5] = 0xFF; - } else if (gb->model & GB_MODEL_SGB) { + } else { + memset(&gb->memory.io[GB_REG_KEY0], 0xFF, GB_REG_PCM34 - GB_REG_KEY0); + } + + if (gb->model & GB_MODEL_SGB) { GBIOWrite(gb, GB_REG_JOYP, 0xFF); } GBIOWrite(gb, GB_REG_IE, 0x00);