aboutsummaryrefslogtreecommitdiff
path: root/GPU2D.h
diff options
context:
space:
mode:
authorStapleButter <thetotalworm@gmail.com>2017-02-27 21:26:11 +0100
committerStapleButter <thetotalworm@gmail.com>2017-02-27 21:26:11 +0100
commit8c2572e3549453402cff86877a89f9b715d8b447 (patch)
treeb421aae2fc1fc8e218438ff43d29da9c19e24eae /GPU2D.h
parentdadf1eb5a5403f8a71070000d06bcde2b792d2c1 (diff)
correct VRAM emulation.
there is room for optimizations esp. in the GPU drawing routines.
Diffstat (limited to 'GPU2D.h')
-rw-r--r--GPU2D.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/GPU2D.h b/GPU2D.h
index 2bd4521..0230802 100644
--- a/GPU2D.h
+++ b/GPU2D.h
@@ -39,6 +39,12 @@ public:
void DrawScanline(u32 line);
void VBlank();
+ void BGExtPalDirty(u32 base);
+ void OBJExtPalDirty();
+
+ u16* GetBGExtPal(u32 slot, u32 pal);
+ u16* GetOBJExtPal(u32 pal);
+
private:
u32 Num;
u32* Framebuffer;
@@ -58,6 +64,11 @@ private:
u32 BlendFunc;
+ u16 BGExtPalCache[4][16*256];
+ u16 OBJExtPalCache[16*256];
+ u32 BGExtPalStatus[4];
+ u32 OBJExtPalStatus;
+
template<u32 bgmode> void DrawScanlineBGMode(u32 line, u32* spritebuf, u32* dst);
void DrawScanline_Mode1(u32 line, u32* dst);