REP instructions now correctly issue a Debug exception after every iteration, fixes NT 3.x on 386 CPU's;

Fixed a string bug in the Settings dialog (Joysticks combo box).
This commit is contained in:
OBattler
2017-07-24 15:21:17 +02:00
parent ff23ccb2a2
commit 36fcf10388
4 changed files with 41 additions and 2 deletions

View File

@@ -17,6 +17,8 @@
#include "386_common.h"
extern int trap;
extern uint16_t *mod1add[2][8];
extern uint32_t *mod1seg[8];

View File

@@ -167,6 +167,9 @@ static int opREP_MOVSB_ ## size(uint32_t fetchdat)
int reads = 0, writes = 0, total_cycles = 0; \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
\
if (trap) \
cycles_end = cycles+1; \
\
while (CNT_REG > 0) \
{ \
uint8_t temp; \
@@ -199,6 +202,9 @@ static int opREP_MOVSW_ ## size(uint32_t fetchdat)
int reads = 0, writes = 0, total_cycles = 0; \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
\
if (trap) \
cycles_end = cycles+1; \
\
while (CNT_REG > 0) \
{ \
uint16_t temp; \
@@ -231,6 +237,9 @@ static int opREP_MOVSL_ ## size(uint32_t fetchdat)
int reads = 0, writes = 0, total_cycles = 0; \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
\
if (trap) \
cycles_end = cycles+1; \
\
while (CNT_REG > 0) \
{ \
uint32_t temp; \
@@ -265,6 +274,9 @@ static int opREP_STOSB_ ## size(uint32_t fetchdat)
int writes = 0, total_cycles = 0; \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
\
if (trap) \
cycles_end = cycles+1; \
\
while (CNT_REG > 0) \
{ \
CHECK_WRITE_REP(&_es, DEST_REG, DEST_REG); \
@@ -292,6 +304,9 @@ static int opREP_STOSW_ ## size(uint32_t fetchdat)
int writes = 0, total_cycles = 0; \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
\
if (trap) \
cycles_end = cycles+1; \
\
while (CNT_REG > 0) \
{ \
CHECK_WRITE_REP(&_es, DEST_REG, DEST_REG+1); \
@@ -319,6 +334,9 @@ static int opREP_STOSL_ ## size(uint32_t fetchdat)
int writes = 0, total_cycles = 0; \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
\
if (trap) \
cycles_end = cycles+1; \
\
while (CNT_REG > 0) \
{ \
CHECK_WRITE_REP(&_es, DEST_REG, DEST_REG+3); \
@@ -347,6 +365,9 @@ static int opREP_LODSB_ ## size(uint32_t fetchdat)
int reads = 0, total_cycles = 0; \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
\
if (trap) \
cycles_end = cycles+1; \
\
while (CNT_REG > 0) \
{ \
AL = readmemb(cpu_state.ea_seg->base, SRC_REG); if (cpu_state.abrt) return 1; \
@@ -373,6 +394,9 @@ static int opREP_LODSW_ ## size(uint32_t fetchdat)
int reads = 0, total_cycles = 0; \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
\
if (trap) \
cycles_end = cycles+1; \
\
while (CNT_REG > 0) \
{ \
AX = readmemw(cpu_state.ea_seg->base, SRC_REG); if (cpu_state.abrt) return 1; \
@@ -399,6 +423,9 @@ static int opREP_LODSL_ ## size(uint32_t fetchdat)
int reads = 0, total_cycles = 0; \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
\
if (trap) \
cycles_end = cycles+1; \
\
while (CNT_REG > 0) \
{ \
EAX = readmeml(cpu_state.ea_seg->base, SRC_REG); if (cpu_state.abrt) return 1; \
@@ -510,6 +537,9 @@ static int opREP_SCASB_ ## size(uint32_t fetchdat)
int reads = 0, total_cycles = 0, tempz; \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
\
if (trap) \
cycles_end = cycles+1; \
\
tempz = FV; \
while ((CNT_REG > 0) && (FV == tempz)) \
{ \
@@ -540,6 +570,9 @@ static int opREP_SCASW_ ## size(uint32_t fetchdat)
int reads = 0, total_cycles = 0, tempz; \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
\
if (trap) \
cycles_end = cycles+1; \
\
tempz = FV; \
while ((CNT_REG > 0) && (FV == tempz)) \
{ \
@@ -570,6 +603,9 @@ static int opREP_SCASL_ ## size(uint32_t fetchdat)
int reads = 0, total_cycles = 0, tempz; \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
\
if (trap) \
cycles_end = cycles+1; \
\
tempz = FV; \
while ((CNT_REG > 0) && (FV == tempz)) \
{ \

View File

@@ -726,6 +726,7 @@ BEGIN
IDS_2072 "Removable devices"
IDS_2073 "Unable to create bitmap file: %s"
IDS_2074 "Use CTRL+ALT+PAGE DOWN to return to windowed mode"
IDS_2075 "CD-ROM images (*.ISO;*.CUE)\0*.ISO;*.CUE\0All files (*.*)\0*.*\0"
IDS_2076 "Host CD/DVD Drive (%c:)"
IDS_2077 "Click to capture mouse"
IDS_2078 "Press F12-F8 to release mouse"
@@ -818,7 +819,7 @@ BEGIN
IDS_2148 "CH Flightstick Pro"
IDS_2149 "Microsoft SideWinder Pad"
IDS_2150 "Thrustmaster Flight Control System"
IDS_2151 "CD-ROM images (*.ISO;*.CUE)\0*.ISO;*.CUE\0All files (*.*)\0*.*\0"
IDS_2151 "Disabled"
IDS_2152 "None"
IDS_2153 "AT Fixed Disk Adapter"
IDS_2154 "Internal IDE"

View File

@@ -2417,7 +2417,7 @@ LRESULT CALLBACK StatusBarProcedure(HWND hwnd, UINT message, WPARAM wParam, LPAR
break;
}
if (!file_dlg_w_st(hwnd, IDS_2151, cdrom_image[id].image_path, 0))
if (!file_dlg_w_st(hwnd, IDS_2075, cdrom_image[id].image_path, 0))
{
cdrom_drives[id].prev_host_drive = cdrom_drives[id].host_drive;
wcscpy(temp_image_path, wopenfilestring);