mirror of https://github.com/mgba-emu/mgba.git
GBA Hardware: Count bytes for ALARM1 properly
This commit is contained in:
parent
9567a8632f
commit
4b7390cc35
|
@ -71,6 +71,8 @@ DECL_BITS(RTCCommandData, Command, 4, 3);
|
|||
DECL_BIT(RTCCommandData, Reading, 7);
|
||||
|
||||
DECL_BITFIELD(RTCStatus2, uint8_t);
|
||||
DECL_BITS(RTCStatus2, INT1, 0, 4);
|
||||
DECL_BIT(RTCStatus2, INT2, 6);
|
||||
|
||||
#pragma pack(push, 1)
|
||||
struct GBARTC {
|
||||
|
|
|
@ -224,6 +224,10 @@ void GBARTCProcessByte(struct GBARTC* rtc, struct mRTCSource* source) {
|
|||
break;
|
||||
case RTC_FORCE_IRQ:
|
||||
break;
|
||||
case RTC_ALARM1:
|
||||
if (RTCStatus2GetINT1(rtc->status2) == 4) {
|
||||
rtc->bytesRemaining = 3;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
mLOG(GBA_HW, WARN, "Invalid RTC command byte: %02X", rtc->bits);
|
||||
|
|
Loading…
Reference in New Issue