Compaq Genoa device now also adds Compaq 386 device, for some reason, that's necessary for shadow RAM to work.

This commit is contained in:
OBattler
2024-07-22 16:42:40 +02:00
parent 62c3fdb2ce
commit 46db537b74

View File

@@ -37,6 +37,7 @@
#include <86box/vid_cga.h>
#include <86box/vid_cga_comp.h>
#include <86box/plat_unused.h>
#include <86box/chipset.h>
#define RAM_DIAG_L_BASE_MEM_640KB 0x00
#define RAM_DIAG_L_BASE_MEM_INV 0x10
@@ -749,18 +750,22 @@ compaq_386_init(UNUSED(const device_t *info))
static void
compaq_genoa_outw(uint16_t port, uint16_t val, void *priv)
{
if (port == 0x0c02) {
if (port == 0x0c02) {
if (val)
mem_set_mem_state(0x000e0000, 0x00020000, MEM_READ_EXTANY | MEM_WRITE_EXTANY);
mem_set_mem_state(0x000e0000, 0x00020000, MEM_READ_EXTANY | MEM_WRITE_INTERNAL);
else
mem_set_mem_state(0x000e0000, 0x00020000, MEM_READ_INTERNAL | MEM_WRITE_INTERNAL);
flushmmucache_nopc();
}
}
static void *
compaq_genoa_init(UNUSED(const device_t *info))
{
io_sethandler(0x0c02, 3, NULL, NULL, NULL, NULL, compaq_genoa_outw, NULL, ram);
io_sethandler(0x0c02, 2, NULL, NULL, NULL, NULL, compaq_genoa_outw, NULL, NULL);
device_add(&compaq_386_device);
return ram;
}