add some diagnostic messages

This commit is contained in:
zeromus 2009-01-26 18:43:34 +00:00
parent 4e9176a4c0
commit 2df831cbb0
3 changed files with 16 additions and 1 deletions

View File

@ -51,6 +51,7 @@
#include "render3D.h"
#include "GPU_osd.h"
#include "debug.h"
#include "NDSSystem.h"
//#define CHECKSPRITES
@ -430,6 +431,7 @@ u16 GPU::blend(u16 colA, u16 colB)
void GPU_setMasterBrightness (GPU *gpu, u16 val)
{
if(!nds.isInVblank()) PROGINFO("Changing master brightness outside of vblank\n");
gpu->MasterBrightFactor = (val & 0x1F);
gpu->MasterBrightMode = (val>>14);
}

View File

@ -598,6 +598,8 @@ static inline void MMU_VRAMmapControl(u8 block, u8 VRAMBankCnt)
u32 vram_map_addr = 0xFFFFFFFF;
u8 *LCD_addr = LCDdst[block];
bool changingTexOrTexPalette = false;
switch (VRAMBankCnt & 0x07)
{
case 1:
@ -674,6 +676,7 @@ static inline void MMU_VRAMmapControl(u8 block, u8 VRAMBankCnt)
case 3: // D
// Textures
{
changingTexOrTexPalette = true;
int slot_index = (VRAMBankCnt >> 3) & 0x3;
ARM9Mem.textureSlotAddr[slot_index] = LCD_addr;
gpu3D->NDS_3D_VramReconfigureSignal();
@ -682,6 +685,7 @@ static inline void MMU_VRAMmapControl(u8 block, u8 VRAMBankCnt)
}
break;
case 4: // E
changingTexOrTexPalette = true;
ARM9Mem.texPalSlot[0] = LCD_addr;
ARM9Mem.texPalSlot[1] = LCD_addr+0x4000;
ARM9Mem.texPalSlot[2] = LCD_addr+0x8000;
@ -691,6 +695,7 @@ static inline void MMU_VRAMmapControl(u8 block, u8 VRAMBankCnt)
case 5: // F
case 6: // G
{
changingTexOrTexPalette = true;
u8 tmp_slot = ((VRAMBankCnt >> 3) & 0x01) + (((VRAMBankCnt >> 4) & 0x01)*4);
ARM9Mem.texPalSlot[tmp_slot] = LCD_addr;
gpu3D->NDS_3D_VramReconfigureSignal();
@ -746,6 +751,11 @@ static inline void MMU_VRAMmapControl(u8 block, u8 VRAMBankCnt)
break;
}
if(changingTexOrTexPalette && !nds.isIn3dVblank())
{
PROGINFO("Changing texture or texture palette mappings outside of 3d vblank\n");
}
if (vram_map_addr != 0xFFFFFFFF)
{
u8 engine = (vram_map_addr >> 21);

View File

@ -131,6 +131,9 @@ typedef struct
s32 idleCycles;
s32 runCycleCollector[16];
s32 idleFrameCounter;
bool isInVblank() const { return VCount >= 192; }
bool isIn3dVblank() const { return VCount >= 192 && VCount<215; }
} NDSSystem;
/** /brief A touchscreen calibration point.