Destination alpha works in OGL. Fixed reading XFB address from VI regs and removed a check to fix games which keep the XFB some place other than mem 1.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1921 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
donkopunchstania
2009-01-18 19:03:14 +00:00
parent 1ef5eca30c
commit 4930a6d6cb
4 changed files with 101 additions and 48 deletions

View File

@ -502,7 +502,6 @@ void Update()
{
LastTime += (TicksPerFrame / LineCount);
//
VerticalBeamPos++;
if (VerticalBeamPos > LineCount)
{
@ -517,19 +516,19 @@ void Update()
if (NextXFBRender == 1)
{
NextXFBRender = LinesPerField;
// The & mask is a hack for mario kart
u32 addr = (VideoInterface::m_FrameBufferTop.Hex & 0xFFFFFFF) | 0x80000000;
if (addr >= 0x80000000 &&
addr <= (0x81800000-640*480*2))
xfbPtr = Memory::GetPointer(addr);
u32 addr = (VideoInterface::m_FrameBufferTop.Hex & 0xFFFFFFF);
if (VideoInterface::m_FrameBufferTop.Hex & 0x10000000)
addr = addr << 5;
xfbPtr = Memory::GetPointer(addr);
}
else
{
NextXFBRender = 1;
u32 addr = (VideoInterface::m_FrameBufferBottom.Hex & 0xFFFFFFF) | 0x80000000;
if (addr >= 0x80000000 &&
addr <= (0x81800000-640*480*2))
xfbPtr = Memory::GetPointer(addr);
u32 addr = (VideoInterface::m_FrameBufferBottom.Hex & 0xFFFFFFF);
// check the top buffer address not the bottom
if (VideoInterface::m_FrameBufferTop.Hex & 0x10000000)
addr = addr << 5;
xfbPtr = Memory::GetPointer(addr);
yOffset = -1;
}
Common::PluginVideo* video = CPluginManager::GetInstance().GetVideo();