Round TA_ISP_BASE to 1 MB.

Some games do not align TA_ISP_BASE on 1 MB boundary so the rendering
context is not found at render time. Fixes black screen in NFL 2K2, NBA
2K2, Oooga Booga, Floigan Bros. and probably more Visual Concepts games.
Sadly Ooga Booga still crashes.
This commit is contained in:
Flyinghead 2018-07-03 14:22:44 +02:00
parent 69263eddc0
commit e7d1688ae5
1 changed files with 6 additions and 3 deletions

View File

@ -273,16 +273,19 @@ NOINLINE void DYNACALL ta_handle_cmd(u32 trans)
static OnLoad ol_fillfsm(&fill_fsm);
#define TA_ISP_BASE_MASK (~((1 << 20) - 1)) // Define TA_ISP_BASE in 1 MB units like PARAM_BASE
void ta_vtx_ListCont()
{
SetCurrentTARC(TA_ISP_BASE);
SetCurrentTARC(TA_ISP_BASE & TA_ISP_BASE_MASK);
ta_tad.Continue();
ta_cur_state=TAS_NS;
}
void ta_vtx_ListInit()
{
SetCurrentTARC(TA_ISP_BASE);
u32 base = TA_ISP_BASE & TA_ISP_BASE_MASK;
SetCurrentTARC(base);
ta_tad.ClearPartial();
ta_cur_state=TAS_NS;
@ -361,4 +364,4 @@ void ta_vtx_data(u32* data, u32 size)
data+=8;
size--;
}
}
}