GPUvBlank (for gpuBladeSoft now, experimental).

git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@54133 e17a0e51-4ae3-4d35-97c3-1a29b211df97
This commit is contained in:
SND\edgbla_cp 2010-07-04 05:32:58 +00:00
parent 8410fc0c2e
commit dd4b2eaa7f
4 changed files with 18 additions and 4 deletions

View File

@ -1,3 +1,9 @@
July 4, 2010 edgbla <edgbla@yandex.ru>
* libpcsxcore/plugins.c: GPUvBlank (for gpuBladeSoft now, experimental).
* libpcsxcore/plugins.h: Likewise.
* libpcsxcore/psxcounters.c: Likewise.
July 3, 2010 edgbla <edgbla@yandex.ru>
* libpcsxcore/psxhw.c: Sio1 interface (link cable).

View File

@ -49,6 +49,7 @@ GPUfreeze GPU_freeze;
GPUgetScreenPic GPU_getScreenPic;
GPUshowScreenPic GPU_showScreenPic;
GPUclearDynarec GPU_clearDynarec;
GPUvBlank GPU_vBlank;
CDRinit CDR_init;
CDRshutdown CDR_shutdown;
@ -201,6 +202,7 @@ void CALLBACK GPU__keypressed(int key) {}
long CALLBACK GPU__getScreenPic(unsigned char *pMem) { return -1; }
long CALLBACK GPU__showScreenPic(unsigned char *pMem) { return -1; }
void CALLBACK GPU__clearDynarec(void (CALLBACK *callback)(void)) {}
void CALLBACK GPU__vBlank(int val) {}
#define LoadGpuSym1(dest, name) \
LoadSym(GPU_##dest, GPU##dest, name, TRUE);
@ -240,6 +242,7 @@ static int LoadGPUplugin(const char *GPUdll) {
LoadGpuSym0(getScreenPic, "GPUgetScreenPic");
LoadGpuSym0(showScreenPic, "GPUshowScreenPic");
LoadGpuSym0(clearDynarec, "GPUclearDynarec");
LoadGpuSym0(vBlank, "GPUvBlank");
LoadGpuSym0(configure, "GPUconfigure");
LoadGpuSym0(test, "GPUtest");
LoadGpuSym0(about, "GPUabout");

View File

@ -91,6 +91,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);
// GPU function pointers
extern GPUupdateLace GPU_updateLace;
@ -115,6 +116,7 @@ extern GPUfreeze GPU_freeze;
extern GPUgetScreenPic GPU_getScreenPic;
extern GPUshowScreenPic GPU_showScreenPic;
extern GPUclearDynarec GPU_clearDynarec;
extern GPUvBlank GPU_vBlank;
// CD-ROM Functions
typedef long (CALLBACK* CDRinit)(void);

View File

@ -282,19 +282,22 @@ void psxRcntUpdate()
SPU_async( SpuUpdInterval[Config.PsxType] * rcnts[3].target );
}
}
/*
// For the best times. :D
// VSync irq.
if( hSyncCount == VBlankStart[Config.PsxType] )
{
setIrq( 0x01 );
GPU_vBlank( 1 );
// For the best times. :D
//setIrq( 0x01 );
}
*/
// Update lace. (with InuYasha fix)
if( hSyncCount >= (Config.VSyncWA ? HSyncTotal[Config.PsxType] / BIAS : HSyncTotal[Config.PsxType]) )
{
hSyncCount = 0;
GPU_vBlank( 0 );
setIrq( 0x01 );
GPU_updateLace();