refine timing of swapbuffers more. fixes 098 regression in devil survivor 2.
This commit is contained in:
parent
0910dc507a
commit
5cda370b9d
|
@ -228,7 +228,9 @@ void GFX_FIFOsend(u8 cmd, u32 param)
|
|||
|
||||
//if a matrix op is entering the pipeline, do accounting for it
|
||||
//(this is tested by wild west, which will jam a few ops in the fifo and then wait for the matrix stack to be
|
||||
//un-busy so it can read back the current matrix stack position)
|
||||
//un-busy so it can read back the current matrix stack position).
|
||||
//it is definitely only pushes and pops which set this flag.
|
||||
//seems like it would be less work in the HW to make a counter than do cmps on all the command bytes, so maybe we're even doing it right.
|
||||
if(IsMatrixStackCommand(cmd))
|
||||
gxFIFO.matrix_stack_op_size++;
|
||||
|
||||
|
|
|
@ -1641,18 +1641,16 @@ static void execHardware_hstart()
|
|||
//check whether we'll need to fire vblank irqs
|
||||
if(T1ReadWord(MMU.ARM9_REG, 4) & 0x8) MMU.reg_IF_pending[ARMCPU_ARM9] |= (1<<IRQ_BIT_LCD_VBLANK);
|
||||
if(T1ReadWord(MMU.ARM7_REG, 4) & 0x8) MMU.reg_IF_pending[ARMCPU_ARM7] |= (1<<IRQ_BIT_LCD_VBLANK);
|
||||
}
|
||||
else if(nds.VCount==193)
|
||||
{
|
||||
//for our purposes, this block of code is the ending of the swapbuffers process.
|
||||
//it happens 392 system clocks after vblank. thats 392/6=65 dots -- not one scanline.
|
||||
//however, for convenience, we're deferring it to this scanline until we find that it needs to be more detailed
|
||||
//OR - until we restore proper emulation of 3d command timing.
|
||||
|
||||
//this is important for the character select in Dragon Ball Kai - Ultimate Butouden
|
||||
//it seems if you allow the 3d to begin before the vblank, then it will get interrupted and not complete.
|
||||
//the game needs to pick up the gxstat reg busy as clear after it finishes processing vblank.
|
||||
//therefore, this can't happen until sometime after vblank
|
||||
//therefore, this can't happen until sometime after vblank.
|
||||
//devil survivor 2 will have screens get stuck if this is on any other scanline.
|
||||
//obviously 192 is the right choice.
|
||||
gfx3d_VBlankSignal();
|
||||
//this isnt important for any known game, but it would be nice to prove it.
|
||||
NDS_RescheduleGXFIFO(392*2);
|
||||
}
|
||||
|
||||
//write the new vcount
|
||||
|
|
Loading…
Reference in New Issue