aboutsummaryrefslogtreecommitdiff
path: root/src/GPU.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/GPU.cpp')
-rw-r--r--src/GPU.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/GPU.cpp b/src/GPU.cpp
index 3ec223c..dcd79b4 100644
--- a/src/GPU.cpp
+++ b/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);