//printf("TRACE: count=%d next=%d (get_addr no-match %x)\n",Count,next_interupt,vaddr);
int r=new_recompile_block(vaddr);
if(r==0) return get_addr(vaddr);
-#ifdef PCSX
- return (void *)r;
-#else
// Execute in unmapped page, generate pagefault execption
Status|=2;
Cause=(vaddr<<31)|0x8;
Context=(Context&0xFF80000F)|((BadVAddr>>9)&0x007FFFF0);
EntryHi=BadVAddr&0xFFFFE000;
return get_addr_ht(0x80000000);
-#endif
}
// Look up address in hash table first
void *get_addr_ht(u_int vaddr)
start = (u_int)addr&~3;
//assert(((u_int)addr&1)==0);
#ifdef PCSX
- if ((Config.HLE && start == 0x80001000) || // hlecall
- (/*psxRegs.pc != 0x80030000 &&*/ start == 0x80030000)) // fastbios thing
+ if (Config.HLE && start == 0x80001000) // hlecall
{
// XXX: is this enough? Maybe check hleSoftCall?
u_int beginning=(u_int)out;
#ifdef __arm__
__clear_cache((void *)beginning,out);
#endif
- if (start == 0x80030000)
- return beginning;
- else
- ll_add(jump_in+page,start,(void *)beginning);
+ ll_add(jump_in+page,start,(void *)beginning);
return 0;
}
else if ((u_int)addr < 0x00200000 ||
ds=1;
pagespan_ds();
}
+ u_int instr_addr0_override=0;
+
+#ifdef PCSX
+ if (start == 0x80030000) {
+ // nasty hack for fastbios thing
+ instr_addr0_override=(u_int)out;
+ emit_movimm(start,0);
+ emit_readword((int)&pcaddr,1);
+ emit_writeword(0,(int)&pcaddr);
+ emit_cmp(0,1);
+ emit_jne((int)new_dyna_leave);
+ }
+#endif
for(i=0;i<slen;i++)
{
//if(ds) printf("ds: ");
}
}
+ if (instr_addr0_override)
+ instr_addr[0] = instr_addr0_override;
+
/* Pass 9 - Linker */
for(i=0;i<linkcount;i++)
{