From 72e5023fade738954035199aacf4076c69c52477 Mon Sep 17 00:00:00 2001 From: notaz Date: Tue, 3 Jan 2012 20:05:54 +0200 Subject: [PATCH] bring GPUvBlank back to be used for interlace emulation --- frontend/plugin.c | 4 ++-- libpcsxcore/plugins.h | 4 ++-- libpcsxcore/psxcounters.c | 3 ++- plugins/gpu_neon/gpu.c | 4 ++++ plugins/gpu_neon/gpu.h | 1 + 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/frontend/plugin.c b/frontend/plugin.c index a5f9830c..b0cbc672 100644 --- a/frontend/plugin.c +++ b/frontend/plugin.c @@ -75,7 +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, uint32_t *, uint32_t *); +extern void GPUvBlank(int, int); extern void GPUrearmedCallbacks(const struct rearmed_cbs *cbs); @@ -168,7 +168,7 @@ static const struct { DIRECT_GPU(GPUwriteDataMem), DIRECT_GPU(GPUdmaChain), DIRECT_GPU(GPUfreeze), -// DIRECT_GPU(GPUvBlank), // unused + DIRECT_GPU(GPUvBlank), DIRECT_GPU(GPUrearmedCallbacks), DUMMY_GPU(GPUdisplayText), diff --git a/libpcsxcore/plugins.h b/libpcsxcore/plugins.h index f7f62487..dfa87221 100644 --- a/libpcsxcore/plugins.h +++ b/libpcsxcore/plugins.h @@ -94,7 +94,7 @@ typedef long (CALLBACK* GPUfreeze)(uint32_t, GPUFreeze_t *); typedef long (CALLBACK* GPUgetScreenPic)(unsigned char *); typedef long (CALLBACK* GPUshowScreenPic)(unsigned char *); typedef void (CALLBACK* GPUclearDynarec)(void (CALLBACK *callback)(void)); -typedef void (CALLBACK* GPUvBlank)(int); +typedef void (CALLBACK* GPUvBlank)(int, int); // GPU function pointers extern GPUupdateLace GPU_updateLace; @@ -119,7 +119,7 @@ extern GPUfreeze GPU_freeze; extern GPUgetScreenPic GPU_getScreenPic; extern GPUshowScreenPic GPU_showScreenPic; extern GPUclearDynarec GPU_clearDynarec; -extern GPUvBlank GPU_vBlank; // unused +extern GPUvBlank GPU_vBlank; // CD-ROM Functions typedef long (CALLBACK* CDRinit)(void); diff --git a/libpcsxcore/psxcounters.c b/libpcsxcore/psxcounters.c index 5056c709..8b8fea8b 100644 --- a/libpcsxcore/psxcounters.c +++ b/libpcsxcore/psxcounters.c @@ -291,7 +291,7 @@ void psxRcntUpdate() if( hSyncCount == VBlankStart ) { HW_GPU_STATUS &= ~PSXGPU_LCF; - + GPU_vBlank( 1, 0 ); setIrq( 0x01 ); EmuUpdate(); @@ -307,6 +307,7 @@ void psxRcntUpdate() gpuSyncPluginSR(); if( (HW_GPU_STATUS & PSXGPU_ILACE_BITS) == PSXGPU_ILACE_BITS ) HW_GPU_STATUS |= frame_counter << 31; + GPU_vBlank( 0, HW_GPU_STATUS >> 31 ); } // Schedule next call, in hsyncs diff --git a/plugins/gpu_neon/gpu.c b/plugins/gpu_neon/gpu.c index a18e05ff..02dd3721 100644 --- a/plugins/gpu_neon/gpu.c +++ b/plugins/gpu_neon/gpu.c @@ -533,4 +533,8 @@ long GPUfreeze(uint32_t type, struct GPUFreeze *freeze) return 1; } +void GPUvBlank(int is_vblank, int lcf) +{ +} + // vim:shiftwidth=2:expandtab diff --git a/plugins/gpu_neon/gpu.h b/plugins/gpu_neon/gpu.h index 227aaaac..6aa933e3 100644 --- a/plugins/gpu_neon/gpu.h +++ b/plugins/gpu_neon/gpu.h @@ -118,6 +118,7 @@ long GPUfreeze(uint32_t type, struct GPUFreeze *freeze); void GPUupdateLace(void); long GPUopen(void **dpy); long GPUclose(void); +void GPUvBlank(int is_vblank, int lcf); void GPUrearmedCallbacks(const struct rearmed_cbs *cbs_); #ifdef __cplusplus -- 2.39.2