X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=libpcsxcore%2Fnew_dynarec%2Fnew_dynarec.c;h=f1a0def673a2ceb459e7a47e06bac9786256eeea;hp=347fd3dd31fb0c25b5c35fb4954671acb4fe3be3;hb=b1f390b38ff77b8229e33968d768eabdad433082;hpb=560e4a12086100ab0cf513171e4160e86a80b604 diff --git a/libpcsxcore/new_dynarec/new_dynarec.c b/libpcsxcore/new_dynarec/new_dynarec.c index 347fd3dd..f1a0def6 100644 --- a/libpcsxcore/new_dynarec/new_dynarec.c +++ b/libpcsxcore/new_dynarec/new_dynarec.c @@ -385,9 +385,6 @@ void *get_addr(u_int vaddr) //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; @@ -396,7 +393,6 @@ void *get_addr(u_int vaddr) 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) @@ -3696,7 +3692,7 @@ void mov_assemble(int i,struct regstat *i_regs) { //if(opcode2[i]==0x10||opcode2[i]==0x12) { // MFHI/MFLO //if(opcode2[i]==0x11||opcode2[i]==0x13) { // MTHI/MTLO - assert(rt1[i]>0); + //assert(rt1[i]>0); if(rt1[i]) { signed char sh,sl,th,tl; th=get_reg(i_regs->regmap,rt1[i]|64); @@ -7747,8 +7743,7 @@ int new_recompile_block(int addr) 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; @@ -7760,10 +7755,7 @@ int new_recompile_block(int addr) #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 || @@ -8696,7 +8688,8 @@ int new_recompile_block(int addr) if (rt1[i]==31) { alloc_reg(¤t,i,31); dirty_reg(¤t,31); - assert(rs1[i+1]!=31&&rs2[i+1]!=31); + //assert(rs1[i+1]!=31&&rs2[i+1]!=31); + assert(rt1[i+1]!=rt1[i]); #ifdef REG_PREFETCH alloc_reg(¤t,i,PTEMP); #endif @@ -8720,7 +8713,8 @@ int new_recompile_block(int addr) if (rt1[i]!=0) { alloc_reg(¤t,i,rt1[i]); dirty_reg(¤t,rt1[i]); - assert(rs1[i+1]!=31&&rs2[i+1]!=31); + //assert(rs1[i+1]!=31&&rs2[i+1]!=31); + assert(rt1[i+1]!=rt1[i]); #ifdef REG_PREFETCH alloc_reg(¤t,i,PTEMP); #endif @@ -10515,6 +10509,19 @@ int new_recompile_block(int addr) 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