Since apparently no one feels like fixing SMG FIFO overflows, commit iceman4love77's fix. No idea if it works or what it does, he seemed pretty confident that it works though.

Only fail once if EFB pokes are requested in DX9/DX11.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5888 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
NeoBrainX 2010-07-16 21:51:35 +00:00
parent ec9871e2bc
commit aa88d8b790
3 changed files with 24 additions and 15 deletions

View File

@ -495,7 +495,7 @@ void Write16(const u16 _Value, const u32 _Address)
case FIFO_HI_WATERMARK_HI: case FIFO_HI_WATERMARK_HI:
WriteHigh((u32 &)fifo.CPHiWatermark, _Value); WriteHigh((u32 &)fifo.CPHiWatermark, _Value);
// Tune this when you see lots of FIFO overflown by GatherPipe // Tune this when you see lots of FIFO overflown by GatherPipe
HiWatermark_Tighter = fifo.CPHiWatermark - 32 * 50; HiWatermark_Tighter = fifo.CPHiWatermark - 32 * 20;
DEBUG_LOG(COMMANDPROCESSOR,"\t write to FIFO_HI_WATERMARK_HI : %04x", _Value); DEBUG_LOG(COMMANDPROCESSOR,"\t write to FIFO_HI_WATERMARK_HI : %04x", _Value);
break; break;

View File

@ -604,6 +604,15 @@ u32 Renderer::AccessEFB(EFBAccessType type, int x, int y)
if (!g_ActiveConfig.bEFBAccessEnable) if (!g_ActiveConfig.bEFBAccessEnable)
return 0; return 0;
if (type == POKE_Z || type == POKE_COLOR)
{
static bool alert_only_once = true;
if (!alert_only_once) return 0;
PanicAlert("Poke EFB not implemented");
alert_only_once = false;
return 0;
}
// get the rectangular target region covered by the EFB pixel // get the rectangular target region covered by the EFB pixel
EFBRectangle efbPixelRc; EFBRectangle efbPixelRc;
efbPixelRc.left = x; efbPixelRc.left = x;
@ -674,16 +683,12 @@ u32 Renderer::AccessEFB(EFBAccessType type, int x, int y)
z = ((u32)(val * 0xffffff)); z = ((u32)(val * 0xffffff));
break; break;
case POKE_Z:
PanicAlert("Poke Z-buffer not implemented");
break;
case PEEK_COLOR: case PEEK_COLOR:
z = ((u32*)map.pData)[0]; z = ((u32*)map.pData)[0];
break; break;
case POKE_COLOR: // TODO: Implement POKE_Z and POKE_COLOR
PanicAlert("Poke color EFB not implemented"); default:
break; break;
} }
D3D::context->Unmap(read_tex, 0); D3D::context->Unmap(read_tex, 0);

View File

@ -632,6 +632,15 @@ u32 Renderer::AccessEFB(EFBAccessType type, int x, int y)
if (!g_ActiveConfig.bEFBAccessEnable) if (!g_ActiveConfig.bEFBAccessEnable)
return 0; return 0;
if (type == POKE_Z || type == POKE_COLOR)
{
static bool alert_only_once = true;
if (!alert_only_once) return 0;
PanicAlert("Poke EFB not implemented");
alert_only_once = false;
return 0;
}
// Get the working buffer // Get the working buffer
LPDIRECT3DSURFACE9 pBuffer = (type == PEEK_Z || type == POKE_Z) ? LPDIRECT3DSURFACE9 pBuffer = (type == PEEK_Z || type == POKE_Z) ?
FBManager.GetEFBDepthRTSurface() : FBManager.GetEFBColorRTSurface(); FBManager.GetEFBDepthRTSurface() : FBManager.GetEFBColorRTSurface();
@ -792,19 +801,14 @@ u32 Renderer::AccessEFB(EFBAccessType type, int x, int y)
z = ((u32)(val * 0xffffff)); z = ((u32)(val * 0xffffff));
} }
break; break;
case POKE_Z:
// TODO: Get that Z value to poke from somewhere
//((float *)drect.pBits)[0] = val;
PanicAlert("Poke Z-buffer not implemented");
break;
case PEEK_COLOR: case PEEK_COLOR:
z = ((u32 *)drect.pBits)[0]; z = ((u32 *)drect.pBits)[0];
break; break;
case POKE_COLOR: case POKE_COLOR:
// TODO: Get that ARGB value to poke from somewhere
//((float*)drect.pBits)[0] = val; // TODO: Implement POKE_Z and POKE_COLOR
PanicAlert("Poke color EFB not implemented"); default:
break; break;
} }