unsigned long lSetMask = 0;
long lLowerpart;
+#if defined(__GNUC__) && __GNUC__ >= 6
+#pragma GCC diagnostic ignored "-Wmisleading-indentation"
+#endif
+
#include "soft.c"
#include "prim.c"
/////////////////////////////////////////////////////////////////////////////
-int renderer_init(void)
+static void set_vram(void *vram)
{
- psxVub=(void *)gpu.vram;
+ psxVub=vram;
psxVsb=(signed char *)psxVub; // different ways of accessing PSX VRAM
psxVsw=(signed short *)psxVub;
psxVul=(uint32_t *)psxVub;
psxVuw_eom=psxVuw+1024*512; // pre-calc of end of vram
+}
+
+int renderer_init(void)
+{
+ set_vram(gpu.vram);
PSXDisplay.RGB24 = FALSE; // init some stuff
PSXDisplay.Interlaced = FALSE;
return 0;
}
+void renderer_finish(void)
+{
+}
+
+void renderer_notify_res_change(void)
+{
+}
+
extern const unsigned char cmd_lengths[256];
int do_cmd_list(unsigned int *list, int list_len, int *last_cmd)
while(1)
{
- if((*list_position & 0xf000f000) == 0x50005000 || list_position >= list_end)
+ if(list_position >= list_end) {
+ cmd = -1;
+ goto breakloop;
+ }
+
+ if((*list_position & 0xf000f000) == 0x50005000)
break;
list_position++;
while(1)
{
- if((*list_position & 0xf000f000) == 0x50005000 || list_position >= list_end)
+ if(list_position >= list_end) {
+ cmd = -1;
+ goto breakloop;
+ }
+
+ if((*list_position & 0xf000f000) == 0x50005000)
break;
list_position += 2;
}
}
+breakloop:
gpu.ex_regs[1] &= ~0x1ff;
gpu.ex_regs[1] |= lGPUstatusRet & 0x1ff;
{
iUseDither = cbs->gpu_peops.iUseDither;
dwActFixes = cbs->gpu_peops.dwActFixes;
+ if (cbs->pl_set_gpu_caps)
+ cbs->pl_set_gpu_caps(0);
+ set_vram(gpu.vram);
}