diff options
| author | 2014-12-15 21:28:45 +0100 | |
|---|---|---|
| committer | 2014-12-20 18:06:53 +0100 | |
| commit | 40f123b7c0eaf1507d51f6b87192ec2f956e5d5e (patch) | |
| tree | 7f87847435d510ed0e70a10cd67129a3b2511335 /src/citra_qt/debugger/graphics_framebuffer.cpp | |
| parent | Pica: Further improve Tev emulation. (diff) | |
| download | yuzu-40f123b7c0eaf1507d51f6b87192ec2f956e5d5e.tar.gz yuzu-40f123b7c0eaf1507d51f6b87192ec2f956e5d5e.tar.xz yuzu-40f123b7c0eaf1507d51f6b87192ec2f956e5d5e.zip | |
Pica: Unify ugly address translation hacks.
Diffstat (limited to 'src/citra_qt/debugger/graphics_framebuffer.cpp')
| -rw-r--r-- | src/citra_qt/debugger/graphics_framebuffer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/citra_qt/debugger/graphics_framebuffer.cpp b/src/citra_qt/debugger/graphics_framebuffer.cpp index c055299a4..484be1db5 100644 --- a/src/citra_qt/debugger/graphics_framebuffer.cpp +++ b/src/citra_qt/debugger/graphics_framebuffer.cpp | |||
| @@ -199,7 +199,7 @@ void GraphicsFramebufferWidget::OnUpdate() | |||
| 199 | auto framebuffer = Pica::registers.framebuffer; | 199 | auto framebuffer = Pica::registers.framebuffer; |
| 200 | using Framebuffer = decltype(framebuffer); | 200 | using Framebuffer = decltype(framebuffer); |
| 201 | 201 | ||
| 202 | framebuffer_address = framebuffer.GetColorBufferAddress(); | 202 | framebuffer_address = framebuffer.GetColorBufferPhysicalAddress(); |
| 203 | framebuffer_width = framebuffer.GetWidth(); | 203 | framebuffer_width = framebuffer.GetWidth(); |
| 204 | framebuffer_height = framebuffer.GetHeight(); | 204 | framebuffer_height = framebuffer.GetHeight(); |
| 205 | framebuffer_format = static_cast<Format>(framebuffer.color_format); | 205 | framebuffer_format = static_cast<Format>(framebuffer.color_format); |
| @@ -224,7 +224,7 @@ void GraphicsFramebufferWidget::OnUpdate() | |||
| 224 | case Format::RGBA8: | 224 | case Format::RGBA8: |
| 225 | { | 225 | { |
| 226 | QImage decoded_image(framebuffer_width, framebuffer_height, QImage::Format_ARGB32); | 226 | QImage decoded_image(framebuffer_width, framebuffer_height, QImage::Format_ARGB32); |
| 227 | u32* color_buffer = (u32*)Memory::GetPointer(framebuffer_address); | 227 | u32* color_buffer = (u32*)Memory::GetPointer(Pica::PAddrToVAddr(framebuffer_address)); |
| 228 | for (unsigned y = 0; y < framebuffer_height; ++y) { | 228 | for (unsigned y = 0; y < framebuffer_height; ++y) { |
| 229 | for (unsigned x = 0; x < framebuffer_width; ++x) { | 229 | for (unsigned x = 0; x < framebuffer_width; ++x) { |
| 230 | u32 value = *(color_buffer + x + y * framebuffer_width); | 230 | u32 value = *(color_buffer + x + y * framebuffer_width); |
| @@ -239,7 +239,7 @@ void GraphicsFramebufferWidget::OnUpdate() | |||
| 239 | case Format::RGB8: | 239 | case Format::RGB8: |
| 240 | { | 240 | { |
| 241 | QImage decoded_image(framebuffer_width, framebuffer_height, QImage::Format_ARGB32); | 241 | QImage decoded_image(framebuffer_width, framebuffer_height, QImage::Format_ARGB32); |
| 242 | u8* color_buffer = Memory::GetPointer(framebuffer_address); | 242 | u8* color_buffer = Memory::GetPointer(Pica::PAddrToVAddr(framebuffer_address)); |
| 243 | for (unsigned y = 0; y < framebuffer_height; ++y) { | 243 | for (unsigned y = 0; y < framebuffer_height; ++y) { |
| 244 | for (unsigned x = 0; x < framebuffer_width; ++x) { | 244 | for (unsigned x = 0; x < framebuffer_width; ++x) { |
| 245 | u8* pixel_pointer = color_buffer + x * 3 + y * 3 * framebuffer_width; | 245 | u8* pixel_pointer = color_buffer + x * 3 + y * 3 * framebuffer_width; |
| @@ -254,7 +254,7 @@ void GraphicsFramebufferWidget::OnUpdate() | |||
| 254 | case Format::RGBA5551: | 254 | case Format::RGBA5551: |
| 255 | { | 255 | { |
| 256 | QImage decoded_image(framebuffer_width, framebuffer_height, QImage::Format_ARGB32); | 256 | QImage decoded_image(framebuffer_width, framebuffer_height, QImage::Format_ARGB32); |
| 257 | u32* color_buffer = (u32*)Memory::GetPointer(framebuffer_address); | 257 | u32* color_buffer = (u32*)Memory::GetPointer(Pica::PAddrToVAddr(framebuffer_address)); |
| 258 | for (unsigned y = 0; y < framebuffer_height; ++y) { | 258 | for (unsigned y = 0; y < framebuffer_height; ++y) { |
| 259 | for (unsigned x = 0; x < framebuffer_width; ++x) { | 259 | for (unsigned x = 0; x < framebuffer_width; ++x) { |
| 260 | u16 value = *(u16*)(((u8*)color_buffer) + x * 2 + y * framebuffer_width * 2); | 260 | u16 value = *(u16*)(((u8*)color_buffer) + x * 2 + y * framebuffer_width * 2); |