From 296b7881ff162c2d6c3455067c604162229c3c34 Mon Sep 17 00:00:00 2001 From: OBattler Date: Wed, 29 Jun 2016 01:28:59 +0200 Subject: [PATCH] Applied mainline PCem revision 522 commit: REP instructions now handle trap flag correctly, Windows NT 3.51 now works on 386 systems. --- src/386_dynarec.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/386_dynarec.c b/src/386_dynarec.c index ee9d33f1b..488168286 100644 --- a/src/386_dynarec.c +++ b/src/386_dynarec.c @@ -297,7 +297,10 @@ int rep386(int fv) that high frequency timers still work okay. This amount is different for interpreter and recompiler*/ int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); - + + if (trap) + cycles_end = cycles+1; /*Force the instruction to end after only one iteration when trap flag set*/ + cpu_reps++; flags_rebuild();