Ported the PIT fix and LPT1 fix for the Compaq Portable from PCem

This commit is contained in:
TC1995
2018-02-24 16:25:57 +01:00
parent 36232ce6a1
commit 26ec9293b7
2 changed files with 4 additions and 1 deletions

View File

@@ -32,6 +32,7 @@
#include "../floppy/fdc.h"
#include "../game/gameport.h"
#include "../keyboard.h"
#include "../lpt.h"
#include "machine.h"
@@ -50,6 +51,8 @@ machine_xt_compaq_init(machine_t *model)
switch(model->id) {
case ROM_PORTABLE:
lpt1_remove();
lpt1_init(0x03bc);
break;
}
}

View File

@@ -314,7 +314,7 @@ int64_t pit_get_timer_0()
static int64_t pit_read_timer(PIT *pit, int64_t t)
{
timer_clock();
if (pit->using_timer[t])
if (pit->using_timer[t] && !(pit->m[t] == 3 && !pit->gate[t]))
{
int64_t read = (int64_t)((pit->c[t] + ((1 << TIMER_SHIFT) - 1)) / PITCONST) >> TIMER_SHIFT;
if (pit->m[t] == 2)