X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=libpcsxcore%2Fpsxhw.c;h=ebdff87ce7eaa828e2806935d0911a12ca8ec9fd;hp=54e03f6420e058dc09c8a1540982e3231d258b5b;hb=8ad120c9c4dca424feac32098cb4af6a2c8f641f;hpb=1f77c86322bf6567909da192fdbf6c28c0596a13 diff --git a/libpcsxcore/psxhw.c b/libpcsxcore/psxhw.c index 54e03f64..ebdff87c 100644 --- a/libpcsxcore/psxhw.c +++ b/libpcsxcore/psxhw.c @@ -24,6 +24,7 @@ #include "psxhw.h" #include "mdec.h" #include "cdrom.h" +#include "gpu.h" //#undef PSXHW_LOG //#define PSXHW_LOG printf @@ -37,6 +38,7 @@ void psxHwReset() { mdecInit(); // initialize mdec decoder cdrReset(); psxRcntInit(); + HW_GPU_STATUS = 0x14802000; } u8 psxHwRead8(u32 add) { @@ -238,7 +240,10 @@ u32 psxHwRead32(u32 add) { #endif return hard; case 0x1f801814: - hard = GPU_readStatus(); + gpuSyncPluginSR(); + hard = HW_GPU_STATUS; + if (hSyncCount < 240 && (HW_GPU_STATUS & PSXGPU_ILACE_BITS) != PSXGPU_ILACE_BITS) + hard |= PSXGPU_LCF & (psxRegs.cycle << 20); #ifdef PSXHW_LOG PSXHW_LOG("GPU STATUS 32bit read %x\n", hard); #endif @@ -682,7 +687,9 @@ void psxHwWrite32(u32 add, u32 value) { #ifdef PSXHW_LOG PSXHW_LOG("GPU STATUS 32bit write %x\n", value); #endif - GPU_writeStatus(value); return; + GPU_writeStatus(value); + gpuSyncPluginSR(); + return; case 0x1f801820: mdecWrite0(value); break;