Fixed SMM, overhauled the emulation of the VIA northbridges, and added the Via Apollo VP3.
This commit is contained in:
@@ -234,6 +234,10 @@ exec386(int cycs)
|
||||
fetchdat = fastreadl(cs + cpu_state.pc);
|
||||
|
||||
if (!cpu_state.abrt) {
|
||||
#ifdef ENABLE_386_LOG
|
||||
if (in_smm)
|
||||
x386_log("[%04X:%08X] %08X\n", CS, cpu_state.pc, fetchdat);
|
||||
#endif
|
||||
opcode = fetchdat & 0xFF;
|
||||
fetchdat >>= 8;
|
||||
trap = cpu_state.flags & T_FLAG;
|
||||
@@ -242,7 +246,11 @@ exec386(int cycs)
|
||||
x86_opcodes[(opcode | cpu_state.op32) & 0x3ff](fetchdat);
|
||||
if (x86_was_reset)
|
||||
break;
|
||||
}
|
||||
} else
|
||||
#ifdef ENABLE_386_LOG
|
||||
if (in_smm)
|
||||
x386_log("[%04X:%08X] ABRT\n", CS, cpu_state.pc);
|
||||
#endif
|
||||
|
||||
#ifndef USE_NEW_DYNAREC
|
||||
if (!use32) cpu_state.pc &= 0xffff;
|
||||
@@ -272,12 +280,25 @@ exec386(int cycs)
|
||||
}
|
||||
}
|
||||
|
||||
if (!in_smm && smi_line/* && is_pentium*/) {
|
||||
if ((in_smm == 0) && smi_line) {
|
||||
#ifdef ENABLE_386_LOG
|
||||
x386_log("SMI while not in SMM\n");
|
||||
#endif
|
||||
enter_smm();
|
||||
smi_line = 0;
|
||||
} else if (in_smm && smi_line/* && is_pentium*/) {
|
||||
} else if ((in_smm == 1) && smi_line) {
|
||||
/* Mark this so that we don't latch more than one SMI. */
|
||||
#ifdef ENABLE_386_LOG
|
||||
x386_log("SMI while in unlatched SMM\n");
|
||||
#endif
|
||||
smi_latched = 1;
|
||||
smi_line = 0;
|
||||
} else if ((in_smm == 2) && smi_line) {
|
||||
/* Mark this so that we don't latch more than one SMI. */
|
||||
#ifdef ENABLE_386_LOG
|
||||
x386_log("SMI while in latched SMM\n");
|
||||
#endif
|
||||
smi_line = 0;
|
||||
}
|
||||
|
||||
ins_cycles -= cycles;
|
||||
|
||||
Reference in New Issue
Block a user