diff --git a/src/machine/m_at_compaq.c b/src/machine/m_at_compaq.c
index 0a91242ea..cd0016433 100644
--- a/src/machine/m_at_compaq.c
+++ b/src/machine/m_at_compaq.c
@@ -1,6 +1,22 @@
-/* Copyright holders: Sarah Walker
- see COPYING for more details
-*/
+/*
+ * 86Box A hypervisor and IBM PC system emulator that specializes in
+ * running old operating systems and software designed for IBM
+ * PC systems and compatibles from 1981 through fairly recent
+ * system designs based on the PCI bus.
+ *
+ * This file is part of the 86Box distribution.
+ *
+ * Emulation of various Compaq PC's.
+ *
+ * Version: @(#)m_at_compaq.c 1.0.1 2017/11/11
+ *
+ * Authors: Sarah Walker,
+ * Miran Grca,
+ * TheCollector1995,
+ *
+ * Copyright 2008-2017 Sarah Walker.
+ * Copyright 2016,2017 Miran Grca.
+ */
#include
#include
#include
@@ -12,61 +28,76 @@
/* Compaq Deskpro 386 remaps RAM from 0xA0000-0xFFFFF to 0xFA0000-0xFFFFFF */
+static mem_mapping_t ram_mapping;
-static mem_mapping_t compaq_ram_mapping;
-static uint8_t compaq_read_ram(uint32_t addr, void *priv)
+static uint8_t
+read_ram(uint32_t addr, void *priv)
{
- addr = (addr & 0x7ffff) + 0x80000;
- addreadlookup(mem_logical_addr, addr);
- return ram[addr];
+ addr = (addr & 0x7ffff) + 0x80000;
+ addreadlookup(mem_logical_addr, addr);
+
+ return(ram[addr]);
}
-static uint16_t compaq_read_ramw(uint32_t addr, void *priv)
+static uint16_t
+read_ramw(uint32_t addr, void *priv)
{
- addr = (addr & 0x7ffff) + 0x80000;
- addreadlookup(mem_logical_addr, addr);
- return *(uint16_t *)&ram[addr];
+ addr = (addr & 0x7ffff) + 0x80000;
+ addreadlookup(mem_logical_addr, addr);
+
+ return(*(uint16_t *)&ram[addr]);
}
-static uint32_t compaq_read_raml(uint32_t addr, void *priv)
+static uint32_t
+read_raml(uint32_t addr, void *priv)
{
- addr = (addr & 0x7ffff) + 0x80000;
- addreadlookup(mem_logical_addr, addr);
- return *(uint32_t *)&ram[addr];
+ addr = (addr & 0x7ffff) + 0x80000;
+ addreadlookup(mem_logical_addr, addr);
+
+ return(*(uint32_t *)&ram[addr]);
}
-static void compaq_write_ram(uint32_t addr, uint8_t val, void *priv)
+static void
+write_ram(uint32_t addr, uint8_t val, void *priv)
{
- addr = (addr & 0x7ffff) + 0x80000;
- addwritelookup(mem_logical_addr, addr);
- mem_write_ramb_page(addr, val, &pages[addr >> 12]);
+ addr = (addr & 0x7ffff) + 0x80000;
+ addwritelookup(mem_logical_addr, addr);
+
+ mem_write_ramb_page(addr, val, &pages[addr >> 12]);
}
-static void compaq_write_ramw(uint32_t addr, uint16_t val, void *priv)
+static void
+write_ramw(uint32_t addr, uint16_t val, void *priv)
{
- addr = (addr & 0x7ffff) + 0x80000;
- addwritelookup(mem_logical_addr, addr);
- mem_write_ramw_page(addr, val, &pages[addr >> 12]);
+ addr = (addr & 0x7ffff) + 0x80000;
+ addwritelookup(mem_logical_addr, addr);
+
+ mem_write_ramw_page(addr, val, &pages[addr >> 12]);
}
-static void compaq_write_raml(uint32_t addr, uint32_t val, void *priv)
+static void
+write_raml(uint32_t addr, uint32_t val, void *priv)
{
- addr = (addr & 0x7ffff) + 0x80000;
- addwritelookup(mem_logical_addr, addr);
- mem_write_raml_page(addr, val, &pages[addr >> 12]);
+ addr = (addr & 0x7ffff) + 0x80000;
+ addwritelookup(mem_logical_addr, addr);
+
+ mem_write_raml_page(addr, val, &pages[addr >> 12]);
}
-static void compaq_init(void)
+void
+machine_at_compaq_init(machine_t *model)
{
- mem_mapping_add(&compaq_ram_mapping, 0xfa0000, 0x60000,
- compaq_read_ram, compaq_read_ramw, compaq_read_raml,
- compaq_write_ram, compaq_write_ramw, compaq_write_raml,
- ram + 0xa0000, MEM_MAPPING_INTERNAL, NULL);
+ machine_at_top_remap_init(model);
+
+ mem_mapping_add(&ram_mapping, 0xfa0000, 0x60000,
+ read_ram, read_ramw, read_raml,
+ write_ram, write_ramw, write_raml,
+ 0xa0000+ram, MEM_MAPPING_INTERNAL, NULL);
}
diff --git a/src/machine/machine.h b/src/machine/machine.h
index 82fd6791c..f1b9c7c7a 100644
--- a/src/machine/machine.h
+++ b/src/machine/machine.h
@@ -8,7 +8,7 @@
*
* Handling of the emulated machines.
*
- * Version: @(#)machine.h 1.0.11 2017/11/10
+ * Version: @(#)machine.h 1.0.12 2017/11/11
*
* Authors: Sarah Walker,
* Miran Grca,
@@ -127,6 +127,7 @@ extern void machine_at_headland_init(machine_t *);
extern void machine_at_neat_init(machine_t *);
extern void machine_at_opti495_init(machine_t *);
extern void machine_at_scat_init(machine_t *);
+extern void machine_at_compaq_init(machine_t *);
extern void machine_at_dtk486_init(machine_t *);
extern void machine_at_r418_init(machine_t *);
diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c
index b8e1a553c..af9c88fef 100644
--- a/src/machine/machine_table.c
+++ b/src/machine/machine_table.c
@@ -57,6 +57,8 @@ machine_t machines[] = {
{ "[286 ISA] AMI 286 clone", ROM_AMI286, "ami286", {{"", cpus_286}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_AT, 512,16384, 128, 127, machine_at_neat_init, NULL },
{ "[286 ISA] Award 286 clone", ROM_AWARD286, "award286", {{"", cpus_286}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_AT, 512,16384, 128, 127, machine_at_scat_init, NULL },
{ "[286 ISA] Commodore PC 30 III", ROM_CMDPC30, "cmdpc30", {{"", cpus_286}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_AT, 640,16384, 128, 127, machine_at_cmdpc_init, NULL },
+ { "[286 ISA] Compaq Portable II", ROM_PORTABLEII, "portableii", {{"", cpus_286}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_AT, 640,16384, 128, 127, machine_at_compaq_init, NULL },
+ { "[286 ISA] Compaq Portable III", ROM_PORTABLEIII, "portableiii", {{"", cpus_286}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_AT, 640,16384, 128, 127, machine_at_compaq_init, NULL },
{ "[286 ISA] Hyundai Super-286TR", ROM_SUPER286TR, "super286tr", {{"", cpus_286}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_AT, 512,16384, 128, 127, machine_at_scat_init, NULL },
{ "[286 ISA] IBM AT", ROM_IBMAT, "ibmat", {{"", cpus_ibmat}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_AT, 256,15872, 128, 63, machine_at_top_remap_init, NULL },
{ "[286 ISA] IBM PS/1 model 2011", ROM_IBMPS1_2011, "ibmps1es", {{"", cpus_ps1_m2011}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 1, MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC_PS2, 512,16384, 512, 127, machine_ps1_m2011_init, NULL },
@@ -82,6 +84,7 @@ machine_t machines[] = {
{ "[386DX ISA] Amstrad MegaPC 386DX", ROM_MEGAPCDX, "megapcdx", {{"Intel", cpus_i386DX}, {"AMD", cpus_Am386DX}, {"Cyrix", cpus_486DLC}, {"", NULL}, {"", NULL}}, 1, MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC | MACHINE_VIDEO, 1, 16, 1, 127, machine_at_wd76c10_init, NULL },
{ "[386DX ISA] Award 386DX clone", ROM_AWARD386DX_OPTI495, "award386dx", {{"Intel", cpus_i386DX}, {"AMD", cpus_Am386DX}, {"Cyrix", cpus_486DLC}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_AT | MACHINE_HDC, 1, 64, 1, 127, machine_at_opti495_init, NULL },
{ "[386DX ISA] MR 386DX clone", ROM_MR386DX_OPTI495, "mr386dx", {{"Intel", cpus_i386DX}, {"AMD", cpus_Am386DX}, {"Cyrix", cpus_486DLC}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_AT | MACHINE_HDC, 1, 64, 1, 127, machine_at_opti495_init, NULL },
+ { "[386DX ISA] Compaq Portable III (386)", ROM_PORTABLEIII386, "portableiii386", {{"Intel", cpus_i386DX}, {"AMD", cpus_Am386DX}, {"Cyrix", cpus_486DLC}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_AT, 640,16384, 128, 127, machine_at_compaq_init, NULL },
{ "[386DX MCA] IBM PS/2 model 80", ROM_IBMPS2_M80, "ibmps2_m80", {{"Intel", cpus_i386DX}, {"AMD", cpus_Am386DX}, {"Cyrix", cpus_486DLC}, {"", NULL}, {"", NULL}}, 1, MACHINE_MCA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC_PS2, 1, 12, 1, 63, machine_ps2_model_80_init, NULL },
diff --git a/src/rom.c b/src/rom.c
index d2c5e45e7..4fd9d9429 100644
--- a/src/rom.c
+++ b/src/rom.c
@@ -403,22 +403,19 @@ rom_load_bios(int rom_id)
case ROM_PORTABLEII:
if (! rom_load_interleaved(
- L"roms/machines/portableii/109739-001.rom",
L"roms/machines/portableii/109740-001.rom",
+ L"roms/machines/portableii/109739-001.rom",
0x000000, 32768, 0, rom)) break;
biosmask = 0x7fff;
return(1);
-#if NOT_USED
case ROM_PORTABLEIII:
case ROM_PORTABLEIII386:
if (rom_load_interleaved(
L"roms/machines/portableiii/109738-002.bin",
L"roms/machines/portableiii/109737-002.bin",
- 0x000000, 32768, 0, rom)) return(1);
- biosmask = 0x7fff;
+ 0x000000, 65536, 0, rom)) return(1);
break;
-#endif
case ROM_DTKXT:
if (rom_load_linear(
diff --git a/src/win/Makefile.mingw b/src/win/Makefile.mingw
index 72f1522d5..6ce17a1a9 100644
--- a/src/win/Makefile.mingw
+++ b/src/win/Makefile.mingw
@@ -8,7 +8,7 @@
#
# Makefile for Win32 (MinGW32) environment.
#
-# Version: @(#)Makefile.mingw 1.0.74 2017/11/10
+# Version: @(#)Makefile.mingw 1.0.75 2017/11/11
#
# Authors: Miran Grca,
# Fred N. van Kempen,
@@ -285,7 +285,7 @@ MCHOBJ := machine.o machine_table.o \
m_at_ali1429.o m_at_commodore.o \
m_at_neat.o m_at_headland.o \
m_at_opti495.o m_at_scat.o \
- m_at_wd76c10.o \
+ m_at_compaq.o m_at_wd76c10.o \
m_at_sis_85c471.o m_at_sis_85c496.o \
m_at_430lx_nx.o m_at_430fx.o \
m_at_430hx.o m_at_430vx.o \