correct VRAM emulation.

there is room for optimizations esp. in the GPU drawing routines.
This commit is contained in:
StapleButter
2017-02-27 21:26:11 +01:00
parent dadf1eb5a5
commit 8c2572e354
7 changed files with 776 additions and 616 deletions

11
GPU2D.h
View File

@ -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);