Added per-device configuration.
Reworked configuration parser a bit. Added configuration for S3 ViRGE and 8-bit Sound Blasters. IRQ 2 routed to IRQ 9 on AT machines.
This commit is contained in:
parent
3c8a675d01
commit
2207f704dd
18 changed files with 1061 additions and 123 deletions
12
src/pic.c
12
src/pic.c
|
|
@ -244,6 +244,8 @@ int pic_current[16];
|
|||
|
||||
void picint(uint16_t num)
|
||||
{
|
||||
if (AT && num == (1 << 2))
|
||||
num = 1 << 9;
|
||||
// pclog("picint : %04X\n", num);
|
||||
// if (num == 0x10) pclog("PICINT 10\n");
|
||||
if (num>0xFF)
|
||||
|
|
@ -264,6 +266,11 @@ void picintlevel(uint16_t num)
|
|||
{
|
||||
int c = 0;
|
||||
while (!(num & (1 << c))) c++;
|
||||
if (AT && c == 2)
|
||||
{
|
||||
c = 9;
|
||||
num = 1 << 9;
|
||||
}
|
||||
// pclog("INTLEVEL %04X %i\n", num, c);
|
||||
if (!pic_current[c])
|
||||
{
|
||||
|
|
@ -283,6 +290,11 @@ void picintc(uint16_t num)
|
|||
{
|
||||
int c = 0;
|
||||
while (!(num & (1 << c))) c++;
|
||||
if (AT && c == 2)
|
||||
{
|
||||
c = 9;
|
||||
num = 1 << 9;
|
||||
}
|
||||
// pclog("INTC %04X %i\n", num, c);
|
||||
pic_current[c]=0;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue