diff --git a/src/cpu/cpu.c b/src/cpu/cpu.c index 0ff54f61c..863e5ac00 100644 --- a/src/cpu/cpu.c +++ b/src/cpu/cpu.c @@ -210,6 +210,7 @@ int cpu_iscyrix; int hascache; int isibm486; int israpidcad; +int is_pc98x1; int is_vpc; int is_am486; int is_am486dxl; diff --git a/src/cpu/cpu.h b/src/cpu/cpu.h index 611c9df0d..f5f05b805 100644 --- a/src/cpu/cpu.h +++ b/src/cpu/cpu.h @@ -662,6 +662,7 @@ extern uint32_t old_rammask; extern int acycs; #endif extern int pic_pending; +extern int is_pc98x1; extern int is_vpc; extern int soft_reset_mask; extern int alt_access; diff --git a/src/machine/machine.c b/src/machine/machine.c index 9af93eec1..60a69ba2e 100644 --- a/src/machine/machine.c +++ b/src/machine/machine.c @@ -81,6 +81,7 @@ machine_init_ex(int m) machine_snd = NULL; + is_pc98x1 = 0; is_vpc = 0; standalone_gameport_type = NULL; diff --git a/src/pit.c b/src/pit.c index 2d9b2d95f..156753980 100644 --- a/src/pit.c +++ b/src/pit.c @@ -956,6 +956,7 @@ static void * pit_pc98_init(const device_t *info) { pit_t *dev = (pit_t *) malloc(sizeof(pit_t)); + pit_reset(dev); timer_add(&dev->callback_timer, pit_timer_over, (void *) dev, 0); @@ -1167,7 +1168,7 @@ pit_set_clock(uint32_t clock) else cpuclock = (double) clock; - if (machine_pc98.init) + if (is_pc98x1) PITCONSTD = (cpuclock / 2457600.0); else PITCONSTD = (cpuclock / 1193182.0); @@ -1225,7 +1226,7 @@ pit_set_clock(uint32_t clock) PITCONST = (24ULL << 32LL); CGACONST = (16ULL << 32LL); } else if (cpuclock != 14318184.0) { - if (machine_pc98.init) + if (is_pc98x1) PITCONSTD = (cpuclock / 2457600.0); else PITCONSTD = (cpuclock / 1193182.0);