Commit 1493af65 authored by Libretro-Admin's avatar Libretro-Admin
Browse files
parent 1b683c7a
Pipeline #19871 passed with stages
in 2 minutes and 30 seconds
......@@ -18,6 +18,7 @@ u32 VREG;
u32 ARMRST;
u32 rtc_EN;
int dma_sched_id;
u32 RealTimeClock;
int rtc_schid = -1;
u32 GetRTC_now(void)
......@@ -40,9 +41,9 @@ u32 ReadMem_aica_rtc(u32 addr,u32 sz)
switch( addr & 0xFF )
{
case 0:
return settings.dreamcast.RTC>>16;
return RealTimeClock>>16;
case 4:
return settings.dreamcast.RTC &0xFFFF;
return RealTimeClock &0xFFFF;
case 8:
return 0;
}
......@@ -58,16 +59,16 @@ void WriteMem_aica_rtc(u32 addr,u32 data,u32 sz)
case 0:
if (rtc_EN)
{
settings.dreamcast.RTC&=0xFFFF;
settings.dreamcast.RTC|=(data&0xFFFF)<<16;
RealTimeClock&=0xFFFF;
RealTimeClock|=(data&0xFFFF)<<16;
rtc_EN=0;
}
return;
case 4:
if (rtc_EN)
{
settings.dreamcast.RTC&=0xFFFF0000;
settings.dreamcast.RTC|= data&0xFFFF;
RealTimeClock&=0xFFFF0000;
RealTimeClock|= data&0xFFFF;
//TODO: Clean the internal timer ?
}
return;
......@@ -153,7 +154,7 @@ void WriteMem_aica_reg(u32 addr,u32 data,u32 sz)
static int DreamcastSecond(int tag, int c, int j)
{
settings.dreamcast.RTC++;
RealTimeClock++;
#if FEAT_SHREC != DYNAREC_NONE
bm_Periodical_1s();
......@@ -165,7 +166,7 @@ static int DreamcastSecond(int tag, int c, int j)
//Init/res/term
void aica_Init()
{
settings.dreamcast.RTC = GetRTC_now();
RealTimeClock = GetRTC_now();
if (rtc_schid == -1)
{
rtc_schid = sh4_sched_register(0, &DreamcastSecond);
......
......@@ -1246,7 +1246,6 @@ void retro_reset (void)
#endif
settings.dreamcast.cable = 3;
settings.dreamcast.RTC = GetRTC_now();
update_variables(false);
dc_reset(true);
......
......@@ -523,7 +523,6 @@ void LoadSettings(void)
//disable_nvmem can't be loaded, because nvmem init is before cfg load
settings.dynarec.disable_vmem32 = false;
settings.UpdateModeForced = 0;
settings.dreamcast.RTC = GetRTC_now();
settings.dreamcast.FullMMU = false;
settings.aica.LimitFPS = 0;
settings.aica.NoSound = 0;
......
......@@ -569,7 +569,6 @@ struct settings_t
struct
{
u32 cable; // 0 -> VGA, 1 -> VGA, 2 -> RGB, 3 -> TV
u32 RTC;
u32 region; // 0 -> JP, 1 -> USA, 2 -> EU, 3 -> default
u32 broadcast; // 0 -> NTSC, 1 -> PAL, 2 -> PAL/M, 3 -> PAL/N, 4 -> default
u32 language; // 0 -> JP, 1 -> EN, 2 -> DE, 3 -> FR, 4 -> SP, 5 -> IT, 6 -> default
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment