X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libpcsxcore%2Fpsxhw.c;h=b7540dfcf5ba8987a1039160aff563307e37e909;hb=70c1043e63dafcf92b0f4dc0932326a6d042fbb4;hp=84ce2f7305ab6add5fec1071af5a3ed07aaff4ef;hpb=943a507a4156b8f5b00e4431152e41eeb4dc6f3d;p=pcsx_rearmed.git diff --git a/libpcsxcore/psxhw.c b/libpcsxcore/psxhw.c index 84ce2f73..b7540dfc 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); @@ -183,6 +190,10 @@ u16 psxHwRead16(u32 add) { //case 0x1f802030: hard = //int_2000???? //case 0x1f802040: hard =//dip switches...?? + case 0x1f801800: + case 0x1f801802: + log_unhandled("cdrom r16 %x\n", add); + // falthrough default: if (add >= 0x1f801c00 && add < 0x1f801e00) { hard = SPU_readRegister(add); @@ -241,8 +252,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); @@ -341,6 +352,9 @@ u32 psxHwRead32(u32 add) { #endif return hard; + case 0x1f801800: + log_unhandled("cdrom r32 %x\n", add); + // falthrough default: hard = psxHu32(add); #ifdef PSXHW_LOG @@ -439,7 +453,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 +567,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;