- u32 *code;
- u32 tmp;
-
- #ifdef ICACHE_EMULATION
- if (Config.icache_emulation)
- {
- code = Read_ICache(psxRegs.pc);
- }
- else
- #endif
- {
- code = (u32 *)PSXM(psxRegs.pc);
- }
-
- tmp = ((code == NULL) ? 0 : SWAP32(*code));
+ u32 tmp = fetch(psxRegs.pc);
- #ifdef ICACHE_EMULATION
- if (Config.icache_emulation)
- {
- code = Read_ICache(psxRegs.pc);
- }
- else
- #endif
- {
- code = (u32 *)PSXM(psxRegs.pc);
- }
- psxRegs.code = ((code == NULL) ? 0 : SWAP32(*code));
+ psxRegs.code = fetch(psxRegs.pc);
- #ifdef ICACHE_EMULATION
- if (Config.icache_emulation)
- {
- code = Read_ICache(psxRegs.pc);
- }
- else
- #endif
- {
- code = (u32 *)PSXM(psxRegs.pc);
- }
- psxRegs.code = ((code == NULL) ? 0 : SWAP32(*code));
+ psxRegs.code = fetch(psxRegs.pc);
/* We have to allocate the icache memory even if
* the user has not enabled it as otherwise it can cause issues.
*/
/* We have to allocate the icache memory even if
* the user has not enabled it as otherwise it can cause issues.
*/
}
memset(ICache_Addr, 0xff, 0x1000);
memset(ICache_Code, 0xff, 0x1000);
}
memset(ICache_Addr, 0xff, 0x1000);
memset(ICache_Code, 0xff, 0x1000);
memset(ICache_Addr, 0xff, 0x1000);
memset(ICache_Code, 0xff, 0x1000);
memset(ICache_Addr, 0xff, 0x1000);
memset(ICache_Code, 0xff, 0x1000);
/* Gameblabla - Only clear the icache if it's isolated */
if (note == R3000ACPU_NOTIFY_CACHE_ISOLATED)
{
memset(ICache_Addr, 0xff, 0x1000);
memset(ICache_Code, 0xff, 0x1000);
}
/* Gameblabla - Only clear the icache if it's isolated */
if (note == R3000ACPU_NOTIFY_CACHE_ISOLATED)
{
memset(ICache_Addr, 0xff, 0x1000);
memset(ICache_Code, 0xff, 0x1000);
}
assert(psxBSC[18] == psxCOP2 || psxBSC[18] == psxCOP2_stall);
assert(psxBSC[50] == gteLWC2 || psxBSC[50] == gteLWC2_stall);
assert(psxBSC[58] == gteSWC2 || psxBSC[58] == gteSWC2_stall);
assert(psxBSC[18] == psxCOP2 || psxBSC[18] == psxCOP2_stall);
assert(psxBSC[50] == gteLWC2 || psxBSC[50] == gteLWC2_stall);
assert(psxBSC[58] == gteSWC2 || psxBSC[58] == gteSWC2_stall);
- u32 *code;
- #ifdef ICACHE_EMULATION
- if (Config.icache_emulation)
- {
- code = Read_ICache(psxRegs.pc);
- }
- else
- #endif
- {
- code = (u32 *)PSXM(psxRegs.pc);
- }
- psxRegs.code = ((code == NULL) ? 0 : SWAP32(*code));
+ psxRegs.code = fetch(psxRegs.pc);