From: notaz Date: Sat, 1 Oct 2022 19:32:01 +0000 (+0300) Subject: remove all the hack options X-Git-Tag: r24l~366 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=840639a54563490c3e0287b4536d40a5ae761bc1;p=pcsx_rearmed.git remove all the hack options They just confuse users, like: libretro/pcsx_rearmed#693 For Parasite Eve 2 and others, adjust "PSX CPU clock" instead if needed. --- diff --git a/frontend/main.c b/frontend/main.c index d22ac226..5033cec6 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -129,8 +129,8 @@ static void set_default_paths(void) void emu_set_default_config(void) { // try to set sane config on which most games work - Config.Xa = Config.Cdda = Config.Sio = - Config.icache_emulation = Config.SpuIrq = Config.RCntFix = Config.VSyncWA = 0; + Config.Xa = Config.Cdda = 0; + Config.icache_emulation = 0; Config.PsxAuto = 1; pl_rearmed_cbs.thread_rendering = 0; diff --git a/frontend/menu.c b/frontend/menu.c index 72c51d04..e78c370c 100644 --- a/frontend/menu.c +++ b/frontend/menu.c @@ -390,14 +390,10 @@ static const struct { CE_CONFIG_STR(Spu), // CE_CONFIG_STR(Cdr), CE_CONFIG_VAL(Xa), -// CE_CONFIG_VAL(Sio), CE_CONFIG_VAL(Mdec), CE_CONFIG_VAL(Cdda), CE_CONFIG_VAL(Debug), CE_CONFIG_VAL(PsxOut), - CE_CONFIG_VAL(SpuIrq), - CE_CONFIG_VAL(RCntFix), - CE_CONFIG_VAL(VSyncWA), CE_CONFIG_VAL(icache_emulation), CE_CONFIG_VAL(DisableStalls), CE_CONFIG_VAL(Cpu), @@ -1577,21 +1573,14 @@ static const char h_cfg_fl[] = "Frame Limiter keeps the game from running to static const char h_cfg_xa[] = "Disables XA sound, which can sometimes improve performance"; static const char h_cfg_cdda[] = "Disable CD Audio for a performance boost\n" "(proper .cue/.bin dump is needed otherwise)"; -//static const char h_cfg_sio[] = "You should not need this, breaks games"; -static const char h_cfg_spuirq[] = "Compatibility tweak; should be left off"; -static const char h_cfg_rcnt2[] = "InuYasha Sengoku Battle Fix\n" - "(timing hack, breaks other games)"; -#ifdef DRC_DISABLE -static const char h_cfg_rcnt1[] = "Parasite Eve 2, Vandal Hearts 1/2 Fix\n" - "(timing hack, breaks other games)"; -#else +#ifndef DRC_DISABLE static const char h_cfg_nodrc[] = "Disable dynamic recompiler and use interpreter\n" "Might be useful to overcome some dynarec bugs"; #endif static const char h_cfg_shacks[] = "Breaks games but may give better performance"; static const char h_cfg_icache[] = "Support F1 games (only when dynarec is off)"; -enum { AMO_XA, AMO_CDDA, AMO_SIO, AMO_SPUI, AMO_IC, AMO_RCNT, AMO_WA, AMO_CPU }; +enum { AMO_XA, AMO_CDDA, AMO_IC, AMO_CPU }; static menu_entry e_menu_adv_options[] = { @@ -1600,13 +1589,7 @@ static menu_entry e_menu_adv_options[] = mee_onoff_h ("Disable Frame Limiter", 0, g_opts, OPT_NO_FRAMELIM, h_cfg_fl), mee_onoff_h ("Disable XA Decoding", 0, menu_iopts[AMO_XA], 1, h_cfg_xa), mee_onoff_h ("Disable CD Audio", 0, menu_iopts[AMO_CDDA], 1, h_cfg_cdda), - //mee_onoff_h ("SIO IRQ Always Enabled", 0, menu_iopts[AMO_SIO], 1, h_cfg_sio), - mee_onoff_h ("SPU IRQ Always Enabled", 0, menu_iopts[AMO_SPUI], 1, h_cfg_spuirq), mee_onoff_h ("ICache emulation", 0, menu_iopts[AMO_IC], 1, h_cfg_icache), -#ifdef DRC_DISABLE - mee_onoff_h ("Rootcounter hack", 0, menu_iopts[AMO_RCNT], 1, h_cfg_rcnt1), -#endif - mee_onoff_h ("Rootcounter hack 2", 0, menu_iopts[AMO_WA], 1, h_cfg_rcnt2), #if !defined(DRC_DISABLE) || defined(LIGHTREC) mee_onoff_h ("Disable dynarec (slow!)",0, menu_iopts[AMO_CPU], 1, h_cfg_nodrc), #endif @@ -1623,11 +1606,7 @@ static int menu_loop_adv_options(int id, int keys) } opts[] = { { &Config.Xa, &menu_iopts[AMO_XA] }, { &Config.Cdda, &menu_iopts[AMO_CDDA] }, - { &Config.Sio, &menu_iopts[AMO_SIO] }, - { &Config.SpuIrq, &menu_iopts[AMO_SPUI] }, { &Config.icache_emulation, &menu_iopts[AMO_IC] }, - { &Config.RCntFix, &menu_iopts[AMO_RCNT] }, - { &Config.VSyncWA, &menu_iopts[AMO_WA] }, { &Config.Cpu, &menu_iopts[AMO_CPU] }, }; int i; diff --git a/libpcsxcore/misc.c b/libpcsxcore/misc.c index 6853e30e..07553776 100644 --- a/libpcsxcore/misc.c +++ b/libpcsxcore/misc.c @@ -758,10 +758,13 @@ int SendPcsxInfo() { if (NET_recvData == NULL || NET_sendData == NULL) return 0; + boolean Sio_old = 0; + boolean SpuIrq_old = 0; + boolean RCntFix_old = 0; NET_sendData(&Config.Xa, sizeof(Config.Xa), PSE_NET_BLOCKING); - NET_sendData(&Config.Sio, sizeof(Config.Sio), PSE_NET_BLOCKING); - NET_sendData(&Config.SpuIrq, sizeof(Config.SpuIrq), PSE_NET_BLOCKING); - NET_sendData(&Config.RCntFix, sizeof(Config.RCntFix), PSE_NET_BLOCKING); + NET_sendData(&Sio_old, sizeof(Sio_old), PSE_NET_BLOCKING); + NET_sendData(&SpuIrq_old, sizeof(SpuIrq_old), PSE_NET_BLOCKING); + NET_sendData(&RCntFix_old, sizeof(RCntFix_old), PSE_NET_BLOCKING); NET_sendData(&Config.PsxType, sizeof(Config.PsxType), PSE_NET_BLOCKING); NET_sendData(&Config.Cpu, sizeof(Config.Cpu), PSE_NET_BLOCKING); @@ -774,10 +777,13 @@ int RecvPcsxInfo() { if (NET_recvData == NULL || NET_sendData == NULL) return 0; + boolean Sio_old = 0; + boolean SpuIrq_old = 0; + boolean RCntFix_old = 0; NET_recvData(&Config.Xa, sizeof(Config.Xa), PSE_NET_BLOCKING); - NET_recvData(&Config.Sio, sizeof(Config.Sio), PSE_NET_BLOCKING); - NET_recvData(&Config.SpuIrq, sizeof(Config.SpuIrq), PSE_NET_BLOCKING); - NET_recvData(&Config.RCntFix, sizeof(Config.RCntFix), PSE_NET_BLOCKING); + NET_recvData(&Sio_old, sizeof(Sio_old), PSE_NET_BLOCKING); + NET_recvData(&SpuIrq_old, sizeof(SpuIrq_old), PSE_NET_BLOCKING); + NET_recvData(&RCntFix_old, sizeof(RCntFix_old), PSE_NET_BLOCKING); NET_recvData(&Config.PsxType, sizeof(Config.PsxType), PSE_NET_BLOCKING); SysUpdate(); diff --git a/libpcsxcore/new_dynarec/pcsxmem.c b/libpcsxcore/new_dynarec/pcsxmem.c index bb471b6a..69a4c99d 100644 --- a/libpcsxcore/new_dynarec/pcsxmem.c +++ b/libpcsxcore/new_dynarec/pcsxmem.c @@ -152,8 +152,6 @@ make_rcnt_funcs(2) static void io_write_ireg16(u32 value) { - //if (Config.Sio) psxHu16ref(0x1070) |= 0x80; - if (Config.SpuIrq) psxHu16ref(0x1070) |= 0x200; psxHu16ref(0x1070) &= value; } @@ -166,8 +164,6 @@ static void io_write_imask16(u32 value) static void io_write_ireg32(u32 value) { - //if (Config.Sio) psxHu32ref(0x1070) |= 0x80; - if (Config.SpuIrq) psxHu32ref(0x1070) |= 0x200; psxHu32ref(0x1070) &= value; } diff --git a/libpcsxcore/psxcommon.h b/libpcsxcore/psxcommon.h index 6104bfcc..a57194c0 100644 --- a/libpcsxcore/psxcommon.h +++ b/libpcsxcore/psxcommon.h @@ -127,7 +127,6 @@ typedef struct { char PluginsDir[MAXPATHLEN]; char PatchesDir[MAXPATHLEN]; boolean Xa; - boolean Sio; boolean Mdec; boolean PsxAuto; boolean Cdda; @@ -137,10 +136,7 @@ typedef struct { boolean SlowBoot; boolean Debug; boolean PsxOut; - boolean SpuIrq; - boolean RCntFix; boolean UseNet; - boolean VSyncWA; boolean icache_emulation; boolean DisableStalls; u8 Cpu; // CPU_DYNAREC or CPU_INTERPRETER diff --git a/libpcsxcore/psxcounters.c b/libpcsxcore/psxcounters.c index c90ffdce..bb91280e 100644 --- a/libpcsxcore/psxcounters.c +++ b/libpcsxcore/psxcounters.c @@ -357,8 +357,8 @@ void psxRcntUpdate() } } - // Update lace. (with InuYasha fix) - if( hSyncCount >= (Config.VSyncWA ? HSyncTotal[Config.PsxType] / BIAS : HSyncTotal[Config.PsxType]) ) + // Update lace. + if( hSyncCount >= HSyncTotal[Config.PsxType] ) { rcnts[3].cycleStart += Config.PsxType ? PSXCLK / 50 : PSXCLK / 60; hSyncCount = 0; @@ -419,18 +419,6 @@ u32 psxRcntRcount( u32 index ) count = _psxRcntRcount( index ); - // Parasite Eve 2 fix. - if( Config.RCntFix ) - { - if( index == 2 ) - { - if( rcnts[index].counterState == CountToTarget ) - { - count /= BIAS; - } - } - } - verboseLog( 2, "[RCNT %i] rcount: %x\n", index, count ); return count; diff --git a/libpcsxcore/psxhw.c b/libpcsxcore/psxhw.c index b7540dfc..483f4962 100644 --- a/libpcsxcore/psxhw.c +++ b/libpcsxcore/psxhw.c @@ -30,9 +30,6 @@ //#define PSXHW_LOG printf void psxHwReset() { - if (Config.Sio) psxHu32ref(0x1070) |= SWAP32(0x80); - if (Config.SpuIrq) psxHu32ref(0x1070) |= SWAP32(0x200); - memset(psxH, 0, 0x10000); mdecInit(); // initialize mdec decoder @@ -443,8 +440,6 @@ void psxHwWrite16(u32 add, u16 value) { #ifdef PSXHW_LOG PSXHW_LOG("IREG 16bit write %x\n", value); #endif - if (Config.Sio) psxHu16ref(0x1070) |= SWAPu16(0x80); - if (Config.SpuIrq) psxHu16ref(0x1070) |= SWAPu16(0x200); psxHu16ref(0x1070) &= SWAPu16(value); return; @@ -558,8 +553,6 @@ void psxHwWrite32(u32 add, u32 value) { #ifdef PSXHW_LOG PSXHW_LOG("IREG 32bit write %x\n", value); #endif - if (Config.Sio) psxHu32ref(0x1070) |= SWAPu32(0x80); - if (Config.SpuIrq) psxHu32ref(0x1070) |= SWAPu32(0x200); psxHu32ref(0x1070) &= SWAPu32(value); return; case 0x1f801074: diff --git a/libpcsxcore/r3000a.c b/libpcsxcore/r3000a.c index ea4fc089..858896c0 100644 --- a/libpcsxcore/r3000a.c +++ b/libpcsxcore/r3000a.c @@ -124,7 +124,7 @@ void psxBranchTest() { psxRcntUpdate(); if (psxRegs.interrupt) { - if ((psxRegs.interrupt & (1 << PSXINT_SIO)) && !Config.Sio) { // sio + if ((psxRegs.interrupt & (1 << PSXINT_SIO))) { // sio if ((psxRegs.cycle - psxRegs.intCycle[PSXINT_SIO].sCycle) >= psxRegs.intCycle[PSXINT_SIO].cycle) { psxRegs.interrupt &= ~(1 << PSXINT_SIO); sioInterrupt(); diff --git a/libpcsxcore/sio.c b/libpcsxcore/sio.c index 8392fd86..480cf5e3 100644 --- a/libpcsxcore/sio.c +++ b/libpcsxcore/sio.c @@ -72,12 +72,10 @@ char Mcd1Data[MCD_SIZE], Mcd2Data[MCD_SIZE]; char McdDisable[2]; #define SIO_INT(eCycle) { \ - if (!Config.Sio) { \ - psxRegs.interrupt |= (1 << PSXINT_SIO); \ - psxRegs.intCycle[PSXINT_SIO].cycle = eCycle; \ - psxRegs.intCycle[PSXINT_SIO].sCycle = psxRegs.cycle; \ - new_dyna_set_event(PSXINT_SIO, eCycle); \ - } \ + psxRegs.interrupt |= (1 << PSXINT_SIO); \ + psxRegs.intCycle[PSXINT_SIO].cycle = eCycle; \ + psxRegs.intCycle[PSXINT_SIO].sCycle = psxRegs.cycle; \ + new_dyna_set_event(PSXINT_SIO, eCycle); \ } // clk cycle byte