Hi devs,
I have a question/doubt about the variable CpsDrawSpritesInReverse and its use in the file cps_run.cpp, Cps1Frame() function:
..
if (!CpsDrawSpritesInReverse) {
CpsObjGet(); // Get objects
}
for (i = 0; i < 4; i++) {
nNext = ((i + 1) * nCpsCycles) >> 2; // find out next cycle count to run to
if (SekTotalCycles() < nDisplayEnd && nNext > nDisplayEnd) {
SekRun(nNext - nDisplayEnd); // run 68K
memcpy(CpsSaveReg[0], CpsReg, 0x100); // Registers correct now
if (CpsDrawSpritesInReverse) {
if (i == 3) CpsObjGet(); // Get objects
}
SekSetIRQLine(2, SEK_IRQSTATUS_AUTO); // Trigger VBlank interrupt
}
..
I see that this variable, that's set to 1 for some drivers, is used to determine if the function CpsObjGet() needs to be called before that for cycle or inside it, just before the vblank interrupt.
My question/doubt is, shouldn't the CpsObjGet() function be called ALWAYS just before the vblank?
Could you give me some details about the CpsDrawSpritesInReverse variable?
I hope it's clear, sorry to bother you with stupid questions
Thank you very much!
Manlio