notaz.gp2x.de
/
pcsx_rearmed.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "(iOS) Use GCC (not working yet)"
[pcsx_rearmed.git]
/
plugins
/
dfxvideo
/
gpu.c
diff --git
a/plugins/dfxvideo/gpu.c
b/plugins/dfxvideo/gpu.c
index
d80a265
..
3d20dfa
100644
(file)
--- a/
plugins/dfxvideo/gpu.c
+++ b/
plugins/dfxvideo/gpu.c
@@
-23,7
+23,6
@@
// memory image of the PSX vram
////////////////////////////////////////////////////////////////////////
// memory image of the PSX vram
////////////////////////////////////////////////////////////////////////
-unsigned char *psxVSecure;
unsigned char *psxVub;
signed char *psxVsb;
unsigned short *psxVuw;
unsigned char *psxVub;
signed char *psxVsb;
unsigned short *psxVuw;
@@
-61,7
+60,6
@@
long lSelectedSlot=0;
BOOL bDoLazyUpdate=FALSE;
uint32_t lGPUInfoVals[16];
static int iFakePrimBusy=0;
BOOL bDoLazyUpdate=FALSE;
uint32_t lGPUInfoVals[16];
static int iFakePrimBusy=0;
-static uint32_t vBlank=0;
static const int *skip_advice;
////////////////////////////////////////////////////////////////////////
static const int *skip_advice;
////////////////////////////////////////////////////////////////////////
@@
-88,16
+86,15
@@
static void SetFixes(void)
// INIT, will be called after lib load... well, just do some var init...
////////////////////////////////////////////////////////////////////////
// INIT, will be called after lib load... well, just do some var init...
////////////////////////////////////////////////////////////////////////
+// one extra MB for soft drawing funcs security
+static unsigned char vram[1024*512*2 + 1024*1024] __attribute__((aligned(2048)));
+
long CALLBACK GPUinit(void) // GPU INIT
{
memset(ulStatusControl,0,256*sizeof(uint32_t)); // init save state scontrol field
long CALLBACK GPUinit(void) // GPU INIT
{
memset(ulStatusControl,0,256*sizeof(uint32_t)); // init save state scontrol field
- psxVSecure = (unsigned char *)malloc((512*2)*1024 + (1024*1024)); // always alloc one extra MB for soft drawing funcs security
- if (!psxVSecure)
- return -1;
-
//!!! ATTENTION !!!
//!!! ATTENTION !!!
- psxVub=
psxVSecure
+ 512 * 1024; // security offset into double sized psx vram!
+ psxVub=
vram
+ 512 * 1024; // security offset into double sized psx vram!
psxVsb=(signed char *)psxVub; // different ways of accessing PSX VRAM
psxVsw=(signed short *)psxVub;
psxVsb=(signed char *)psxVub; // different ways of accessing PSX VRAM
psxVsw=(signed short *)psxVub;
@@
-107,7
+104,7
@@
long CALLBACK GPUinit(void) // GPU INIT
psxVuw_eom=psxVuw+1024*512; // pre-calc of end of vram
psxVuw_eom=psxVuw+1024*512; // pre-calc of end of vram
- memset(
psxVSecure
,0x00,(512*2)*1024 + (1024*1024));
+ memset(
vram
,0x00,(512*2)*1024 + (1024*1024));
memset(lGPUInfoVals,0x00,16*sizeof(uint32_t));
PSXDisplay.RGB24 = FALSE; // init some stuff
memset(lGPUInfoVals,0x00,16*sizeof(uint32_t));
PSXDisplay.RGB24 = FALSE; // init some stuff
@@
-185,7
+182,6
@@
long CALLBACK GPUclose() // GPU CLOSE
long CALLBACK GPUshutdown(void) // GPU SHUTDOWN
{
CloseDisplay(); // shutdown direct draw
long CALLBACK GPUshutdown(void) // GPU SHUTDOWN
{
CloseDisplay(); // shutdown direct draw
- free(psxVSecure);
return 0; // nothinh to do
}
return 0; // nothinh to do
}
@@
-475,7
+471,7
@@
uint32_t CALLBACK GPUreadStatus(void) // READ STATUS
GPUIsReadyForCommands;
}
}
GPUIsReadyForCommands;
}
}
- return lGPUstatusRet
| vBlank
;
+ return lGPUstatusRet;
}
////////////////////////////////////////////////////////////////////////
}
////////////////////////////////////////////////////////////////////////
@@
-1118,6
+1114,7
@@
long CALLBACK GPUfreeze(uint32_t ulGetFreezeData,GPUFreeze_t * pF)
// RESET TEXTURE STORE HERE, IF YOU USE SOMETHING LIKE THAT
// RESET TEXTURE STORE HERE, IF YOU USE SOMETHING LIKE THAT
+ PreviousPSXDisplay.Height = 0;
GPUwriteStatus(ulStatusControl[0]);
GPUwriteStatus(ulStatusControl[1]);
GPUwriteStatus(ulStatusControl[2]);
GPUwriteStatus(ulStatusControl[0]);
GPUwriteStatus(ulStatusControl[1]);
GPUwriteStatus(ulStatusControl[2]);
@@
-1131,11
+1128,6
@@
long CALLBACK GPUfreeze(uint32_t ulGetFreezeData,GPUFreeze_t * pF)
return 1;
}
return 1;
}
-void CALLBACK GPUvBlank(int val)
-{
- vBlank=val?0x80000000:0;
-}
-
// rearmed thing
#include "../../frontend/plugin_lib.h"
// rearmed thing
#include "../../frontend/plugin_lib.h"
@@
-1149,6
+1141,10
@@
void GPUrearmedCallbacks(const struct rearmed_cbs *cbs)
dwActFixes = cbs->gpu_peops.dwActFixes;
fFrameRateHz = cbs->gpu_peops.fFrameRateHz;
dwFrameRateTicks = cbs->gpu_peops.dwFrameRateTicks;
dwActFixes = cbs->gpu_peops.dwActFixes;
fFrameRateHz = cbs->gpu_peops.fFrameRateHz;
dwFrameRateTicks = cbs->gpu_peops.dwFrameRateTicks;
+ if (cbs->pl_vout_set_raw_vram)
+ cbs->pl_vout_set_raw_vram(psxVub);
+ if (cbs->pl_set_gpu_caps)
+ cbs->pl_set_gpu_caps(0);
skip_advice = &cbs->fskip_advice;
fps_skip = 100.0f;
skip_advice = &cbs->fskip_advice;
fps_skip = 100.0f;