mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-22 22:01:06 -06:00
GPU2D: hardware renders sprites one scanline in advance.
fixes #375 (midframe OAM update)
This commit is contained in:
12
src/GPU.cpp
12
src/GPU.cpp
@ -871,12 +871,24 @@ void StartHBlank(u32 line)
|
||||
GPU2D_B->DrawScanline(line);
|
||||
}
|
||||
|
||||
// sprites are pre-rendered one scanline in advance
|
||||
if (line < 191)
|
||||
{
|
||||
GPU2D_A->DrawSprites(line+1);
|
||||
GPU2D_B->DrawSprites(line+1);
|
||||
}
|
||||
|
||||
NDS::CheckDMAs(0, 0x02);
|
||||
}
|
||||
else if (VCount == 215)
|
||||
{
|
||||
GPU3D::VCount215();
|
||||
}
|
||||
else if (VCount == 262)
|
||||
{
|
||||
GPU2D_A->DrawSprites(0);
|
||||
GPU2D_B->DrawSprites(0);
|
||||
}
|
||||
|
||||
if (DispStat[0] & (1<<4)) NDS::SetIRQ(0, NDS::IRQ_HBlank);
|
||||
if (DispStat[1] & (1<<4)) NDS::SetIRQ(1, NDS::IRQ_HBlank);
|
||||
|
Reference in New Issue
Block a user