From 06e6fc406f50cd500f7149e83318d62140725fc5 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 27 Apr 2014 01:11:26 +0200 Subject: [PATCH] (MSVC 2003 Xbox 1) Build fixes for Mednafen PCFX --- mednafen/pcfx-09333/king-bgfast.inc | 7 ++ mednafen/pcfx-09333/king.cpp | 7 +- mednafen/pcfx-09333/pcfx.h | 2 + mednafen/pcfx-09333/soundbox.cpp | 2 +- .../msvc-2003-xbox1/msvc-2003-xbox1.vcproj | 83 ++++++++++++++----- 5 files changed, 80 insertions(+), 21 deletions(-) diff --git a/mednafen/pcfx-09333/king-bgfast.inc b/mednafen/pcfx-09333/king-bgfast.inc index 3436994..e067566 100644 --- a/mednafen/pcfx-09333/king-bgfast.inc +++ b/mednafen/pcfx-09333/king-bgfast.inc @@ -4,7 +4,14 @@ // Loop postfix non-endless #define DRAWBG8x1_LPOST() } bat_x = (bat_x + 1) & bat_width_mask; +#ifdef _WIN32 +static inline void CDBG_REASON(const char *format, ...) +{ + (void)0; +} +#else #define CDBG_REASON(format, ...) +#endif //printf("BG%d Reason: " format "\n", n, ## __VA_ARGS__); static bool CanDrawBG_Fast(int n) { diff --git a/mednafen/pcfx-09333/king.cpp b/mednafen/pcfx-09333/king.cpp index 51f8dcf..35c97cb 100644 --- a/mednafen/pcfx-09333/king.cpp +++ b/mednafen/pcfx-09333/king.cpp @@ -52,10 +52,15 @@ #include #endif +#ifdef _WIN32 +static inline void KINGDBG(const char *format, ...) { (void)0; } +static inline void ADPCMDBG(const char *format, ...) { (void)0; } +#else #define KINGDBG(format, ...) (void)0 +#define ADPCMDBG(format, ...) (void)0 +#endif //#define KINGDBG FXDBG #define KING_UNDEF FXDBG -#define ADPCMDBG(format, ...) (void)0 //FXDBG /* diff --git a/mednafen/pcfx-09333/pcfx.h b/mednafen/pcfx-09333/pcfx.h index 842f9b8..9885a91 100644 --- a/mednafen/pcfx-09333/pcfx.h +++ b/mednafen/pcfx-09333/pcfx.h @@ -11,6 +11,8 @@ #if 0 #define FXDBG(format, ...) MDFN_DebugPrint(format, ## __VA_ARGS__) +#elif defined(_WIN32) +static inline void FXDBG(const char *format, ...) { (void)0; } #else #define FXDBG(format, ...) ((void)0) #endif diff --git a/mednafen/pcfx-09333/soundbox.cpp b/mednafen/pcfx-09333/soundbox.cpp index 0787615..fc6cd36 100644 --- a/mednafen/pcfx-09333/soundbox.cpp +++ b/mednafen/pcfx-09333/soundbox.cpp @@ -316,7 +316,7 @@ int SoundBox_Init(bool arg_EmulateBuggyCodec, bool arg_ResetAntiClickEnabled) int vti = 0x3F - x; if(x) - flub /= pow(2, (double)1 / 4 * x); + flub /= powf(2, (double)1 / 4 * x); if(vti <= 0x1B) ADPCMVolTable[vti] = 0; diff --git a/msvc/pcfx/msvc-2003-xbox1/msvc-2003-xbox1.vcproj b/msvc/pcfx/msvc-2003-xbox1/msvc-2003-xbox1.vcproj index 305d49e..a466265 100644 --- a/msvc/pcfx/msvc-2003-xbox1/msvc-2003-xbox1.vcproj +++ b/msvc/pcfx/msvc-2003-xbox1/msvc-2003-xbox1.vcproj @@ -342,6 +342,9 @@ + + @@ -350,43 +353,49 @@ Name="pcfx" Filter=""> + RelativePath="..\..\..\mednafen\pcfx-09333\fxscsi.cpp"> - - + RelativePath="..\..\..\mednafen\pcfx-09333\huc6273.cpp"> + RelativePath="..\..\..\mednafen\pcfx-09333\interrupt.cpp"> + RelativePath="..\..\..\mednafen\pcfx-09333\jrevdct.cpp"> + RelativePath="..\..\..\mednafen\pcfx-09333\king.cpp"> + RelativePath="..\..\..\mednafen\pcfx-09333\pcfx.cpp"> + RelativePath="..\..\..\mednafen\pcfx-09333\rainbow.cpp"> + + + + + + + + + + - - - - + RelativePath="..\..\..\mednafen\hw_cpu\v810\fpu-new\softfloat.c"> + + + + + + + + + + + + + + + + + + +