Permalink
Browse files

GBA Hardware: More RTC fixes

  • Loading branch information...
endrift committed Feb 4, 2018
1 parent 2c870ca commit 1a6b47a29fd13716f71385abc87d00a052b46ea1
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/gba/hardware.c
View
@@ -172,6 +172,8 @@ void _rtcReadPins(struct GBACartridgeHardware* hw) {
case 1:
if ((hw->pinState & 5) == 5) {
hw->rtc.transferStep = 2;
+ } else {
+ hw->rtc.transferStep = 0;
}
_outputPins(hw, 5);
break;
@@ -203,7 +205,7 @@ void _rtcReadPins(struct GBACartridgeHardware* hw) {
hw->rtc.bytesRemaining = 0;
hw->rtc.commandActive = 0;
hw->rtc.command = 0;
- hw->rtc.transferStep = 0;
+ hw->rtc.transferStep = hw->pinState & 1;
_outputPins(hw, 1);
}
}

0 comments on commit 1a6b47a

Please sign in to comment.