From d25b9389ceb5b921a13c4bbd73c24fa6119c508d Mon Sep 17 00:00:00 2001 From: danoon2 Date: Wed, 12 Feb 2020 17:53:33 +0000 Subject: [PATCH] cpp: fix for the iret instruction --- changeLog.txt | 4 +++- project/vs2013/BoxedWine/BoxedWine.sln | 3 +++ project/vs2013/BoxedWine/BoxedWine/BoxedWine.vcxproj | 2 ++ .../vs2013/BoxedWine/BoxedWine/BoxedWine.vcxproj.filters | 6 ++++++ source/emulation/cpu/common/cpu.cpp | 2 +- 5 files changed, 15 insertions(+), 2 deletions(-) diff --git a/changeLog.txt b/changeLog.txt index 78761fa32..ae36e466e 100644 --- a/changeLog.txt +++ b/changeLog.txt @@ -13,4 +13,6 @@ Known game fixes * GOG's Diablo + Hellfire - https://www.gog.com/game/diablo The installer works, the launcher works and Diablo works. Hellfire does not work (same as Wine). * Half-Life Uplink Demo installer and game work with Wine 4 now. Wine 1.7 has color issue with intro and game is a blank screen. -* Final Reality Benchmark. Works with Wine 1.7 and OpenGL (need to delete HKEY_CURRENT_USER\Software\Wine\Direct3D\DirectDrawRenderer key from registry) \ No newline at end of file +* Final Reality Benchmark. Works with Wine 1.7 and OpenGL (need to delete HKEY_CURRENT_USER\Software\Wine\Direct3D\DirectDrawRenderer key from registry) +* MechWarrior 3 with Wine 4.0 +* Tomb Raider 3 from GOG.com, need to add -setup to the command line and hit enter at the first black screen \ No newline at end of file diff --git a/project/vs2013/BoxedWine/BoxedWine.sln b/project/vs2013/BoxedWine/BoxedWine.sln index 5ab09e395..7d2343d23 100644 --- a/project/vs2013/BoxedWine/BoxedWine.sln +++ b/project/vs2013/BoxedWine/BoxedWine.sln @@ -84,4 +84,7 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(Performance) = preSolution + HasPerformanceSessions = true + EndGlobalSection EndGlobal diff --git a/project/vs2013/BoxedWine/BoxedWine/BoxedWine.vcxproj b/project/vs2013/BoxedWine/BoxedWine/BoxedWine.vcxproj index 27796b7da..fe3ef7009 100644 --- a/project/vs2013/BoxedWine/BoxedWine/BoxedWine.vcxproj +++ b/project/vs2013/BoxedWine/BoxedWine/BoxedWine.vcxproj @@ -374,6 +374,7 @@ + @@ -645,6 +646,7 @@ + diff --git a/project/vs2013/BoxedWine/BoxedWine/BoxedWine.vcxproj.filters b/project/vs2013/BoxedWine/BoxedWine/BoxedWine.vcxproj.filters index 8fe942836..348bd2298 100644 --- a/project/vs2013/BoxedWine/BoxedWine/BoxedWine.vcxproj.filters +++ b/project/vs2013/BoxedWine/BoxedWine/BoxedWine.vcxproj.filters @@ -355,6 +355,9 @@ source\kernel\sys + + source\kernel\proc + @@ -834,6 +837,9 @@ include + + include + diff --git a/source/emulation/cpu/common/cpu.cpp b/source/emulation/cpu/common/cpu.cpp index abe07b90f..4f5208677 100644 --- a/source/emulation/cpu/common/cpu.cpp +++ b/source/emulation/cpu/common/cpu.cpp @@ -649,7 +649,7 @@ void CPU::iret(U32 big, U32 oldeip) { if (big) { n_eip = this->peek32(0); - n_cs_sel = this->peek32(1); + n_cs_sel = this->peek32(1) & 0xffff; n_flags = this->peek32(2); if ((n_flags & VM) && (this->cpl==0)) {