From e7d1688ae54618c7711b0d28927794890b5eb88b Mon Sep 17 00:00:00 2001 From: Flyinghead Date: Tue, 3 Jul 2018 14:22:44 +0200 Subject: [PATCH] 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. --- core/hw/pvr/ta.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/hw/pvr/ta.cpp b/core/hw/pvr/ta.cpp index 336c1119e..dd8d4b8a9 100644 --- a/core/hw/pvr/ta.cpp +++ b/core/hw/pvr/ta.cpp @@ -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--; } -} \ No newline at end of file +}