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

@@ -29,8 +29,8 @@ typedef struct mda_t
uint8_t ctrl, stat;
int dispontime, dispofftime;
int vidtime;
int64_t dispontime, dispofftime;
int64_t vidtime;
int firstline, lastline;
@@ -39,7 +39,8 @@ typedef struct mda_t
uint16_t ma, maback;
int con, coff, cursoron;
int dispon, blink;
int vsynctime, vadj;
int64_t vsynctime;
int vadj;
uint8_t *vram;
} mda_t;
@@ -111,8 +112,8 @@ void mda_recalctimings(mda_t *mda)
_dispofftime = disptime - _dispontime;
_dispontime *= MDACONST;
_dispofftime *= MDACONST;
mda->dispontime = (int)(_dispontime * (1 << TIMER_SHIFT));
mda->dispofftime = (int)(_dispofftime * (1 << TIMER_SHIFT));
mda->dispontime = (int64_t)(_dispontime * (1 << TIMER_SHIFT));
mda->dispofftime = (int64_t)(_dispofftime * (1 << TIMER_SHIFT));
}
void mda_poll(void *p)