diff --git a/desmume/src/GPU.cpp b/desmume/src/GPU.cpp index 07e39a91d..1caf50281 100644 --- a/desmume/src/GPU.cpp +++ b/desmume/src/GPU.cpp @@ -2224,12 +2224,9 @@ void GPU::_spriteRender(u8 * dst, u8 * dst_alpha, u8 * typeTab, u8 * prioTab) if (auxX >= 0 && auxY >= 0 && auxX < sprSize.x && auxY < sprSize.y) { - if(MODE == SPRITE_2D) - //tested by buffy sacrifice damage blood splatters in corner - offset = auxX + (auxY*sprSize.x); - else - //NOT TESTED - offset = (auxX) + (auxY<<5); + //if(MODE == SPRITE_2D) //tested by buffy sacrifice damage blood splatters in corner + //else //tested by lego indiana jones + offset = auxX + (auxY*sprSize.x); colour = T1ReadWord (src, offset<<1); diff --git a/desmume/src/MMU.cpp b/desmume/src/MMU.cpp index 703fc9a42..a9cbd5dbd 100644 --- a/desmume/src/MMU.cpp +++ b/desmume/src/MMU.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include "common.h" #include "debug.h" @@ -438,6 +439,54 @@ void DMAtoVRAMmapping() #define LOG_VRAM_ERROR() LOG("No data for block %i MST %i\n", block, VRAMBankCnt & 0x07); + +struct VramConfiguration { + + enum Purpose { + OFF, INVALID, ABG, BBG, AOBJ, BOBJ, LCDC, ARM7, TEX, TEXPAL, ABGEXTPAL, BBGEXTPAL, AOBJEXTPAL, BOBJEXTPAL + }; + + struct BankInfo { + Purpose purpose; + int ofs; + } banks[VRAM_BANKS]; + + void clear() { + for(int i=0;i