X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libpcsxcore%2Fpsxhw.c;h=7b2401b1875c6d26cd5bbdb26b2c492de442ceb8;hb=086adfff4fe6352e401d00c052071a6b91245b40;hp=84ce2f7305ab6add5fec1071af5a3ed07aaff4ef;hpb=943a507a4156b8f5b00e4431152e41eeb4dc6f3d;p=pcsx_rearmed.git diff --git a/libpcsxcore/psxhw.c b/libpcsxcore/psxhw.c index 84ce2f73..7b2401b1 100644 --- a/libpcsxcore/psxhw.c +++ b/libpcsxcore/psxhw.c @@ -38,7 +38,7 @@ void psxHwReset() { mdecInit(); // initialize mdec decoder cdrReset(); psxRcntInit(); - HW_GPU_STATUS = 0x14802000; + HW_GPU_STATUS = SWAP32(0x14802000); } u8 psxHwRead8(u32 add) { @@ -123,7 +123,14 @@ u16 psxHwRead16(u32 add) { return hard; case 0x1f80105e: hard = SIO1_readBaud16(); - return hard; + return hard; +#else + /* Fixes Armored Core misdetecting the Link cable being detected. + * We want to turn that thing off and force it to do local multiplayer instead. + * Thanks Sony for the fix, they fixed it in their PS Classic fork. + */ + case 0x1f801054: + return 0x80; #endif case 0x1f801100: hard = psxRcntRcount(0); @@ -241,8 +248,8 @@ u32 psxHwRead32(u32 add) { return hard; case 0x1f801814: gpuSyncPluginSR(); - hard = HW_GPU_STATUS; - if (hSyncCount < 240 && (HW_GPU_STATUS & PSXGPU_ILACE_BITS) != PSXGPU_ILACE_BITS) + hard = SWAP32(HW_GPU_STATUS); + if (hSyncCount < 240 && (hard & PSXGPU_ILACE_BITS) != PSXGPU_ILACE_BITS) hard |= PSXGPU_LCF & (psxRegs.cycle << 20); #ifdef PSXHW_LOG PSXHW_LOG("GPU STATUS 32bit read %x\n", hard); @@ -439,7 +446,7 @@ void psxHwWrite16(u32 add, u16 value) { PSXHW_LOG("IMASK 16bit write %x\n", value); #endif psxHu16ref(0x1074) = SWAPu16(value); - if (psxHu16ref(0x1070) & value) + if (psxHu16ref(0x1070) & SWAPu16(value)) new_dyna_set_event(PSXINT_NEWDRC_CHECK, 1); return; @@ -553,7 +560,7 @@ void psxHwWrite32(u32 add, u32 value) { PSXHW_LOG("IMASK 32bit write %x\n", value); #endif psxHu32ref(0x1074) = SWAPu32(value); - if (psxHu32ref(0x1070) & value) + if (psxHu32ref(0x1070) & SWAPu32(value)) new_dyna_set_event(PSXINT_NEWDRC_CHECK, 1); return;