X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libpcsxcore%2Fpsxhw.c;h=678811243e40d28db1e6b4906900997fdd1ac115;hb=e02164097b6a90b94305d5761d7eccd63e336490;hp=8179d9597796541f678a450203aae0374c7099be;hpb=20bfbac0014bac12af9aa63e49eeedfac725f812;p=pcsx_rearmed.git diff --git a/libpcsxcore/psxhw.c b/libpcsxcore/psxhw.c index 8179d959..67881124 100644 --- a/libpcsxcore/psxhw.c +++ b/libpcsxcore/psxhw.c @@ -27,8 +27,6 @@ #include "cdrom.h" #include "gpu.h" -static u32 (*psxHwReadGpuSRptr)(void) = psxHwReadGpuSR; - void psxHwReset() { memset(psxH, 0, 0x10000); @@ -36,8 +34,6 @@ void psxHwReset() { cdrReset(); psxRcntInit(); HW_GPU_STATUS = SWAP32(0x10802000); - psxHwReadGpuSRptr = Config.hacks.gpu_busy - ? psxHwReadGpuSRbusyHack : psxHwReadGpuSR; } void psxHwWriteIstat(u32 value) @@ -121,16 +117,10 @@ u32 psxHwReadGpuSR(void) return v; } -// a hack due to poor timing of gpu idle bit -// to get rid of this, GPU draw times, DMAs, cpu timing has to fall within -// certain timing window or else games like "ToHeart" softlock -u32 psxHwReadGpuSRbusyHack(void) +u32 sio1ReadStat16(void) { - u32 v = psxHwReadGpuSR(); - static u32 hack; - if (!(hack++ & 3)) - v &= ~PSXGPU_nBUSY; - return v; + // Armored Core, F1 Link cable misdetection + return 0xa0; } u8 psxHwRead8(u32 add) { @@ -196,7 +186,7 @@ u16 psxHwRead16(u32 add) { case 0x1048: hard = sioReadMode16(); break; case 0x104a: hard = sioReadCtrl16(); break; case 0x104e: hard = sioReadBaud16(); break; - case 0x1054: hard = 0x80; break; // Armored Core Link cable misdetection + case 0x1054: hard = sio1ReadStat16(); break; case 0x1100: hard = psxRcntRcount0(); break; case 0x1104: hard = psxRcntRmode(0); break; case 0x1108: hard = psxRcntRtarget(0); break; @@ -254,7 +244,7 @@ u32 psxHwRead32(u32 add) { case 0x1124: hard = psxRcntRmode(2); break; case 0x1128: hard = psxRcntRtarget(2); break; case 0x1810: hard = GPU_readData(); break; - case 0x1814: hard = psxHwReadGpuSRptr(); break; + case 0x1814: hard = psxHwReadGpuSR(); break; case 0x1820: hard = mdecRead0(); break; case 0x1824: hard = mdecRead1(); break;