diff --git a/core/hw/sh4/dyna/ngen.h b/core/hw/sh4/dyna/ngen.h index 0748e8ec0..bdcf8fb71 100644 --- a/core/hw/sh4/dyna/ngen.h +++ b/core/hw/sh4/dyna/ngen.h @@ -92,7 +92,7 @@ void ngen_ResetBlocks(); //should call rdv_FailedToFindBlock and then jump to the return value extern void (*ngen_FailedToFindBlock)(); //the dynarec mainloop -void ngen_mainloop(void* cntx); +extern "C" void ngen_mainloop(void* cntx); //ngen features struct ngen_features { diff --git a/core/hw/sh4/sh4_core_regs.cpp b/core/hw/sh4/sh4_core_regs.cpp index 06482d295..b4b00b543 100644 --- a/core/hw/sh4/sh4_core_regs.cpp +++ b/core/hw/sh4/sh4_core_regs.cpp @@ -6,6 +6,7 @@ #include "sh4_core.h" #include "sh4_interrupts.h" + Sh4RCB* p_sh4rcb; sh4_if sh4_cpu; u8* sh4_dyna_rcb; @@ -76,18 +77,24 @@ void SetFloatStatusReg() //TODO: Implement this (needed for SOTB) #if HOST_CPU==CPU_X86 - if (fpscr.RM==1) //if round to 0 , set the flag - temp|=(3<<13); - - if (fpscr.DN) //denormals are considered 0 - temp|=(1<<15); #if BUILD_COMPILER == COMPILER_VC - _asm - { - ldmxcsr temp; //load the float status :) - } + if (fpscr.RM == 1) //if round to 0 , set the flag + _controlfp(_RC_CHOP, _MCW_RC); + else + _controlfp(_RC_NEAR, _MCW_RC); + + if (fpscr.DN) //denormals are considered 0 + _controlfp(_DN_FLUSH, _MCW_DN); + else + _controlfp(_DN_SAVE, _MCW_DN); #else + if (fpscr.RM==1) //if round to 0 , set the flag + temp|=(3<<13); + + if (fpscr.DN) //denormals are considered 0 + temp|=(1<<15); + asm("ldmxcsr %0" : : "m"(temp)); #endif #elif HOST_CPU==CPU_ARM diff --git a/core/oslib/audiobackend_directsound.cpp b/core/oslib/audiobackend_directsound.cpp index f94cebd9f..817aecdaa 100644 --- a/core/oslib/audiobackend_directsound.cpp +++ b/core/oslib/audiobackend_directsound.cpp @@ -167,7 +167,7 @@ static u32 directsound_push(void* frame, u32 samples, bool wait) */ while (!directsound_push_nw(frame, samples) && wait) - printf("FAILED waiting on audio FAILED %d\n", directsound_getusedSamples()); + 0 && printf("FAILED waiting on audio FAILED %d\n", directsound_getusedSamples()); return 1; } diff --git a/core/profiler/profiler.cpp b/core/profiler/profiler.cpp index 2dec972ce..f42aeb0b9 100644 --- a/core/profiler/profiler.cpp +++ b/core/profiler/profiler.cpp @@ -71,7 +71,7 @@ void print_blocks(); //called every emulated second void prof_periodical() { - +#if defined(HAS_PROFILE) #if 0 printf("SQW %d,DMAW %d\n",SQW,DMAW); DMAW=SQW=0; @@ -197,6 +197,7 @@ void prof_periodical() printf("********************\n"); memset(&prof.counters,0,sizeof(prof.counters)); +#endif } #else void prof_periodical() { } diff --git a/core/rec-x86/rec_x86_ngen.cpp b/core/rec-x86/rec_x86_asm.cpp similarity index 100% rename from core/rec-x86/rec_x86_ngen.cpp rename to core/rec-x86/rec_x86_asm.cpp diff --git a/core/windows/winmain.cpp b/core/windows/winmain.cpp index e420b4ce1..310c01c1f 100644 --- a/core/windows/winmain.cpp +++ b/core/windows/winmain.cpp @@ -125,7 +125,7 @@ int ExeptionHandler(u32 dwCode, void* pExceptionPointers) { return EXCEPTION_CONTINUE_EXECUTION; } -#ifndef HOST_NO_REC +#if !defined(HOST_NO_REC) && HOST_CPU == CPU_X64 else if ( ngen_Rewrite((unat&)ep->ContextRecord->Eip,*(unat*)ep->ContextRecord->Esp,ep->ContextRecord->Eax) ) { //remove the call from call stack diff --git a/shell/reicast.vcxproj b/shell/reicast.vcxproj index 77e2c6cd6..59f2809e6 100644 --- a/shell/reicast.vcxproj +++ b/shell/reicast.vcxproj @@ -162,9 +162,18 @@ true true - - - + + true + true + + + true + true + + + true + true + @@ -177,6 +186,7 @@ + @@ -302,7 +312,10 @@ - + + true + true + @@ -328,6 +341,9 @@ true true + + Document + {58B14048-EACB-4780-8B1E-9C84C2C30A8E} @@ -364,6 +380,7 @@ + @@ -431,7 +448,7 @@ Level3 Full - WIN32;NDEBUG;_CONSOLE;X86;%(PreprocessorDefinitions) + WIN32;HOST_NO_AREC=1;NDEBUG;_CONSOLE;X86;%(PreprocessorDefinitions) $(ProjectDir)..\core\;$(ProjectDir)..\core\khronos;%(AdditionalIncludeDirectories) /MP %(AdditionalOptions) AnySuitable @@ -448,6 +465,8 @@ true false $(IntDir)/%(RelativeDir)/ + + Windows @@ -482,12 +501,14 @@ Level3 Disabled - WIN32;_DEBUG;_CONSOLE;X86;%(PreprocessorDefinitions) + WIN32;HOST_NO_AREC=1;_DEBUG;_CONSOLE;X86;%(PreprocessorDefinitions) $(ProjectDir)..\core\;$(ProjectDir)..\core\khronos;%(AdditionalIncludeDirectories) true false Default $(IntDir)/%(RelativeDir)/ + + Windows @@ -508,5 +529,6 @@ + \ No newline at end of file diff --git a/shell/reicast.vcxproj.filters b/shell/reicast.vcxproj.filters index 0323e123b..f5f106ac8 100644 --- a/shell/reicast.vcxproj.filters +++ b/shell/reicast.vcxproj.filters @@ -411,6 +411,9 @@ rec-x86 + + rec-x64 + @@ -536,6 +539,9 @@ {5a7b63eb-8c03-46ac-b6e0-dfd3ade02f11} + + {f73263e9-dbe8-4a6f-8b73-335af8307551} + @@ -915,5 +921,8 @@ rec-x86 + + rec-x64 + \ No newline at end of file