aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Subv <subv2112@gmail.com>2015-03-08 12:05:17 -0500
committerGravatar Subv <subv2112@gmail.com>2015-03-09 20:12:39 -0500
commit414b0741c445a7960f9ad1ee4a5672f8af4760db (patch)
tree5218b976cf8e15e745a9cf6037a7c133b7559fed /src/core
parent4b8d4d0ed57bf0761736c8320c5711e728c116a1 (diff)
GPU: Implemented more depth buffer formats.
This fixes the horizontal lines in Picross E, Cubic Ninja, Cave Story 3D and possibly others
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hw/gpu.cpp4
-rw-r--r--src/core/hw/gpu.h6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/core/hw/gpu.cpp b/src/core/hw/gpu.cpp
index 424ce2ca..b7102b87 100644
--- a/src/core/hw/gpu.cpp
+++ b/src/core/hw/gpu.cpp
@@ -81,9 +81,9 @@ inline void Write(u32 addr, const T data) {
if (config.fill_24bit) {
// fill with 24-bit values
for (u8* ptr = start; ptr < end; ptr += 3) {
- ptr[0] = config.value_24bit_b;
+ ptr[0] = config.value_24bit_r;
ptr[1] = config.value_24bit_g;
- ptr[2] = config.value_24bit_r;
+ ptr[2] = config.value_24bit_b;
}
} else if (config.fill_32bit) {
// fill with 32-bit values
diff --git a/src/core/hw/gpu.h b/src/core/hw/gpu.h
index 737b1e96..5ca4a545 100644
--- a/src/core/hw/gpu.h
+++ b/src/core/hw/gpu.h
@@ -100,10 +100,10 @@ struct Regs {
// Set to 1 upon completion.
BitField<0, 1, u32> finished;
- // 0: fill with 16- or 32-bit wide values; 1: fill with 24-bit wide values
+ // If both of these bits are unset, then it will fill the memory with a 16 bit value
+ // 1: fill with 24-bit wide values
BitField<8, 1, u32> fill_24bit;
-
- // 0: fill with 16-bit wide values; 1: fill with 32-bit wide values
+ // 1: fill with 32-bit wide values
BitField<9, 1, u32> fill_32bit;
};