X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=libpcsxcore%2Fnew_dynarec%2Fpcsxmem.c;h=046402109a985e862d32250eec79fd56f912b5d4;hp=2306ca77b0fb8e13d8fc0fdfe45e8d1823ccc4ce;hb=0486fdc9bd313ce2f01dafa4d3c151f40e2c729b;hpb=c7945666b47fa5636762bfa52cd6328125d607c4 diff --git a/libpcsxcore/new_dynarec/pcsxmem.c b/libpcsxcore/new_dynarec/pcsxmem.c index 2306ca77..04640210 100644 --- a/libpcsxcore/new_dynarec/pcsxmem.c +++ b/libpcsxcore/new_dynarec/pcsxmem.c @@ -212,9 +212,17 @@ static void io_spu_write32(u32 value) static u32 io_gpu_read_status(void) { + u32 v; + // meh2, syncing for img bit, might want to avoid it.. gpuSyncPluginSR(); - return HW_GPU_STATUS; + v = HW_GPU_STATUS; + + // XXX: because of large timeslices can't use hSyncCount, using rough + // approximization instead. Perhaps better use hcounter code here or something. + if (hSyncCount < 240 && (HW_GPU_STATUS & PSXGPU_ILACE_BITS) != PSXGPU_ILACE_BITS) + v |= PSXGPU_LCF & (psxRegs.cycle << 20); + return v; } static void io_gpu_write_status(u32 value)