Fixed the emulator.

This commit is contained in:
OBattler
2021-12-19 23:41:23 +01:00
parent bc90f99350
commit 4d2ed33ff2
6 changed files with 19 additions and 13 deletions

View File

@@ -1039,6 +1039,12 @@ pc_reset_hard_init(void)
if (postcard_enabled)
device_add(&postcard_device);
/* Reset the CPU module. */
resetx86();
dma_reset();
pci_pic_reset();
cpu_cache_int_enabled = cpu_cache_ext_enabled = 0;
atfullspeed = 0;
pc_full_speed();

View File

@@ -1043,7 +1043,7 @@ dma_reset(void)
dma_mask = 0x00ffffff;
dma_at = 0;
dma_at = is286;
}

View File

@@ -125,6 +125,8 @@ extern void trc_write(uint16_t port, uint8_t val, void *priv);
extern void pci_bridge_set_ctl(void *priv, uint8_t ctl);
extern void pci_pic_reset(void);
#ifdef EMU_DEVICE_H
extern const device_t dec21150_device;

View File

@@ -114,15 +114,6 @@ machine_init_ex(int m)
by the machine's init function). */
video_reset(gfxcard);
/* Reset the CPU module. */
resetx86();
dma_reset();
pic_reset();
cpu_cache_int_enabled = cpu_cache_ext_enabled = 0;
dma_set_at(IS_AT(machine));
pic_set_pci_flag(IS_ARCH(machine, MACHINE_BUS_PCI));
return ret;
}

View File

@@ -422,7 +422,7 @@ bios_add(void)
if (/*AT && */cpu_s) {
temp_cpu_type = cpu_s->cpu_type;
temp_cpu_16bitbus = (temp_cpu_type == CPU_286 || temp_cpu_type == CPU_386SX || temp_cpu_type == CPU_486SLC || temp_cpu_type == CPU_IBM386SLC || temp_cpu_type == CPU_IBM486SLC );
temp_is286 = (temp_cpu_type == CPU_286);
temp_is286 = (temp_cpu_type >= CPU_286);
}
if (biosmask > 0x1ffff) {

View File

@@ -754,6 +754,14 @@ pci_reset_regs(void)
}
void
pci_pic_reset(void)
{
pic_reset();
pic_set_pci_flag(last_pci_card > 0);
}
static void
pci_reset_hard(void)
{
@@ -769,8 +777,7 @@ pci_reset_hard(void)
}
}
pic_reset();
pic_set_pci_flag(1);
pci_pic_reset();
}