Updated lazyusf2, now supports Turok: Dinosaur Hunter and Turok 2: Seeds of Evil, possibly others

This commit is contained in:
Chris Moeller 2015-03-03 23:39:38 -08:00
parent 3e515ec4a3
commit 6262a97203
3 changed files with 7 additions and 2 deletions

View file

@ -144,6 +144,7 @@ m64p_error main_start(usf_state_t * state)
state->no_compiled_jump = 0; state->no_compiled_jump = 0;
//state->g_delay_si = 1; //state->g_delay_si = 1;
state->g_delay_sp = 1; state->g_delay_sp = 1;
state->g_disable_tlb_write_exception = 1;
disable_extra_mem = RDRAMSize == 0x400000; disable_extra_mem = RDRAMSize == 0x400000;
state->count_per_op = COUNT_PER_OP_DEFAULT; state->count_per_op = COUNT_PER_OP_DEFAULT;
if (state->count_per_op <= 0) if (state->count_per_op <= 0)

View file

@ -90,6 +90,8 @@ unsigned int virtual_to_physical_address(usf_state_t * state, unsigned int addre
{ {
if (state->tlb_LUT_w[addresse>>12]) if (state->tlb_LUT_w[addresse>>12])
return (state->tlb_LUT_w[addresse>>12]&0xFFFFF000)|(addresse&0xFFF); return (state->tlb_LUT_w[addresse>>12]&0xFFFFF000)|(addresse&0xFFF);
else if (state->g_disable_tlb_write_exception)
return 0;
} }
else else
{ {
@ -104,6 +106,5 @@ unsigned int virtual_to_physical_address(usf_state_t * state, unsigned int addre
#endif #endif
TLB_refill_exception(state,addresse,w); TLB_refill_exception(state,addresse,w);
//return 0x80000000; //return 0x80000000;
//return 0x00000000; return 0x00000000;
return state->PC->addr;
} }

View file

@ -302,6 +302,9 @@ struct usf_state
int g_delay_sp/* = 0*/; int g_delay_sp/* = 0*/;
int g_delay_dp/* = 0*/; int g_delay_dp/* = 0*/;
// XXX enable this for some USF sets, safe to enable always
int g_disable_tlb_write_exception;
int g_gs_vi_counter/* = 0*/; int g_gs_vi_counter/* = 0*/;
unsigned int g_timer_checkpoint; unsigned int g_timer_checkpoint;