From 8c2572e3549453402cff86877a89f9b715d8b447 Mon Sep 17 00:00:00 2001 From: StapleButter Date: Mon, 27 Feb 2017 21:26:11 +0100 Subject: correct VRAM emulation. there is room for optimizations esp. in the GPU drawing routines. --- GPU2D.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'GPU2D.h') 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 void DrawScanlineBGMode(u32 line, u32* spritebuf, u32* dst); void DrawScanline_Mode1(u32 line, u32* dst); -- cgit v1.2.3