Merge branch '86Box:master' into nec-v20

This commit is contained in:
Jasmine Iwanek
2022-08-10 13:12:27 -04:00
committed by GitHub
49 changed files with 637 additions and 309 deletions

View File

@@ -196,6 +196,7 @@ exec386(int cycs)
enter_smm_check(0);
else if (trap) {
flags_rebuild();
dr[6] |= 0x4000;
if (msw&1)
pmodeint(1,0);
else {

View File

@@ -1897,6 +1897,8 @@ nmi_raise(void)
{
if (is486 && (cpu_fast_off_flags & 0x20000000))
cpu_fast_off_advance();
nmi = 1;
}

View File

@@ -404,6 +404,7 @@ exec386_dynarec_int(void)
oldcs = CS;
#endif
cpu_state.oldpc = cpu_state.pc;
dr[6] |= 0x4000;
x86_int(1);
}

View File

@@ -32,7 +32,7 @@ static int opAAM(uint32_t fetchdat)
{
int base = getbytef();
if (base == 0) {
if (base == 0) {
x86de(NULL, 0);
return 1;
}

View File

@@ -91,7 +91,7 @@ static int opMOV_r_DRx_a16(uint32_t fetchdat)
return 1;
}
fetch_ea_16(fetchdat);
cpu_state.regs[cpu_rm].l = dr[cpu_reg];
cpu_state.regs[cpu_rm].l = dr[cpu_reg] | (cpu_reg == 6 ? 0xffff0ff0u : 0);
CLOCK_CYCLES(6);
PREFETCH_RUN(6, 2, rmdat, 0,0,0,0, 0);
return 0;
@@ -104,7 +104,7 @@ static int opMOV_r_DRx_a32(uint32_t fetchdat)
return 1;
}
fetch_ea_32(fetchdat);
cpu_state.regs[cpu_rm].l = dr[cpu_reg];
cpu_state.regs[cpu_rm].l = dr[cpu_reg] | (cpu_reg == 6 ? 0xffff0ff0u : 0);
CLOCK_CYCLES(6);
PREFETCH_RUN(6, 2, rmdat, 0,0,0,0, 1);
return 0;

View File

@@ -168,8 +168,12 @@ x86_doabrt(int x86_abrt)
void
x86de(char *s, uint16_t error)
{
#ifdef BAD_CODE
cpu_state.abrt = ABRT_DE;
abrt_error = error;
#else
x86_int(0);
#endif
}