This should fix the mess. Sorry for that.

This commit is contained in:
OBattler
2017-10-15 03:01:40 +02:00
parent e9355aa0ad
commit 9f3a58bb24
6 changed files with 29 additions and 29 deletions

View File

@@ -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 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 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 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 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 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}, {"Pentium II Overdrive 240", CPU_PENTIUM2D, 25, 240000000, 4, 30000000, 0x1632, 0x1632, 0, CPU_SUPPORTS_DYNAREC | CPU_REQUIRES_DYNAREC, 24,24,12,12},

View File

@@ -46,8 +46,6 @@ static int opSYSENTER(uint32_t fetchdat)
uint16_t sysenter_cs_seg_data[4]; uint16_t sysenter_cs_seg_data[4];
uint16_t sysenter_ss_seg_data[4]; uint16_t sysenter_ss_seg_data[4];
int cycles_old = cycles; UNUSED(cycles_old);
#ifdef SYSENTER_LOG #ifdef SYSENTER_LOG
pclog("SYSENTER called\n"); pclog("SYSENTER called\n");
#endif #endif
@@ -76,22 +74,20 @@ static int opSYSENTER(uint32_t fetchdat)
flags &= ~0x0200; flags &= ~0x0200;
CS = (cs_msr & 0xFFFC); 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); do_seg_load(&_cs, sysenter_cs_seg_data);
use32 = 0x300; use32 = 0x300;
SS = ((cs_msr + 8) & 0xFFFC); 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); do_seg_load(&_ss, sysenter_ss_seg_data);
stack32 = 1; stack32 = 1;
cycles -= timing_call_rm; cycles -= timing_call_pm;
optype = 0; optype = 0;
CPU_BLOCK_END(); CPU_BLOCK_END();
PREFETCH_RUN(cycles_old-cycles, 7, -1, 0,0,cgate16 ? 2:0,cgate16 ? 0:2, 0);
PREFETCH_FLUSH();
#ifdef SYSENTER_LOG #ifdef SYSENTER_LOG
pclog("SYSENTER completed:\n"); pclog("SYSENTER completed:\n");
@@ -109,8 +105,6 @@ static int opSYSEXIT(uint32_t fetchdat)
uint16_t sysexit_cs_seg_data[4]; uint16_t sysexit_cs_seg_data[4];
uint16_t sysexit_ss_seg_data[4]; uint16_t sysexit_ss_seg_data[4];
int cycles_old = cycles; UNUSED(cycles_old);
#ifdef SYSEXIT_LOG #ifdef SYSEXIT_LOG
pclog("SYSEXIT called\n"); pclog("SYSEXIT called\n");
#endif #endif
@@ -136,23 +130,21 @@ static int opSYSEXIT(uint32_t fetchdat)
cgate16 = cgate32 = 0; \ cgate16 = cgate32 = 0; \
CS = ((cs_msr + 16) & 0xFFFC) | 3; 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); do_seg_load(&_cs, sysexit_cs_seg_data);
use32 = 0x300; use32 = 0x300;
SS = CS + 8; 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); do_seg_load(&_ss, sysexit_ss_seg_data);
stack32 = 1; stack32 = 1;
flushmmucache_cr3(); flushmmucache_cr3();
cycles -= timing_iret_rm; cycles -= timing_call_pm;
optype = 0; optype = 0;
flags_extract();
nmi_enable = 1;
CPU_BLOCK_END(); CPU_BLOCK_END();
#ifdef SYSEXIT_LOG #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); 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 #endif
PREFETCH_RUN(cycles_old-cycles, 1, -1, 0,2,0,0, 1); return 0;
PREFETCH_FLUSH();
return cpu_state.abrt;
} }
static int opFXSAVESTOR_a16(uint32_t fetchdat) static int opFXSAVESTOR_a16(uint32_t fetchdat)

View File

