GB: Fix some initializations

This commit is contained in:
Jeffrey Pfau 2016-01-20 20:10:00 -08:00
parent cbad932f45
commit 781f3f76f1
2 changed files with 2 additions and 0 deletions

View File

@ -62,6 +62,7 @@ void GBMemoryReset(struct GB* gb) {
gb->memory.wram = anonymousMemoryMap(GB_SIZE_WORKING_RAM);
gb->memory.wramBank = &gb->memory.wram[GB_SIZE_WORKING_RAM_BANK0];
gb->memory.romBank = &gb->memory.rom[GB_SIZE_CART_BANK0];
gb->memory.currentBank = 1;
const struct GBCartridge* cart = &gb->memory.rom[0x100];
switch (cart->type) {

View File

@ -66,6 +66,7 @@ void LR35902Reset(struct LR35902Core* cpu) {
cpu->executionState = LR35902_CORE_FETCH;
cpu->halted = 0;
cpu->irqPending = false;
cpu->irqh.reset(cpu);
}