[GSP::GPU] Add PSC0, PSC1 interrupts, set error flag in GSP shared mem to 0 on IRQ (Fixes Citro3D hang)
This commit is contained in:
@@ -103,7 +103,8 @@ void GPUService::requestInterrupt(GPUInterrupt type) {
|
|||||||
u8 flagIndex = (index + interruptCount) % 0x34;
|
u8 flagIndex = (index + interruptCount) % 0x34;
|
||||||
interruptCount++;
|
interruptCount++;
|
||||||
|
|
||||||
sharedMem[0xC + flagIndex] = static_cast<u8>(type);
|
sharedMem[2] = 0; // Set error code to 0
|
||||||
|
sharedMem[0xC + flagIndex] = static_cast<u8>(type); // Write interrupt type to queue
|
||||||
}
|
}
|
||||||
|
|
||||||
void GPUService::writeHwRegs(u32 messagePointer) {
|
void GPUService::writeHwRegs(u32 messagePointer) {
|
||||||
@@ -271,10 +272,12 @@ void GPUService::memoryFill(u32* cmd) {
|
|||||||
|
|
||||||
if (start0 != 0) {
|
if (start0 != 0) {
|
||||||
gpu.clearBuffer(start0, end0, value0, control0);
|
gpu.clearBuffer(start0, end0, value0, control0);
|
||||||
|
requestInterrupt(GPUInterrupt::PSC0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (start1 != 0) {
|
if (start1 != 0) {
|
||||||
gpu.clearBuffer(start1, end1, value1, control1);
|
gpu.clearBuffer(start1, end1, value1, control1);
|
||||||
|
requestInterrupt(GPUInterrupt::PSC1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -111,11 +111,17 @@ int main()
|
|||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
// Render the scene
|
// Render the scene
|
||||||
|
emuPrint("Entering C3D_FrameBegin");
|
||||||
C3D_FrameBegin(C3D_FRAME_SYNCDRAW);
|
C3D_FrameBegin(C3D_FRAME_SYNCDRAW);
|
||||||
|
emuPrint("Clearing render target");
|
||||||
C3D_RenderTargetClear(target, C3D_CLEAR_ALL, CLEAR_COLOR, 0);
|
C3D_RenderTargetClear(target, C3D_CLEAR_ALL, CLEAR_COLOR, 0);
|
||||||
|
emuPrint("Calling C3D_FrameDrawOn");
|
||||||
C3D_FrameDrawOn(target);
|
C3D_FrameDrawOn(target);
|
||||||
|
emuPrint("Calling sceneRender");
|
||||||
sceneRender();
|
sceneRender();
|
||||||
|
emuPrint("Entering C3D_FrameEnd");
|
||||||
C3D_FrameEnd(0);
|
C3D_FrameEnd(0);
|
||||||
|
emuPrint("Exited C3D_FrameEnd");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deinitialize the scene
|
// Deinitialize the scene
|
||||||
|
|||||||
Reference in New Issue
Block a user