From ec9511e1db1f7ff0c2a8f86916937ea5736cdcf6 Mon Sep 17 00:00:00 2001 From: Tony Wasserka Date: Sun, 1 Jun 2014 00:22:40 +0200 Subject: GSP: HLE GXCommandId::SET_DISPLAY_TRANSFER and GXCommandId::SET_TEXTURE_COPY. --- src/core/hle/service/gsp.cpp | 11 +++++++++-- src/core/hw/gpu.h | 8 ++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/core/hle/service/gsp.cpp b/src/core/hle/service/gsp.cpp index cc111b0bb..fea521891 100644 --- a/src/core/hle/service/gsp.cpp +++ b/src/core/hle/service/gsp.cpp @@ -176,10 +176,17 @@ void TriggerCmdReqQueue(Service::Interface* self) { case GXCommandId::SET_MEMORY_FILL: break; + // TODO: Check if texture copies are implemented correctly.. case GXCommandId::SET_DISPLAY_TRANSFER: - break; - case GXCommandId::SET_TEXTURE_COPY: + GPU::Write(GPU::Registers::DisplayInputBufferAddr, cmd_buff[1] >> 3); + GPU::Write(GPU::Registers::DisplayOutputBufferAddr, cmd_buff[2] >> 3); + GPU::Write(GPU::Registers::DisplayInputBufferSize, cmd_buff[3]); + GPU::Write(GPU::Registers::DisplayOutputBufferSize, cmd_buff[4]); + GPU::Write(GPU::Registers::DisplayTransferFlags, cmd_buff[5]); + + // TODO: GPU::Registers::DisplayTriggerTransfer should be ORed with 1 for texture copies? + GPU::Write(GPU::Registers::DisplayTriggerTransfer, 1); break; case GXCommandId::SET_COMMAND_LIST_FIRST: diff --git a/src/core/hw/gpu.h b/src/core/hw/gpu.h index 0c7dffec3..58058d732 100644 --- a/src/core/hw/gpu.h +++ b/src/core/hw/gpu.h @@ -22,6 +22,14 @@ struct Registers { FramebufferSubRight1 = 0x1EF00594, // Sub LCD, unused first framebuffer FramebufferSubRight2 = 0x1EF00598, // Sub LCD, unused second framebuffer + DisplayInputBufferAddr = 0x1EF00C00, + DisplayOutputBufferAddr = 0x1EF00C04, + DisplayOutputBufferSize = 0x1EF00C08, + DisplayInputBufferSize = 0x1EF00C0C, + DisplayTransferFlags = 0x1EF00C10, + // Unknown?? + DisplayTriggerTransfer = 0x1EF00C18, + CommandListSize = 0x1EF018E0, CommandListAddress = 0x1EF018E8, ProcessCommandList = 0x1EF018F0, -- cgit v1.2.3