From c03084ea30f12b884ff1cddf2518ea346df03cf3 Mon Sep 17 00:00:00 2001 From: InvisibleUp Date: Thu, 30 Apr 2020 21:22:28 -0400 Subject: [PATCH] HACK: Fix non-functional RTC by reverting code --- src/PROGMAIN.c | 40 ++++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/src/PROGMAIN.c b/src/PROGMAIN.c index 56a2928..dc3f302 100644 --- a/src/PROGMAIN.c +++ b/src/PROGMAIN.c @@ -155,6 +155,16 @@ const DevMethods_t DEVICES[] = { .timebegin = EmVIA2 ? VIA2_ExtraTimeBegin : NULL, .timeend = EmVIA2 ? VIA2_ExtraTimeEnd : NULL, }, + // Screen + { + .init = NULL, + .reset = NULL, + .starttick = Sixtieth_PulseNtfy, // VBlank interrupt + .endtick = Screen_EndTickNotify, + .subtick = NULL, + .timebegin = NULL, + .timeend = NULL, + }, // Sony disk drive { .init = NULL, @@ -234,16 +244,6 @@ const DevMethods_t DEVICES[] = { .timebegin = NULL, .timeend = NULL, }, - // Screen - { - .init = NULL, - .reset = NULL, - .starttick = Sixtieth_PulseNtfy, // VBlank interrupt - .endtick = Screen_EndTickNotify, - .subtick = NULL, - .timebegin = NULL, - .timeend = NULL, - }, // ASC { .init = NULL, @@ -335,12 +335,28 @@ LOCALPROC SubTickTaskEnd(void) LOCALPROC SixtiethSecondNotify(void) { - int i; + /*int i; // Begin new frame InterruptReset_Update(); for ( i = 0; i < ARRAY_SIZE(DEVICES); i++ ) { if (DEVICES[i].starttick != NULL) { DEVICES[i].starttick(); } - } + }*/ + + // Temporary fix to non-functional RTC + + Mouse_Update(); + InterruptReset_Update(); + if (EmClassicKbrd) { KeyBoard_Update(); } + if (EmADB) { ADB_Update(); } + + Sixtieth_PulseNtfy(); /* Vertical Blanking Interrupt */ + Sony_Update(); + +#if EmLocalTalk + LocalTalkTick(); +#endif + if (EmRTC) { RTC_Interrupt(); } + if (EmVidCard) { Vid_Update(); } SubTickTaskStart(); }