Initing OBP0/1 correctly

This commit is contained in:
Lior Halphon 2016-08-06 18:57:13 +03:00
parent 5816b6a688
commit af10e07ed7

View File

@ -112,6 +112,8 @@ void GB_init(GB_gameboy_t *gb)
gb->async_input_callback = default_async_input_callback; gb->async_input_callback = default_async_input_callback;
gb->cartridge_type = &GB_cart_defs[0]; // Default cartridge type gb->cartridge_type = &GB_cart_defs[0]; // Default cartridge type
gb->io_registers[GB_IO_OBP0] = gb->io_registers[GB_IO_OBP1] = 0xFF;
gb->io_registers[GB_IO_JOYP] = 0xF; gb->io_registers[GB_IO_JOYP] = 0xF;
} }
@ -137,6 +139,8 @@ void GB_init_cgb(GB_gameboy_t *gb)
gb->async_input_callback = default_async_input_callback; gb->async_input_callback = default_async_input_callback;
gb->cartridge_type = &GB_cart_defs[0]; // Default cartridge type gb->cartridge_type = &GB_cart_defs[0]; // Default cartridge type
gb->io_registers[GB_IO_OBP0] = gb->io_registers[GB_IO_OBP1] = 0xFF;
gb->io_registers[GB_IO_JOYP] = 0xF; gb->io_registers[GB_IO_JOYP] = 0xF;
} }