#include "psxbios.h"
#include "psxhw.h"
+#include "gpu.h"
+#include <zlib.h>
#undef SysPrintf
#define SysPrintf if (Config.PsxOut) printf
heap_end = (u32 *)((u8 *)heap_addr + size);
*heap_addr = SWAP32(size | 1);
- SysPrintf("InitHeap %x,%x : %x %x\n",a0,a1, (uptr)heap_addr-(uptr)psxM, size);
+ SysPrintf("InitHeap %x,%x : %x %x\n",a0,a1, (int)((uptr)heap_addr-(uptr)psxM), size);
pc0 = ra;
}
case 'g': case 'G':
ptmp += sprintf(ptmp, tmp2, (double)psxMu32(sp + n * 4)); n++; break;
case 'p':
- case 'i':
+ case 'i': case 'u':
case 'd': case 'D':
case 'o': case 'O':
case 'x': case 'X':
void psxBios_SendGPU() { // 0x48
GPU_writeStatus(a0);
+ gpuSyncPluginSR();
pc0 = ra;
}
if ((*ptr & 0xF0) != 0x50) continue; \
ptr+= 0xa; \
if (pfile[0] == 0) { \
- strcpy(dir->name, ptr); \
+ strncpy(dir->name, ptr, sizeof(dir->name)); \
+ dir->name[sizeof(dir->name) - 1] = '\0'; \
} else for (i=0; i<20; i++) { \
if (pfile[i] == ptr[i]) { \
dir->name[i] = ptr[i]; \