diff --git a/src/cpu/cpu.c b/src/cpu/cpu.c index a0d474b65..2c2e79773 100644 --- a/src/cpu/cpu.c +++ b/src/cpu/cpu.c @@ -608,7 +608,7 @@ CPU cpus_PentiumPro[] = {"Pentium II Overdrive 50", CPU_PENTIUM2D, 5, 50000000, 1, 25000000, 0x1632, 0x1632, 0, CPU_SUPPORTS_DYNAREC | CPU_REQUIRES_DYNAREC, 4,4,3,3}, {"Pentium II Overdrive 60", CPU_PENTIUM2D, 6, 60000000, 1, 30000000, 0x1632, 0x1632, 0, CPU_SUPPORTS_DYNAREC | CPU_REQUIRES_DYNAREC, 6,6,3,3}, {"Pentium II Overdrive 66", CPU_PENTIUM2D, 6, 66666666, 1, 33333333, 0x1632, 0x1632, 0, CPU_SUPPORTS_DYNAREC | CPU_REQUIRES_DYNAREC, 6,6,3,3}, - {"Pentium II Overdrive 75", CPU_PENTIUM2D, 9, 75000000, 2, 25000000, 0x654, 0x654, 0, CPU_SUPPORTS_DYNAREC | CPU_REQUIRES_DYNAREC, 7,7,4,4}, + {"Pentium II Overdrive 75", CPU_PENTIUM2D, 9, 75000000, 2, 25000000, 0x1632, 0x1632, 0, CPU_SUPPORTS_DYNAREC | CPU_REQUIRES_DYNAREC, 7,7,4,4}, {"Pentium II Overdrive 210", CPU_PENTIUM2D, 22, 210000000, 4, 30000000, 0x1632, 0x1632, 0, CPU_SUPPORTS_DYNAREC | CPU_REQUIRES_DYNAREC, 17,17,7,7}, {"Pentium II Overdrive 233", CPU_PENTIUM2D, 24, 233333333, 4, 33333333, 0x1632, 0x1632, 0, CPU_SUPPORTS_DYNAREC | CPU_REQUIRES_DYNAREC, 21,21,10,1}, {"Pentium II Overdrive 240", CPU_PENTIUM2D, 25, 240000000, 4, 30000000, 0x1632, 0x1632, 0, CPU_SUPPORTS_DYNAREC | CPU_REQUIRES_DYNAREC, 24,24,12,12}, diff --git a/src/cpu/x86_ops_i686.h b/src/cpu/x86_ops_i686.h index f1b824598..a61d27025 100644 --- a/src/cpu/x86_ops_i686.h +++ b/src/cpu/x86_ops_i686.h @@ -46,8 +46,6 @@ static int opSYSENTER(uint32_t fetchdat) uint16_t sysenter_cs_seg_data[4]; uint16_t sysenter_ss_seg_data[4]; - int cycles_old = cycles; UNUSED(cycles_old); - #ifdef SYSENTER_LOG pclog("SYSENTER called\n"); #endif @@ -76,22 +74,20 @@ static int opSYSENTER(uint32_t fetchdat) flags &= ~0x0200; CS = (cs_msr & 0xFFFC); - make_seg_data(sysenter_cs_seg_data, 0, 0xFFFFF, 11, 1, 0, 1, 1, 1, 1); + make_seg_data(sysenter_cs_seg_data, 0, 0xFFFFF, 11, 1, 0, 1, 1, 1, 0); do_seg_load(&_cs, sysenter_cs_seg_data); use32 = 0x300; SS = ((cs_msr + 8) & 0xFFFC); - make_seg_data(sysenter_ss_seg_data, 0, 0xFFFFF, 3, 1, 0, 1, 1, 1, 1); + make_seg_data(sysenter_ss_seg_data, 0, 0xFFFFF, 3, 1, 0, 1, 1, 1, 0); do_seg_load(&_ss, sysenter_ss_seg_data); stack32 = 1; - cycles -= timing_call_rm; + cycles -= timing_call_pm; optype = 0; CPU_BLOCK_END(); - PREFETCH_RUN(cycles_old-cycles, 7, -1, 0,0,cgate16 ? 2:0,cgate16 ? 0:2, 0); - PREFETCH_FLUSH(); #ifdef SYSENTER_LOG pclog("SYSENTER completed:\n"); @@ -109,8 +105,6 @@ static int opSYSEXIT(uint32_t fetchdat) uint16_t sysexit_cs_seg_data[4]; uint16_t sysexit_ss_seg_data[4]; - int cycles_old = cycles; UNUSED(cycles_old); - #ifdef SYSEXIT_LOG pclog("SYSEXIT called\n"); #endif @@ -136,23 +130,21 @@ static int opSYSEXIT(uint32_t fetchdat) cgate16 = cgate32 = 0; \ CS = ((cs_msr + 16) & 0xFFFC) | 3; - make_seg_data(sysexit_cs_seg_data, 0, 0xFFFFF, 11, 1, 3, 1, 1, 1, 1); + make_seg_data(sysexit_cs_seg_data, 0, 0xFFFFF, 11, 1, 3, 1, 1, 1, 0); do_seg_load(&_cs, sysexit_cs_seg_data); use32 = 0x300; SS = CS + 8; - make_seg_data(sysexit_ss_seg_data, 0, 0xFFFFF, 3, 1, 3, 1, 1, 1, 1); + make_seg_data(sysexit_ss_seg_data, 0, 0xFFFFF, 3, 1, 3, 1, 1, 1, 0); do_seg_load(&_ss, sysexit_ss_seg_data); stack32 = 1; flushmmucache_cr3(); - cycles -= timing_iret_rm; + cycles -= timing_call_pm; optype = 0; - flags_extract(); - nmi_enable = 1; CPU_BLOCK_END(); #ifdef SYSEXIT_LOG @@ -163,9 +155,7 @@ static int opSYSEXIT(uint32_t fetchdat) pclog("Other information: eip=%08X esp=%08X eflags=%04X flags=%04X use32=%04X stack32=%i ECX=%08X EDX=%08X\n", cpu_state.pc, ESP, eflags, flags, use32, stack32, ECX, EDX); #endif - PREFETCH_RUN(cycles_old-cycles, 1, -1, 0,2,0,0, 1); - PREFETCH_FLUSH(); - return cpu_state.abrt; + return 0; } static int opFXSAVESTOR_a16(uint32_t fetchdat) diff --git a/src/disk/hdc_ide.c b/src/disk/hdc_ide.c index 69e83229f..f32501b12 100644 --- a/src/disk/hdc_ide.c +++ b/src/disk/hdc_ide.c @@ -209,7 +209,6 @@ void ide_irq_lower(IDE *ide) ide->irqstat=0; } -#if 0 void ide_irq_update(IDE *ide) { int pending = 0; @@ -267,8 +266,6 @@ void ide_irq_update(IDE *ide) } } } -#endif - /** * Copy a string into a buffer, padding with spaces, and placing characters as * if they were packed into 16-bit values, stored little-endian. @@ -914,6 +911,7 @@ void writeide(int ide_board, uint16_t addr, uint8_t val) ide->lba_addr = (ide->lba_addr & 0x0FFFFFF) | ((val & 0xF) << 24); ide_other->lba_addr = (ide_other->lba_addr & 0x0FFFFFF)|((val & 0xF) << 24); + ide_irq_update(ide); return; case 0x1F7: /* Command register */ @@ -1224,10 +1222,9 @@ ide_bad_command: idecallback[ide_board] = 0LL; timer_update_outstanding(); ide->atastat = ide_other->atastat = BUSY_STAT; - ide_irq_lower(ide); - ide_irq_lower(ide_other); } ide->fdisk = ide_other->fdisk = val; + ide_irq_update(ide); return; } } diff --git a/src/pci.c b/src/pci.c index e7aa6b7cc..28775c685 100644 --- a/src/pci.c +++ b/src/pci.c @@ -687,7 +687,7 @@ void trc_init(void) { trc_reg = 0; - // io_sethandler(0x0cf9, 0x0001, trc_read, NULL, NULL, trc_write, NULL, NULL, NULL); + io_sethandler(0x0cf9, 0x0001, trc_read, NULL, NULL, trc_write, NULL, NULL, NULL); } void pci_init(int type) diff --git a/src/video/vid_voodoo.c b/src/video/vid_voodoo.c index 29bcb683c..bf82bf77c 100644 --- a/src/video/vid_voodoo.c +++ b/src/video/vid_voodoo.c @@ -2562,6 +2562,7 @@ static inline void voodoo_tmu_fetch_and_blend(voodoo_t *voodoo, voodoo_params_t state->tex_a[0] ^= 0xff; } +#ifdef USE_DYNAREC #if (defined i386 || defined __i386 || defined __i386__ || defined _X86_ || defined WIN32 || defined _WIN32 || defined _WIN32) && !(defined __amd64__) #include "vid_voodoo_codegen_x86.h" #elif (defined __amd64__) @@ -2570,6 +2571,10 @@ static inline void voodoo_tmu_fetch_and_blend(voodoo_t *voodoo, voodoo_params_t #define NO_CODEGEN static int voodoo_recomp = 0; #endif +else +#define NO_CODEGEN +static int voodoo_recomp = 0; +#endif static void voodoo_half_triangle(voodoo_t *voodoo, voodoo_params_t *params, voodoo_state_t *state, int ystart, int yend, int odd_even) { diff --git a/src/win/86Box.rc b/src/win/86Box.rc index 07a830da5..bcc5fc415 100644 --- a/src/win/86Box.rc +++ b/src/win/86Box.rc @@ -255,7 +255,11 @@ BEGIN #endif END -DLG_CFG_MACHINE DIALOG DISCARDABLE 97, 0, 267, 132 +#ifdef USE_DYNAREC +DLG_CFG_MACHINE DIALOG DISCARDABLE 97, 0, 267, 114 +#else +DLG_CFG_MACHINE DIALOG DISCARDABLE 97, 0, 267, 99 +#endif STYLE DS_CONTROL | WS_CHILD FONT 9, "Segoe UI" BEGIN @@ -279,12 +283,12 @@ BEGIN LTEXT "MB",IDT_1705,123,64,10,10 LTEXT "Memory:",IDT_1706,7,64,30,10 CONTROL "Enable time sync",IDC_CHECK_SYNC,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,7,100,102,10 + BS_AUTOCHECKBOX | WS_TABSTOP,7,81,102,10 CONTROL "Enable FPU",IDC_CHECK_FPU,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,147,100,113,10 + WS_TABSTOP,147,81,113,10 #ifdef USE_DYNAREC CONTROL "Dynamic Recompiler",IDC_CHECK_DYNAREC,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,7,115,94,10 + BS_AUTOCHECKBOX | WS_TABSTOP,7,96,94,10 #endif END @@ -615,7 +619,11 @@ BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 260 TOPMARGIN, 7 - BOTTOMMARGIN, 105 +#ifdef USE_DYNAREC + BOTTOMMARGIN, 87 +#else + BOTTOMMARGIN, 72 +#endif END DLG_CFG_VIDEO, DIALOG