Timers are now 64-bit.

This commit is contained in:
OBattler
2017-10-09 01:48:36 +02:00
parent 08bf9109d7
commit 02bbfb26eb
67 changed files with 508 additions and 499 deletions

View File

@@ -103,13 +103,13 @@ typedef struct genius_t
int enabled; /* Display enabled, 0 or 1 */
int detach; /* Detach cursor, 0 or 1 */
int dispontime, dispofftime;
int vidtime;
int64_t dispontime, dispofftime;
int64_t vidtime;
int linepos, displine;
int vc;
int dispon, blink;
int vsynctime;
int64_t vsynctime;
uint8_t *vram;
} genius_t;
@@ -249,8 +249,8 @@ void genius_recalctimings(genius_t *genius)
_dispofftime = disptime - _dispontime;
_dispontime *= MDACONST;
_dispofftime *= MDACONST;
genius->dispontime = (int)(_dispontime * (1 << TIMER_SHIFT));
genius->dispofftime = (int)(_dispofftime * (1 << TIMER_SHIFT));
genius->dispontime = (int64_t)(_dispontime * (1LL << TIMER_SHIFT));
genius->dispofftime = (int64_t)(_dispofftime * (1LL << TIMER_SHIFT));
}