plugins: expand GPUvBlank to pass hcounter pointer
authornotaz <notasas@gmail.com>
Mon, 4 Apr 2011 22:13:25 +0000 (01:13 +0300)
committernotaz <notasas@gmail.com>
Mon, 4 Apr 2011 22:13:25 +0000 (01:13 +0300)
frontend/plugin.c
libpcsxcore/plugins.h
libpcsxcore/psxcounters.c

index bc42f04..0d244fa 100644 (file)
@@ -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 long GPUdmaChain(uint32_t *,uint32_t);
 extern void GPUupdateLace(void);
 extern long GPUfreeze(uint32_t, void *);
-extern void GPUvBlank(int);
+extern void GPUvBlank(int, uint32_t *);
 
 
 #define DUMMY(id, name) \
 
 
 #define DUMMY(id, name) \
index 8084143..c724031 100644 (file)
@@ -94,7 +94,7 @@ typedef long (CALLBACK* GPUfreeze)(uint32_t, GPUFreeze_t *);
 typedef long (CALLBACK* GPUgetScreenPic)(unsigned char *);\r
 typedef long (CALLBACK* GPUshowScreenPic)(unsigned char *);\r
 typedef void (CALLBACK* GPUclearDynarec)(void (CALLBACK *callback)(void));\r
 typedef long (CALLBACK* GPUgetScreenPic)(unsigned char *);\r
 typedef long (CALLBACK* GPUshowScreenPic)(unsigned char *);\r
 typedef void (CALLBACK* GPUclearDynarec)(void (CALLBACK *callback)(void));\r
-typedef void (CALLBACK* GPUvBlank)(int);\r
+typedef void (CALLBACK* GPUvBlank)(int, uint32_t *);\r
 \r
 // GPU function pointers\r
 extern GPUupdateLace    GPU_updateLace;\r
 \r
 // GPU function pointers\r
 extern GPUupdateLace    GPU_updateLace;\r
index 044d0d3..1c514e8 100644 (file)
@@ -286,7 +286,7 @@ void psxRcntUpdate()
         // VSync irq.
         if( hSyncCount == VBlankStart[Config.PsxType] )
         {
         // VSync irq.
         if( hSyncCount == VBlankStart[Config.PsxType] )
         {
-            GPU_vBlank( 1 );
+            GPU_vBlank( 1, &hSyncCount );
             
             // For the best times. :D
             //setIrq( 0x01 );
             
             // For the best times. :D
             //setIrq( 0x01 );
@@ -297,7 +297,7 @@ void psxRcntUpdate()
         {
             hSyncCount = 0;
 
         {
             hSyncCount = 0;
 
-            GPU_vBlank( 0 );
+            GPU_vBlank( 0, &hSyncCount );
             setIrq( 0x01 );
 
             EmuUpdate();
             setIrq( 0x01 );
 
             EmuUpdate();