Fix rirq_sort when called from within interrupt
This commit is contained in:
parent
c12bca7b4e
commit
907452d918
|
@ -591,7 +591,7 @@ void rirq_wait(void)
|
|||
npos++;
|
||||
}
|
||||
|
||||
void rirq_sort(void)
|
||||
void rirq_sort(bool inirq)
|
||||
{
|
||||
#if 1
|
||||
byte maxr = rasterIRQRows[rasterIRQIndex[1]];
|
||||
|
@ -641,10 +641,15 @@ void rirq_sort(void)
|
|||
#endif
|
||||
|
||||
npos++;
|
||||
nextIRQ = 0;
|
||||
byte yp = rasterIRQNext[nextIRQ];
|
||||
if (yp != 0xff)
|
||||
vic.raster = yp - 1;
|
||||
if (inirq)
|
||||
nextIRQ = NUM_IRQS - 1;
|
||||
else
|
||||
{
|
||||
nextIRQ = 0;
|
||||
byte yp = rasterIRQNext[nextIRQ];
|
||||
if (yp != 0xff)
|
||||
vic.raster = yp - 1;
|
||||
}
|
||||
}
|
||||
|
||||
void rirq_start(void)
|
||||
|
|
|
@ -180,7 +180,8 @@ void rirq_stop(void);
|
|||
|
||||
// Sort the raster IRQ, must be performed at the end of the frame after changing
|
||||
// the vertical position of one of the interrupt operatins.
|
||||
void rirq_sort(void);
|
||||
// Set the inirq flag to true when calling this from an interrupt
|
||||
void rirq_sort(bool inirq = false);
|
||||
|
||||
// Wait for the last raster IRQ op to have completed. Must be called before a
|
||||
// sort if the raster IRQ system is active
|
||||
|
|
Loading…
Reference in New Issue