More (S)VGA horizontal blanking fixes and CPU CR0 bit 4 fixes.

This commit is contained in:
OBattler
2024-02-09 18:02:33 +01:00
parent 30e7a49558
commit 3f8952a558
8 changed files with 58 additions and 52 deletions

View File

@@ -270,6 +270,8 @@ reset_common(int hard)
cr0 = 1 << 30;
else
cr0 = 0;
if (is386 && !is486 && (fpu_type == FPU_387))
cr0 |= 0x10;
cpu_cache_int_enabled = 0;
cpu_update_waitstates();
cr4 = 0;

View File

@@ -124,7 +124,7 @@ opMOV_CRx_r_a16(uint32_t fetchdat)
if ((cpu_state.regs[cpu_rm].l & 0x01) && !(cr0 & 0x01))
cpu_state.seg_cs.access &= 0x9f;
cr0 = cpu_state.regs[cpu_rm].l;
if ((cpu_s->cpu_type != CPU_386DX) || (fpu_type == FPU_387))
if (cpu_16bitbus)
cr0 |= 0x10;
if (!(cr0 & 0x80000000))
mmu_perm = 4;
@@ -181,7 +181,7 @@ opMOV_CRx_r_a32(uint32_t fetchdat)
if ((cpu_state.regs[cpu_rm].l & 0x01) && !(cr0 & 0x01))
cpu_state.seg_cs.access &= 0x9f;
cr0 = cpu_state.regs[cpu_rm].l;
if ((cpu_s->cpu_type != CPU_386DX) || (fpu_type == FPU_387))
if (cpu_16bitbus)
cr0 |= 0x10;
if (!(cr0 & 0x80000000))
mmu_perm = 4;