Silence some debug messages related to the MASTER_BRIGHT register.
- Now that Mega Man Zero Collection has proven that it is perfectly legal to set MASTER_BRIGHT within V-blank, remove the related debug message. - Properly silence the texture memory debug message when the MASTER_BRIGHT intensity is 0.
This commit is contained in:
parent
f230067524
commit
0628cb5756
|
@ -495,6 +495,7 @@ void GPUEngineBase::_Reset_Base()
|
|||
renderState.masterBrightnessMode = GPUMasterBrightMode_Disable;
|
||||
renderState.masterBrightnessIntensity = 0;
|
||||
renderState.masterBrightnessIsFullIntensity = false;
|
||||
renderState.masterBrightnessIsMaxOrMin = true;
|
||||
renderState.blendTable555 = (TBlendTable *)&GPUEngineBase::_blendTable555[renderState.blendEVA][renderState.blendEVB][0][0];
|
||||
renderState.brightnessUpTable555 = &GPUEngineBase::_brightnessUpTable555[renderState.blendEVY][0];
|
||||
renderState.brightnessUpTable666 = &GPUEngineBase::_brightnessUpTable666[renderState.blendEVY][0];
|
||||
|
@ -1123,15 +1124,10 @@ void GPUEngineBase::ParseReg_MASTER_BRIGHT()
|
|||
const IOREG_MASTER_BRIGHT &MASTER_BRIGHT = this->_IORegisterMap->MASTER_BRIGHT;
|
||||
GPUEngineRenderState &renderState = this->_currentRenderState;
|
||||
|
||||
if (!nds.isInVblank())
|
||||
{
|
||||
PROGINFO("Changing master brightness outside of vblank, line=%d\n", nds.VCount);
|
||||
}
|
||||
|
||||
renderState.masterBrightnessIntensity = (MASTER_BRIGHT.Intensity >= 16) ? 16 : MASTER_BRIGHT.Intensity;
|
||||
renderState.masterBrightnessMode = (GPUMasterBrightMode)MASTER_BRIGHT.Mode;
|
||||
renderState.masterBrightnessIsFullIntensity = ( (MASTER_BRIGHT.Intensity >= 16) && ((MASTER_BRIGHT.Mode == GPUMasterBrightMode_Up) || (MASTER_BRIGHT.Mode == GPUMasterBrightMode_Down)) );
|
||||
//printf("MASTER BRIGHTNESS %d to %d at %d\n", this->_engineID, MASTER_BRIGHT.Intensity, nds.VCount);
|
||||
renderState.masterBrightnessIsMaxOrMin = ( (MASTER_BRIGHT.Intensity >= 16) || (MASTER_BRIGHT.Intensity == 0) );
|
||||
}
|
||||
|
||||
//Sets up LCD control variables for Display Engines A and B for quick reading
|
||||
|
@ -1396,11 +1392,16 @@ const GPU_IOREG& GPUEngineBase::GetIORegisterMap() const
|
|||
return *this->_IORegisterMap;
|
||||
}
|
||||
|
||||
bool GPUEngineBase::GetIsMasterBrightFullIntensity() const
|
||||
bool GPUEngineBase::IsMasterBrightFullIntensity() const
|
||||
{
|
||||
return this->_currentRenderState.masterBrightnessIsFullIntensity;
|
||||
}
|
||||
|
||||
bool GPUEngineBase::IsMasterBrightMaxOrMin() const
|
||||
{
|
||||
return this->_currentRenderState.masterBrightnessIsMaxOrMin;
|
||||
}
|
||||
|
||||
bool GPUEngineBase::IsMasterBrightFullIntensityAtLineZero() const
|
||||
{
|
||||
return this->_currentCompositorInfo[0].renderState.masterBrightnessIsFullIntensity;
|
||||
|
@ -3470,6 +3471,7 @@ void GPUEngineBase::SpriteRenderDebug(const u16 lineIndex, u16 *dst)
|
|||
compInfo.renderState.colorEffect = ColorEffect_Disable;
|
||||
compInfo.renderState.masterBrightnessMode = GPUMasterBrightMode_Disable;
|
||||
compInfo.renderState.masterBrightnessIsFullIntensity = false;
|
||||
compInfo.renderState.masterBrightnessIsMaxOrMin = true;
|
||||
compInfo.renderState.spriteRenderMode = this->_currentRenderState.spriteRenderMode;
|
||||
compInfo.renderState.spriteBoundary = this->_currentRenderState.spriteBoundary;
|
||||
compInfo.renderState.spriteBMPBoundary = this->_currentRenderState.spriteBMPBoundary;
|
||||
|
@ -4577,6 +4579,7 @@ void GPUEngineBase::RenderLayerBG(const GPULayerID layerID, u16 *dstColorBuffer)
|
|||
compInfo.renderState.colorEffect = ColorEffect_Disable;
|
||||
compInfo.renderState.masterBrightnessMode = GPUMasterBrightMode_Disable;
|
||||
compInfo.renderState.masterBrightnessIsFullIntensity = false;
|
||||
compInfo.renderState.masterBrightnessIsMaxOrMin = true;
|
||||
compInfo.renderState.spriteRenderMode = this->_currentRenderState.spriteRenderMode;
|
||||
compInfo.renderState.spriteBoundary = this->_currentRenderState.spriteBoundary;
|
||||
compInfo.renderState.spriteBMPBoundary = this->_currentRenderState.spriteBMPBoundary;
|
||||
|
|
|
@ -1149,6 +1149,7 @@ typedef struct
|
|||
GPUMasterBrightMode masterBrightnessMode;
|
||||
u8 masterBrightnessIntensity;
|
||||
bool masterBrightnessIsFullIntensity;
|
||||
bool masterBrightnessIsMaxOrMin;
|
||||
|
||||
TBlendTable *blendTable555;
|
||||
u16 *brightnessUpTable555;
|
||||
|
@ -1450,7 +1451,8 @@ public:
|
|||
|
||||
const GPU_IOREG& GetIORegisterMap() const;
|
||||
|
||||
bool GetIsMasterBrightFullIntensity() const;
|
||||
bool IsMasterBrightFullIntensity() const;
|
||||
bool IsMasterBrightMaxOrMin() const;
|
||||
bool IsMasterBrightFullIntensityAtLineZero() const;
|
||||
void GetMasterBrightnessAtLineZero(GPUMasterBrightMode &outMode, u8 &outIntensity);
|
||||
|
||||
|
|
|
@ -154,8 +154,7 @@ static MemSpan MemSpan_TexMem(u32 ofs, u32 len)
|
|||
currofs += curr.len;
|
||||
u8* ptr = MMU.texInfo.textureSlotAddr[slot];
|
||||
|
||||
//TODO - dont alert if the masterbrightnesses are max or min
|
||||
if (ptr == MMU.blank_memory && !GPU->GetEngineMain()->GetIsMasterBrightFullIntensity()) {
|
||||
if (ptr == MMU.blank_memory && !GPU->GetEngineMain()->IsMasterBrightMaxOrMin()) {
|
||||
PROGINFO("Tried to reference unmapped texture memory: slot %d\n",slot);
|
||||
}
|
||||
curr.ptr = ptr + curr.start;
|
||||
|
@ -186,8 +185,7 @@ static MemSpan MemSpan_TexPalette(u32 ofs, u32 len, bool silent)
|
|||
currofs += curr.len;
|
||||
u8* ptr = MMU.texInfo.texPalSlot[slot];
|
||||
|
||||
//TODO - dont alert if the masterbrightnesses are max or min
|
||||
if(ptr == MMU.blank_memory && !GPU->GetEngineMain()->GetIsMasterBrightFullIntensity() && !silent) {
|
||||
if(ptr == MMU.blank_memory && !GPU->GetEngineMain()->IsMasterBrightMaxOrMin() && !silent) {
|
||||
PROGINFO("Tried to reference unmapped texture palette memory: 16k slot #%d\n",slot);
|
||||
}
|
||||
curr.ptr = ptr + curr.start;
|
||||
|
|
Loading…
Reference in New Issue