Added VME emulation to Intel DX4, Pentium and Pentium MMX.
Temporarily disabled recompilation of CLI and STI.
This commit is contained in:
parent
8fbebead19
commit
1f33b52451
11 changed files with 259 additions and 62 deletions
|
|
@ -29,15 +29,39 @@ static int opINT1(uint32_t fetchdat)
|
|||
static int opINT(uint32_t fetchdat)
|
||||
{
|
||||
int cycles_old = cycles; UNUSED(cycles_old);
|
||||
uint8_t temp;
|
||||
|
||||
/*if (msw&1) pclog("INT %i %i %i\n",cr0&1,eflags&VM_FLAG,IOPL);*/
|
||||
uint8_t temp = getbytef();
|
||||
|
||||
if ((cr0 & 1) && (eflags & VM_FLAG) && (IOPL != 3))
|
||||
{
|
||||
if (cr4 & CR4_VME)
|
||||
{
|
||||
uint16_t t;
|
||||
uint8_t d;
|
||||
|
||||
cpl_override = 1;
|
||||
t = readmemw(tr.base, 0x66) - 32;
|
||||
cpl_override = 0;
|
||||
if (cpu_state.abrt) return 1;
|
||||
|
||||
t += (temp >> 3);
|
||||
if (t <= tr.limit)
|
||||
{
|
||||
cpl_override = 1;
|
||||
d = readmemb(tr.base, t);// + (temp >> 3));
|
||||
cpl_override = 0;
|
||||
if (cpu_state.abrt) return 1;
|
||||
|
||||
if (!(d & (1 << (temp & 7))))
|
||||
{
|
||||
x86_int_sw_rm(temp);
|
||||
PREFETCH_RUN(cycles_old-cycles, 2, -1, 0,0,0,0, 0);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
x86gpf(NULL,0);
|
||||
return 1;
|
||||
}
|
||||
temp = getbytef();
|
||||
// /*if (temp == 0x10 && AH == 0xe) */pclog("INT %02X : %04X %04X %04X %04X %c %04X:%04X\n", temp, AX, BX, CX, DX, (AL < 32) ? ' ' : AL, CS, pc);
|
||||
// if (CS == 0x0028 && pc == 0xC03813C0)
|
||||
// output = 3;
|
||||
|
|
|
|||
Loading…
Reference in a new issue