Fixed RTC emulation a little
git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@164 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
parent
31d2d4d629
commit
0f1d4db7cd
12
src/RTC.cpp
12
src/RTC.cpp
|
@ -59,12 +59,16 @@ bool rtcIsEnabled()
|
||||||
u16 rtcRead(u32 address)
|
u16 rtcRead(u32 address)
|
||||||
{
|
{
|
||||||
if(rtcEnabled) {
|
if(rtcEnabled) {
|
||||||
if(address == 0x80000c8)
|
switch(address){
|
||||||
|
case 0x80000c8:
|
||||||
return rtcClockData.byte2;
|
return rtcClockData.byte2;
|
||||||
else if(address == 0x80000c6)
|
break;
|
||||||
|
case 0x80000c6:
|
||||||
return rtcClockData.byte1;
|
return rtcClockData.byte1;
|
||||||
else if(address == 0x80000c4) {
|
break;
|
||||||
|
case 0x80000c4:
|
||||||
return rtcClockData.byte0;
|
return rtcClockData.byte0;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -188,7 +192,7 @@ bool rtcWrite(u32 address, u16 value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
|
|
Loading…
Reference in New Issue