Timer counters now 64-bit;

Cleaned up floppy code a lot and reverted to single poller;
Fixed segment present bit and limit checking at read/write within segment;
The ASUS boards now have memregs too;
RTC code improved based on suggestion by Sarah Walker;
Fixed SVGA odd/even emulation and added chain odd/even support;
Removed non-existent CPU's.
This commit is contained in:
OBattler
2016-07-19 02:44:32 +02:00
parent c667780aa6
commit b78b2fecaa
64 changed files with 937 additions and 1063 deletions

View File

@@ -18,14 +18,14 @@ static struct
void (*callback)(void *priv);
void *priv;
int *enable;
int *count;
int64_t *count;
} timers[TIMERS_MAX];
int timers_present = 0;
int timer_one = 1;
int timer_count = 0, timer_latch = 0;
int timer_start = 0;
int64_t timer_count = 0, timer_latch = 0;
int64_t timer_start = 0;
void timer_process()
{
@@ -33,7 +33,7 @@ void timer_process()
int retry;
int process = 0;
/*Get actual elapsed time*/
int diff = timer_latch - timer_count;
int64_t diff = timer_latch - timer_count;
int enable[TIMERS_MAX];
timer_latch = 0;
@@ -79,7 +79,7 @@ void timer_process()
void timer_update_outstanding()
{
int c;
timer_latch = 0x7fffffff;
timer_latch = 0x7fffffffffffffff;
for (c = 0; c < timers_present; c++)
{
if (*timers[c].enable && *timers[c].count < timer_latch)
@@ -96,7 +96,7 @@ void timer_reset()
// timer_process();
}
int timer_add(void (*callback)(void *priv), int *count, int *enable, void *priv)
int timer_add(void (*callback)(void *priv), int64_t *count, int *enable, void *priv)
{
if (timers_present < TIMERS_MAX)
{