mirror of https://github.com/mgba-emu/mgba.git
DS: Fix RTC not outputting on LOW
This commit is contained in:
parent
2b70e1714a
commit
6d4236bd29
|
@ -885,8 +885,12 @@ uint16_t DSWriteRTC(struct DS* ds, DSRegisterRTC value) {
|
|||
break;
|
||||
case 2:
|
||||
if (!DSRegisterRTCIsClock(value)) {
|
||||
if (DSRegisterRTCIsDataDirection(value)) {
|
||||
ds->rtc.bits &= ~(1 << ds->rtc.bitsRead);
|
||||
ds->rtc.bits |= DSRegisterRTCGetData(value) << ds->rtc.bitsRead;
|
||||
} else {
|
||||
value = DSRegisterRTCSetData(value, GBARTCOutput(&ds->rtc));
|
||||
}
|
||||
} else {
|
||||
if (DSRegisterRTCIsSelect(value)) {
|
||||
// GPIO direction should always != reading
|
||||
|
|
Loading…
Reference in New Issue