summaryrefslogtreecommitdiff
path: root/src/core/hw/gpu.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2015-03-10 18:08:55 -0400
committerGravatar bunnei2015-03-10 18:08:55 -0400
commitb56829df020a81248dd04688ff2b307f3444a09f (patch)
tree24a438627339b2d506e659adfa0873cdf037852a /src/core/hw/gpu.cpp
parentMerge pull request #649 from lioncash/clean (diff)
parentAdded LCD registers, and implementation for color filling in OGL code. (diff)
downloadyuzu-b56829df020a81248dd04688ff2b307f3444a09f.tar.gz
yuzu-b56829df020a81248dd04688ff2b307f3444a09f.tar.xz
yuzu-b56829df020a81248dd04688ff2b307f3444a09f.zip
Merge pull request #629 from archshift/lcdfb
Implement SetLcdForceBlack and add implementation for color filling in the GPU code
Diffstat (limited to 'src/core/hw/gpu.cpp')
-rw-r--r--src/core/hw/gpu.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/core/hw/gpu.cpp b/src/core/hw/gpu.cpp
index b7102b874..30318fc06 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
25namespace GPU { 26namespace GPU {
26 27
@@ -40,7 +41,7 @@ static bool last_skip_frame = false;
40 41
41template <typename T> 42template <typename T>
42inline void Read(T &var, const u32 raw_addr) { 43inline 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
55template <typename T> 56template <typename T>
56inline void Write(u32 addr, const T data) { 57inline 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;