Implement Headland fast reset. Fixes AMI 386SX clone.
This commit is contained in:
parent
f2e1e307c6
commit
4c42cc1596
1 changed files with 8 additions and 0 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
#include "io.h"
|
#include "io.h"
|
||||||
#include "mem.h"
|
#include "mem.h"
|
||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
|
#include "x86.h"
|
||||||
|
|
||||||
#include "headland.h"
|
#include "headland.h"
|
||||||
|
|
||||||
|
|
@ -12,6 +13,8 @@ void headland_write(uint16_t addr, uint8_t val, void *priv)
|
||||||
{
|
{
|
||||||
if (addr & 1)
|
if (addr & 1)
|
||||||
{
|
{
|
||||||
|
uint8_t old_val = headland_regs[headland_index];
|
||||||
|
|
||||||
if (headland_index == 0xc1 && !is486) val = 0;
|
if (headland_index == 0xc1 && !is486) val = 0;
|
||||||
headland_regs[headland_index] = val;
|
headland_regs[headland_index] = val;
|
||||||
pclog("Headland write %02X %02X\n",headland_index,val);
|
pclog("Headland write %02X %02X\n",headland_index,val);
|
||||||
|
|
@ -24,6 +27,11 @@ void headland_write(uint16_t addr, uint8_t val, void *priv)
|
||||||
else
|
else
|
||||||
mem_set_mem_state(0xf0000, 0x10000, MEM_READ_EXTERNAL | MEM_WRITE_INTERNAL);
|
mem_set_mem_state(0xf0000, 0x10000, MEM_READ_EXTERNAL | MEM_WRITE_INTERNAL);
|
||||||
}
|
}
|
||||||
|
else if (headland_index == 0x87)
|
||||||
|
{
|
||||||
|
if ((val & 1) && !(old_val & 1))
|
||||||
|
softresetx86();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
headland_index = val;
|
headland_index = val;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue