diff options
author | bunnei <ericbunnie@gmail.com> | 2014-04-27 18:41:25 +0200 |
---|---|---|
committer | bunnei <ericbunnie@gmail.com> | 2014-04-27 18:41:25 +0200 |
commit | a6c925112a4e97feb21a8ae577f2993d0617cb1f (patch) | |
tree | 7f2a8c71696400e0b6e0568c7e0da51add715044 | |
parent | added helper functions to mem_map to convert physical addresses to virtual addresses (diff) | |
download | yuzu-a6c925112a4e97feb21a8ae577f2993d0617cb1f.tar yuzu-a6c925112a4e97feb21a8ae577f2993d0617cb1f.tar.gz yuzu-a6c925112a4e97feb21a8ae577f2993d0617cb1f.tar.bz2 yuzu-a6c925112a4e97feb21a8ae577f2993d0617cb1f.tar.lz yuzu-a6c925112a4e97feb21a8ae577f2993d0617cb1f.tar.xz yuzu-a6c925112a4e97feb21a8ae577f2993d0617cb1f.tar.zst yuzu-a6c925112a4e97feb21a8ae577f2993d0617cb1f.zip |
-rw-r--r-- | src/core/hle/service/gsp.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/core/hle/service/gsp.cpp b/src/core/hle/service/gsp.cpp index 24e9f18dc..88c1f1a0f 100644 --- a/src/core/hle/service/gsp.cpp +++ b/src/core/hle/service/gsp.cpp @@ -23,8 +23,8 @@ enum { /// Read a GSP GPU hardware register void ReadHWRegs(Service::Interface* self) { - static const u32 framebuffer_1[] = {LCD::VRAM_TOP_LEFT_FRAME1, LCD::VRAM_TOP_RIGHT_FRAME1}; - static const u32 framebuffer_2[] = {LCD::VRAM_TOP_LEFT_FRAME2, LCD::VRAM_TOP_RIGHT_FRAME2}; + static const u32 framebuffer_1[] = {LCD::PADDR_VRAM_TOP_LEFT_FRAME1, LCD::PADDR_VRAM_TOP_RIGHT_FRAME1}; + static const u32 framebuffer_2[] = {LCD::PADDR_VRAM_TOP_LEFT_FRAME2, LCD::PADDR_VRAM_TOP_RIGHT_FRAME2}; u32* cmd_buff = (u32*)HLE::GetPointer(HLE::CMD_BUFFER_ADDR + Service::kCommandHeaderOffset); u32 reg_addr = cmd_buff[1]; @@ -33,14 +33,20 @@ void ReadHWRegs(Service::Interface* self) { switch (reg_addr) { + // NOTE: Calling SetFramebufferLocation here is a hack... Not sure the correct way yet to set + // whether the framebuffers should be in VRAM or GSP heap, but from what I understand, if the + // user application is reading from either of these registers, then its going to be in VRAM. + // Top framebuffer 1 addresses case REG_FRAMEBUFFER_1: + LCD::SetFramebufferLocation(LCD::FRAMEBUFFER_LOCATION_VRAM); memcpy(dst, framebuffer_1, size); break; // Top framebuffer 2 addresses case REG_FRAMEBUFFER_2: - memcpy(dst, framebuffer_1, size); + LCD::SetFramebufferLocation(LCD::FRAMEBUFFER_LOCATION_VRAM); + memcpy(dst, framebuffer_2, size); break; default: |