@@ -209,7 +209,6 @@ void ide_irq_lower(IDE *ide)
ide->irqstat=0; ide->irqstat=0;
} }
#if 0
void ide_irq_update(IDE *ide) void ide_irq_update(IDE *ide)
{ {
int pending = 0; 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 * Copy a string into a buffer, padding with spaces, and placing characters as
* if they were packed into 16-bit values, stored little-endian. * 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->lba_addr = (ide->lba_addr & 0x0FFFFFF) | ((val & 0xF) << 24);
ide_other->lba_addr = (ide_other->lba_addr & 0x0FFFFFF)|((val & 0xF) << 24); ide_other->lba_addr = (ide_other->lba_addr & 0x0FFFFFF)|((val & 0xF) << 24);
ide_irq_update(ide);
return; return;
case 0x1F7: /* Command register */ case 0x1F7: /* Command register */
@@ -1224,10 +1222,9 @@ ide_bad_command:
idecallback[ide_board] = 0LL; idecallback[ide_board] = 0LL;
timer_update_outstanding(); timer_update_outstanding();
ide->atastat = ide_other->atastat = BUSY_STAT; ide->atastat = ide_other->atastat = BUSY_STAT;
ide_irq_lower(ide);
ide_irq_lower(ide_other);
} }
ide->fdisk = ide_other->fdisk = val; ide->fdisk = ide_other->fdisk = val;
ide_irq_update(ide);
return; return;
} }
} }

View File

@@ -687,7 +687,7 @@ void trc_init(void)
{ {
trc_reg = 0; 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) void pci_init(int type)

View File

@@ -2562,6 +2562,7 @@ static inline void voodoo_tmu_fetch_and_blend(voodoo_t *voodoo, voodoo_params_t
state->tex_a[0] ^= 0xff; 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__) #if (defined i386 || defined __i386 || defined __i386__ || defined _X86_ || defined WIN32 || defined _WIN32 || defined _WIN32) && !(defined __amd64__)
#include "vid_voodoo_codegen_x86.h" #include "vid_voodoo_codegen_x86.h"
#elif (defined __amd64__) #elif (defined __amd64__)
@@ -2570,6 +2571,10 @@ static inline void voodoo_tmu_fetch_and_blend(voodoo_t *voodoo, voodoo_params_t
#define NO_CODEGEN #define NO_CODEGEN
static int voodoo_recomp = 0; static int voodoo_recomp = 0;
#endif #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) static void voodoo_half_triangle(voodoo_t *voodoo, voodoo_params_t *params, voodoo_state_t *state, int ystart, int yend, int odd_even)
{ {

View File

@@ -255,7 +255,11 @@ BEGIN
#endif #endif
END 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 STYLE DS_CONTROL | WS_CHILD
FONT 9, "Segoe UI" FONT 9, "Segoe UI"
BEGIN BEGIN
@@ -279,12 +283,12 @@ BEGIN
LTEXT "MB",IDT_1705,123,64,10,10 LTEXT "MB",IDT_1705,123,64,10,10
LTEXT "Memory:",IDT_1706,7,64,30,10 LTEXT "Memory:",IDT_1706,7,64,30,10
CONTROL "Enable time sync",IDC_CHECK_SYNC,"Button", 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 | CONTROL "Enable FPU",IDC_CHECK_FPU,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,147,100,113,10 WS_TABSTOP,147,81,113,10
#ifdef USE_DYNAREC #ifdef USE_DYNAREC
CONTROL "Dynamic Recompiler",IDC_CHECK_DYNAREC,"Button", CONTROL "Dynamic Recompiler",IDC_CHECK_DYNAREC,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,7,115,94,10 BS_AUTOCHECKBOX | WS_TABSTOP,7,96,94,10
#endif #endif
END END
@@ -615,7 +619,11 @@ BEGIN
LEFTMARGIN, 7 LEFTMARGIN, 7
RIGHTMARGIN, 260 RIGHTMARGIN, 260
TOPMARGIN, 7 TOPMARGIN, 7
BOTTOMMARGIN, 105 #ifdef USE_DYNAREC
BOTTOMMARGIN, 87
#else
BOTTOMMARGIN, 72
#endif
END END
DLG_CFG_VIDEO, DIALOG DLG_CFG_VIDEO, DIALOG