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;
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),
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[] =
{
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
} 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;
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);
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();
static void io_write_ireg16(u32 value)
{
- //if (Config.Sio) psxHu16ref(0x1070) |= 0x80;
- if (Config.SpuIrq) psxHu16ref(0x1070) |= 0x200;
psxHu16ref(0x1070) &= value;
}
static void io_write_ireg32(u32 value)
{
- //if (Config.Sio) psxHu32ref(0x1070) |= 0x80;
- if (Config.SpuIrq) psxHu32ref(0x1070) |= 0x200;
psxHu32ref(0x1070) &= value;
}
char PluginsDir[MAXPATHLEN];
char PatchesDir[MAXPATHLEN];
boolean Xa;
- boolean Sio;
boolean Mdec;
boolean PsxAuto;
boolean Cdda;
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
}
}
- // 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;
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;
//#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
#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;
#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:
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();
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