Add initial Mazovia 1016 emulation
This commit is contained in:
@@ -240,13 +240,13 @@ cpu_io(int bits, int out, uint16_t port)
|
||||
int old_cycles = cycles;
|
||||
|
||||
if (out) {
|
||||
wait(4, 1);
|
||||
wait(is_mazovia ? 5 : 4, 1);
|
||||
if (bits == 16) {
|
||||
if (is8086 && !(port & 1)) {
|
||||
old_cycles = cycles;
|
||||
outw(port, AX);
|
||||
} else {
|
||||
wait(4, 1);
|
||||
wait(is_mazovia ? 5 : 4, 1);
|
||||
old_cycles = cycles;
|
||||
outb(port++, AL);
|
||||
outb(port, AH);
|
||||
@@ -256,13 +256,13 @@ cpu_io(int bits, int out, uint16_t port)
|
||||
outb(port, AL);
|
||||
}
|
||||
} else {
|
||||
wait(4, 1);
|
||||
wait(is_mazovia ? 5 : 4, 1);
|
||||
if (bits == 16) {
|
||||
if (is8086 && !(port & 1)) {
|
||||
old_cycles = cycles;
|
||||
AX = inw(port);
|
||||
} else {
|
||||
wait(4, 1);
|
||||
wait(is_mazovia ? 5 : 4, 1);
|
||||
old_cycles = cycles;
|
||||
AL = inb(port++);
|
||||
AH = inb(port);
|
||||
|
||||
@@ -203,6 +203,7 @@ int cpu_override_interpreter;
|
||||
int CPUID;
|
||||
|
||||
int is186;
|
||||
int is_mazovia;
|
||||
int is_nec;
|
||||
int is286;
|
||||
int is386;
|
||||
@@ -517,6 +518,7 @@ cpu_set(void)
|
||||
|
||||
CPUID = cpu_s->cpuid_model;
|
||||
is8086 = (cpu_s->cpu_type > CPU_8088) && (cpu_s->cpu_type != CPU_V20) && (cpu_s->cpu_type != CPU_188);
|
||||
is_mazovia = (cpu_s->cpu_type == CPU_8086_MAZOVIA);
|
||||
is_nec = (cpu_s->cpu_type == CPU_V20) || (cpu_s->cpu_type == CPU_V30);
|
||||
is186 = (cpu_s->cpu_type == CPU_186) || (cpu_s->cpu_type == CPU_188) || (cpu_s->cpu_type == CPU_V20) || (cpu_s->cpu_type == CPU_V30);
|
||||
is286 = (cpu_s->cpu_type >= CPU_286);
|
||||
@@ -767,6 +769,7 @@ cpu_set(void)
|
||||
switch (cpu_s->cpu_type) {
|
||||
case CPU_8088:
|
||||
case CPU_8086:
|
||||
case CPU_8086_MAZOVIA:
|
||||
break;
|
||||
|
||||
case CPU_V20:
|
||||
|
||||
@@ -35,6 +35,7 @@ enum {
|
||||
enum {
|
||||
CPU_8088 = 1, /* 808x class CPUs */
|
||||
CPU_8086,
|
||||
CPU_8086_MAZOVIA,
|
||||
CPU_V20, /* NEC 808x class CPUs */
|
||||
CPU_V30,
|
||||
CPU_188, /* 18x class CPUs */
|
||||
@@ -87,28 +88,29 @@ enum {
|
||||
CPU_PKG_8088 = (1 << 0),
|
||||
CPU_PKG_8088_EUROPC = (1 << 1),
|
||||
CPU_PKG_8086 = (1 << 2),
|
||||
CPU_PKG_188 = (1 << 3),
|
||||
CPU_PKG_186 = (1 << 4),
|
||||
CPU_PKG_286 = (1 << 5),
|
||||
CPU_PKG_386SX = (1 << 6),
|
||||
CPU_PKG_386DX = (1 << 7),
|
||||
CPU_PKG_386DX_DESKPRO386 = (1 << 8),
|
||||
CPU_PKG_M6117 = (1 << 9),
|
||||
CPU_PKG_386SLC_IBM = (1 << 10),
|
||||
CPU_PKG_486SLC = (1 << 11),
|
||||
CPU_PKG_486SLC_IBM = (1 << 12),
|
||||
CPU_PKG_486BL = (1 << 13),
|
||||
CPU_PKG_486DLC = (1 << 14),
|
||||
CPU_PKG_SOCKET1 = (1 << 15),
|
||||
CPU_PKG_SOCKET3 = (1 << 16),
|
||||
CPU_PKG_SOCKET3_PC330 = (1 << 17),
|
||||
CPU_PKG_STPC = (1 << 18),
|
||||
CPU_PKG_SOCKET4 = (1 << 19),
|
||||
CPU_PKG_SOCKET5_7 = (1 << 20),
|
||||
CPU_PKG_SOCKET8 = (1 << 21),
|
||||
CPU_PKG_SLOT1 = (1 << 22),
|
||||
CPU_PKG_SLOT2 = (1 << 23),
|
||||
CPU_PKG_SOCKET370 = (1 << 24)
|
||||
CPU_PKG_8086_MAZOVIA = (1 << 3),
|
||||
CPU_PKG_188 = (1 << 4),
|
||||
CPU_PKG_186 = (1 << 5),
|
||||
CPU_PKG_286 = (1 << 6),
|
||||
CPU_PKG_386SX = (1 << 7),
|
||||
CPU_PKG_386DX = (1 << 8),
|
||||
CPU_PKG_386DX_DESKPRO386 = (1 << 9),
|
||||
CPU_PKG_M6117 = (1 << 10),
|
||||
CPU_PKG_386SLC_IBM = (1 << 11),
|
||||
CPU_PKG_486SLC = (1 << 12),
|
||||
CPU_PKG_486SLC_IBM = (1 << 13),
|
||||
CPU_PKG_486BL = (1 << 14),
|
||||
CPU_PKG_486DLC = (1 << 15),
|
||||
CPU_PKG_SOCKET1 = (1 << 16),
|
||||
CPU_PKG_SOCKET3 = (1 << 17),
|
||||
CPU_PKG_SOCKET3_PC330 = (1 << 18),
|
||||
CPU_PKG_STPC = (1 << 19),
|
||||
CPU_PKG_SOCKET4 = (1 << 20),
|
||||
CPU_PKG_SOCKET5_7 = (1 << 21),
|
||||
CPU_PKG_SOCKET8 = (1 << 22),
|
||||
CPU_PKG_SLOT1 = (1 << 23),
|
||||
CPU_PKG_SLOT2 = (1 << 24),
|
||||
CPU_PKG_SOCKET370 = (1 << 25)
|
||||
};
|
||||
|
||||
#define CPU_SUPPORTS_DYNAREC 1
|
||||
@@ -518,6 +520,7 @@ extern int is_p6;
|
||||
extern int is_cxsmm;
|
||||
extern int hascache;
|
||||
extern int isibm486;
|
||||
extern int is_mazovia;
|
||||
extern int is_nec;
|
||||
extern int is_rapidcad;
|
||||
extern int hasfpu;
|
||||
|
||||
@@ -373,6 +373,32 @@ const cpu_family_t cpu_families[] = {
|
||||
{ .name = "", 0 }
|
||||
}
|
||||
},
|
||||
{
|
||||
.package = CPU_PKG_8086_MAZOVIA,
|
||||
.manufacturer = "Kyiv Research Institute of Microdevices",
|
||||
.name = "K1810VM86",
|
||||
.internal_name = "8086_mazovia",
|
||||
.cpus = (const CPU[]) {
|
||||
{
|
||||
.name = "4.77",
|
||||
.cpu_type = CPU_8086_MAZOVIA,
|
||||
.fpus = fpus_8088,
|
||||
.rspeed = 4772728,
|
||||
.multi = 1,
|
||||
.voltage = 5000,
|
||||
.edx_reset = 0,
|
||||
.cpuid_model = 0,
|
||||
.cyrix_id = 0,
|
||||
.cpu_flags = CPU_ALTERNATE_XTAL,
|
||||
.mem_read_cycles = 0,
|
||||
.mem_write_cycles = 0,
|
||||
.cache_read_cycles = 0,
|
||||
.cache_write_cycles = 0,
|
||||
.atclk_div = 1
|
||||
},
|
||||
{ .name = "", 0 }
|
||||
}
|
||||
},
|
||||
{
|
||||
.package = CPU_PKG_188,
|
||||
.manufacturer = "Intel",
|
||||
|
||||
Reference in New Issue
Block a user