From 2588a9387f60ec46ec9c7a1f7ebc480276e5cf1e Mon Sep 17 00:00:00 2001 From: notaz Date: Tue, 1 Mar 2011 23:24:30 +0200 Subject: [PATCH] dfxvideo: use bit31 handling from pcsxr-svn --- frontend/plugin.c | 3 ++- plugins/dfxvideo/gpu.c | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/frontend/plugin.c b/frontend/plugin.c index 33efbf0b..bc42f047 100644 --- a/frontend/plugin.c +++ b/frontend/plugin.c @@ -75,6 +75,7 @@ extern void GPUreadDataMem(uint32_t *, int); extern long GPUdmaChain(uint32_t *,uint32_t); extern void GPUupdateLace(void); extern long GPUfreeze(uint32_t, void *); +extern void GPUvBlank(int); #define DUMMY(id, name) \ @@ -166,6 +167,7 @@ static const struct { DIRECT_GPU(GPUwriteDataMem), DIRECT_GPU(GPUdmaChain), DIRECT_GPU(GPUfreeze), + DIRECT_GPU(GPUvBlank), DUMMY_GPU(GPUdisplayText), /* @@ -178,7 +180,6 @@ static const struct { DIRECT_GPU(GPUshowScreenPic), */ // DIRECT_GPU(GPUclearDynarec), -// DIRECT_GPU(GPUvBlank), }; void *plugin_link(enum builtint_plugins_e id, const char *sym) diff --git a/plugins/dfxvideo/gpu.c b/plugins/dfxvideo/gpu.c index 50d45d59..8e36f8e8 100644 --- a/plugins/dfxvideo/gpu.c +++ b/plugins/dfxvideo/gpu.c @@ -59,6 +59,7 @@ long lSelectedSlot=0; BOOL bDoLazyUpdate=FALSE; uint32_t lGPUInfoVals[16]; static int iFakePrimBusy=0; +static uint32_t vBlank=0; //////////////////////////////////////////////////////////////////////// // some misc external display funcs @@ -384,8 +385,8 @@ static void updateDisplayIfChanged(void) // UPDATE DISPLAY void CALLBACK GPUupdateLace(void) // VSYNC { - if(!(dwActFixes&1)) - lGPUstatusRet^=0x80000000; // odd/even bit + //if(!(dwActFixes&1)) + // lGPUstatusRet^=0x80000000; // odd/even bit //pcsx-rearmed: removed, this is handled by core //if(!(dwActFixes&32)) // std fps limitation? @@ -393,6 +394,8 @@ void CALLBACK GPUupdateLace(void) // VSYNC if(PSXDisplay.Interlaced) // interlaced mode? { + lGPUstatusRet^=0x80000000; // odd/even bit? + if(bDoVSyncUpdate && PSXDisplay.DisplayMode.x>0 && PSXDisplay.DisplayMode.y>0) { updateDisplay(); @@ -450,7 +453,7 @@ uint32_t CALLBACK GPUreadStatus(void) // READ STATUS GPUIsReadyForCommands; } } - return lGPUstatusRet; + return lGPUstatusRet | vBlank; } //////////////////////////////////////////////////////////////////////// @@ -1103,3 +1106,9 @@ long CALLBACK GPUfreeze(uint32_t ulGetFreezeData,GPUFreeze_t * pF) return 1; } + +void CALLBACK GPUvBlank(int val) +{ + vBlank=val?0x80000000:0; +} + -- 2.39.2