GBA Hardware: Fix reseting the Game Boy Player features

This commit is contained in:
Jeffrey Pfau 2015-08-16 17:19:21 -07:00
parent 401bc9e9d6
commit 05a956cacd
1 changed files with 5 additions and 1 deletions

View File

@ -59,10 +59,14 @@ void GBAHardwareInit(struct GBACartridgeHardware* hw, uint16_t* base) {
} }
void GBAHardwareClear(struct GBACartridgeHardware* hw) { void GBAHardwareClear(struct GBACartridgeHardware* hw) {
hw->devices = HW_NONE; hw->devices = HW_NONE | (hw->devices & HW_GB_PLAYER_DETECTION);
hw->direction = GPIO_WRITE_ONLY; hw->direction = GPIO_WRITE_ONLY;
hw->pinState = 0; hw->pinState = 0;
hw->direction = 0; hw->direction = 0;
if (hw->p->sio.drivers.normal == &hw->gbpDriver.d) {
GBASIOSetDriver(&hw->p->sio, 0, SIO_NORMAL_32);
}
} }
void GBAHardwareGPIOWrite(struct GBACartridgeHardware* hw, uint32_t address, uint16_t value) { void GBAHardwareGPIOWrite(struct GBACartridgeHardware* hw, uint32_t address, uint16_t value) {