As the 5th sprite plane is reported by the status register, and you know in advance which placeholder sprite is the 5th, you can discriminate between actual 5th sprites and you placeholders on the screen split line by simply reading the lower 5 bits of the status register. No need of doing binary search.
The idea is that once you get the vblank interrupt, you execute your interrupt service routine (ISR) with your useful code (music, game engine, whatever you like) provided that the time lenght of your useful tasks is limited to about half screen (or to the approximate position of the raster where you want to do the SAT swap).
You do not need to do cycle accurate code, but only consider the worst case with respect to the raster position in the active area while the ISR is served.
The useful code has to finish before the reaster has reached the line where placeholders sprites are.
Than you start polling the status register waiting for 5th sprite or collision, do your trick on SAT, and return executing useful code or terminate the interrupt service routine giving control to the main loop
IMHO it is by far simpler, more accurate and reliable than computing cycles...
Actually If you are able - with you code - to discriminate in few raster lines (but here you need cycle accurate code) if the sprite collision reported by the status register concerns useful sprites or not, you could even try to use two colliding transparent sprites as paceholders, and poll the collision flag for finding the right raster line where to split the screen.
In this case, if the collision concerns useful sprites, you store the info about the "real collision" for later use, otherwise you swap the SAT.
The difference with the 5th sprite solution, is that the split will fall few lines later as discriminating among sprites for collision check takes more time.
But as you said it depends on what you want to do, usually the cost of doing a large section of cycle accurate code is by far bigger than wasting 5 sprite planes instead of 2.
Edited by artrag, Mon Jan 13, 2014 1:13 PM.