PIT timers can now be restarted using GATE input - CPU speed detection on SiS496/497 now works.

Added missing port 0x61 to Olivetti M24 - PC speaker now works on that machine.
Some code tidying.
This commit is contained in:
TomW 2013-11-08 22:32:34 +00:00
commit 36cdd540b2
9 changed files with 57 additions and 26 deletions

View file

@ -3,6 +3,7 @@
#include "mem.h"
#include "mouse.h"
#include "pic.h"
#include "sound.h"
#include "timer.h"
#include "keyboard.h"
@ -137,7 +138,16 @@ void keyboard_olim24_write(uint16_t port, uint8_t val, void *priv)
}
}
break;
break;
case 0x61:
ppi.pb = val;
gated = ((val & 3) == 3);
if (gated)
wasgated = 1;
pit_set_gate(2, val & 1);
break;
}
}
@ -164,6 +174,9 @@ uint8_t keyboard_olim24_read(uint16_t port, void *priv)
}
break;
case 0x61:
return ppi.pb;
case 0x64:
temp = keyboard_olim24.status;
keyboard_olim24.status &= ~(STAT_RTIMEOUT | STAT_TTIMEOUT);
@ -279,7 +292,7 @@ void mouse_olim24_poll(int x, int y, int b)
void keyboard_olim24_init()
{
//return;
io_sethandler(0x0060, 0x0001, keyboard_olim24_read, NULL, NULL, keyboard_olim24_write, NULL, NULL, NULL);
io_sethandler(0x0060, 0x0002, keyboard_olim24_read, NULL, NULL, keyboard_olim24_write, NULL, NULL, NULL);
io_sethandler(0x0064, 0x0001, keyboard_olim24_read, NULL, NULL, keyboard_olim24_write, NULL, NULL, NULL);
keyboard_olim24_reset();
keyboard_send = keyboard_olim24_adddata;