check for duplicated stack addresses

Based on https://code.google.com/p/jpcsp/source/detail?r=3569

Fix WWE SmackDown! vs. RAW 2006
This commit is contained in:
JimLee168 2014-08-13 21:15:30 +08:00 committed by sum2012
parent 3c19eda851
commit 8099281928
3 changed files with 8 additions and 1 deletions

View File

@ -43,7 +43,7 @@ struct PspGeListArgs
SceSize_le size;
PSPPointer<u32_le> context;
u32_le numStacks;
u32_le unknown1;
u32_le stackAddr;
};
void Register_sceGe_user();

View File

@ -210,6 +210,7 @@ u32 GPUCommon::EnqueueList(u32 listpc, u32 stall, int subIntrBase, PSPPointer<Ps
int id = -1;
u64 currentTicks = CoreTiming::GetTicks();
u32_le stackAddr = args.IsValid() ? args->stackAddr : 0;
// Check compatibility
if (sceKernelGetCompiledSdkVersion() > 0x01FFFFFF) {
//numStacks = 0;
@ -222,6 +223,10 @@ u32 GPUCommon::EnqueueList(u32 listpc, u32 stall, int subIntrBase, PSPPointer<Ps
ERROR_LOG(G3D, "sceGeListEnqueue: can't enqueue, list address %08X already used", listpc);
return 0x80000021;
}
else if (stackAddr != 0 && dls[i].stackAddr == stackAddr && !dls[i].pendingInterrupt) {
ERROR_LOG(G3D, "sceGeListEnqueue: can't enqueue, stack address %08X already used", stackAddr);
return 0x80000021;
}
}
}
}
@ -266,6 +271,7 @@ u32 GPUCommon::EnqueueList(u32 listpc, u32 stall, int subIntrBase, PSPPointer<Ps
dl.started = false;
dl.offsetAddr = 0;
dl.bboxResult = false;
dl.stackAddr = stackAddr;
if (args.IsValid() && args->context.IsValid())
dl.context = args->context;

View File

@ -142,6 +142,7 @@ struct DisplayList
PSPPointer<u32_le> context;
u32 offsetAddr;
bool bboxResult;
u32_le stackAddr;
};
enum GPUInvalidationType {