an uncertain change: permit geometry commands after swapbuffers, up until vblank: this will fix some 3d games that rely on very picky timing, including some dual 3d games. but keep an eye open for totally destroyed 3d games and modes
This commit is contained in:
parent
7180336b20
commit
7a266f75b2
|
@ -471,6 +471,7 @@ struct VramConfiguration {
|
|||
case BBGEXTPAL: return "BBGEXTPAL";
|
||||
case AOBJEXTPAL: return "AOBJEXTPAL";
|
||||
case BOBJEXTPAL: return "BOBJEXTPAL";
|
||||
default: return "UNHANDLED CASE";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1729,13 +1730,13 @@ void FASTCALL _MMU_ARM9_write16(u32 adr, u16 val)
|
|||
#endif
|
||||
if(val & (1<<15))
|
||||
{
|
||||
//LOG("Main core on top\n");
|
||||
LOG("Main core on top\n");
|
||||
MainScreen.offset = 0;
|
||||
SubScreen.offset = 192;
|
||||
}
|
||||
else
|
||||
{
|
||||
//LOG("Main core on bottom (%04X)\n", val);
|
||||
LOG("Main core on bottom\n");
|
||||
MainScreen.offset = 192;
|
||||
SubScreen.offset = 0;
|
||||
}
|
||||
|
@ -1951,14 +1952,14 @@ void FASTCALL _MMU_ARM9_write16(u32 adr, u16 val)
|
|||
case REG_DISPA_DISPCAPCNT :
|
||||
{
|
||||
u32 v = (T1ReadLong(MMU.MMU_MEM[ARMCPU_ARM9][0x40], 0x64) & 0xFFFF0000) | val;
|
||||
GPU_set_DISPCAPCNT(val);
|
||||
GPU_set_DISPCAPCNT(v);
|
||||
T1WriteLong(MMU.MMU_MEM[ARMCPU_ARM9][0x40], 0x64, v);
|
||||
return;
|
||||
}
|
||||
case REG_DISPA_DISPCAPCNT + 2:
|
||||
{
|
||||
u32 v = (T1ReadLong(MMU.MMU_MEM[ARMCPU_ARM9][0x40], 0x64) & 0xFFFF) | val;
|
||||
GPU_set_DISPCAPCNT(val);
|
||||
u32 v = (T1ReadLong(MMU.MMU_MEM[ARMCPU_ARM9][0x40], 0x64) & 0xFFFF) | ((u32)val << 16);
|
||||
GPU_set_DISPCAPCNT(v);
|
||||
T1WriteLong(MMU.MMU_MEM[ARMCPU_ARM9][0x40], 0x64, v);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1815,7 +1815,7 @@ u32 NDS_exec(s32 nb)
|
|||
if(MMU.DMAStartTime[1][3] == 1)
|
||||
MMU_doDMA<ARMCPU_ARM7>(3);
|
||||
}
|
||||
else if(nds.VCount==215)
|
||||
else if(nds.VCount==214)
|
||||
{
|
||||
gfx3d_VBlankEndSignal(false);
|
||||
}
|
||||
|
|
|
@ -1343,14 +1343,24 @@ static void gfx3d_FlushFIFO()
|
|||
|
||||
void gfx3d_glFlush(u32 v)
|
||||
{
|
||||
gfx3d.frameCtr++;
|
||||
|
||||
gfx3d_FlushFIFO();
|
||||
|
||||
//assert(!flushPending);
|
||||
flushPending = TRUE;
|
||||
gfx3d.sortmode = BIT0(v);
|
||||
gfx3d.wbuffer = BIT1(v);
|
||||
}
|
||||
|
||||
void gfx3d_VBlankSignal()
|
||||
{
|
||||
//the 3d buffers are swapped when a vblank begins.
|
||||
//so, if we have a redraw pending, now is a safe time to do it
|
||||
if(!flushPending)
|
||||
{
|
||||
gfx3d_FlushFIFO();
|
||||
return;
|
||||
}
|
||||
|
||||
gfx3d.frameCtr++;
|
||||
|
||||
gfx3d_FlushFIFO();
|
||||
|
||||
// reset
|
||||
clInd = 0;
|
||||
|
@ -1378,17 +1388,6 @@ void gfx3d_glFlush(u32 v)
|
|||
|
||||
//switch to the new lists
|
||||
twiddleLists();
|
||||
}
|
||||
|
||||
void gfx3d_VBlankSignal()
|
||||
{
|
||||
//the 3d buffers are swapped when a vblank begins.
|
||||
//so, if we have a redraw pending, now is a safe time to do it
|
||||
if(!flushPending)
|
||||
{
|
||||
gfx3d_FlushFIFO();
|
||||
return;
|
||||
}
|
||||
|
||||
flushPending = FALSE;
|
||||
drawPending = TRUE;
|
||||
|
|
Loading…
Reference in New Issue