diff options
| author | 2015-03-05 19:38:23 -0800 | |
|---|---|---|
| committer | 2015-03-05 19:38:23 -0800 | |
| commit | 47010fea3126bfe0b675810ea9471a25191d548f (patch) | |
| tree | 73c3d747aeba48f0ac66d6c6783ae0867e4b55c3 /src/core/hw/gpu.cpp | |
| parent | Merge pull request #615 from Subv/services (diff) | |
| download | yuzu-47010fea3126bfe0b675810ea9471a25191d548f.tar.gz yuzu-47010fea3126bfe0b675810ea9471a25191d548f.tar.xz yuzu-47010fea3126bfe0b675810ea9471a25191d548f.zip | |
Implement SetLcdForceBlack, move register enum to hw.h
Diffstat (limited to 'src/core/hw/gpu.cpp')
| -rw-r--r-- | src/core/hw/gpu.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/core/hw/gpu.cpp b/src/core/hw/gpu.cpp index 424ce2ca7..9942aab1f 100644 --- a/src/core/hw/gpu.cpp +++ b/src/core/hw/gpu.cpp | |||
| @@ -15,12 +15,13 @@ | |||
| 15 | #include "core/hle/service/gsp_gpu.h" | 15 | #include "core/hle/service/gsp_gpu.h" |
| 16 | #include "core/hle/service/dsp_dsp.h" | 16 | #include "core/hle/service/dsp_dsp.h" |
| 17 | 17 | ||
| 18 | #include "core/hw/hw.h" | ||
| 18 | #include "core/hw/gpu.h" | 19 | #include "core/hw/gpu.h" |
| 19 | 20 | ||
| 20 | #include "video_core/command_processor.h" | 21 | #include "video_core/command_processor.h" |
| 21 | #include "video_core/utils.h" | 22 | #include "video_core/utils.h" |
| 22 | #include "video_core/video_core.h" | 23 | #include "video_core/video_core.h" |
| 23 | #include <video_core/color.h> | 24 | #include "video_core/color.h" |
| 24 | 25 | ||
| 25 | namespace GPU { | 26 | namespace GPU { |
| 26 | 27 | ||
| @@ -40,7 +41,7 @@ static bool last_skip_frame = false; | |||
| 40 | 41 | ||
| 41 | template <typename T> | 42 | template <typename T> |
| 42 | inline void Read(T &var, const u32 raw_addr) { | 43 | inline void Read(T &var, const u32 raw_addr) { |
| 43 | u32 addr = raw_addr - 0x1EF00000; | 44 | u32 addr = raw_addr - HW::VADDR_GPU; |
| 44 | u32 index = addr / 4; | 45 | u32 index = addr / 4; |
| 45 | 46 | ||
| 46 | // Reads other than u32 are untested, so I'd rather have them abort than silently fail | 47 | // Reads other than u32 are untested, so I'd rather have them abort than silently fail |
| @@ -54,7 +55,7 @@ inline void Read(T &var, const u32 raw_addr) { | |||
| 54 | 55 | ||
| 55 | template <typename T> | 56 | template <typename T> |
| 56 | inline void Write(u32 addr, const T data) { | 57 | inline void Write(u32 addr, const T data) { |
| 57 | addr -= 0x1EF00000; | 58 | addr -= HW::VADDR_GPU; |
| 58 | u32 index = addr / 4; | 59 | u32 index = addr / 4; |
| 59 | 60 | ||
| 60 | // Writes other than u32 are untested, so I'd rather have them abort than silently fail | 61 | // Writes other than u32 are untested, so I'd rather have them abort than silently fail |
| @@ -313,8 +314,6 @@ void Init() { | |||
| 313 | framebuffer_top.address_right2 = 0x182B9800; | 314 | framebuffer_top.address_right2 = 0x182B9800; |
| 314 | framebuffer_sub.address_left1 = 0x1848F000; | 315 | framebuffer_sub.address_left1 = 0x1848F000; |
| 315 | framebuffer_sub.address_left2 = 0x184C7800; | 316 | framebuffer_sub.address_left2 = 0x184C7800; |
| 316 | //framebuffer_sub.address_right1 = unknown; | ||
| 317 | //framebuffer_sub.address_right2 = unknown; | ||
| 318 | 317 | ||
| 319 | framebuffer_top.width = 240; | 318 | framebuffer_top.width = 240; |
| 320 | framebuffer_top.height = 400; | 319 | framebuffer_top.height = 400; |