I seem to be following the information available about sprite priority to a tee.
I correctly distinguish background/foreground sprites from one another, and I draw starting with sprite number 63 and continue down untill I draw sprite zero last...
There are two "problems" I don't know how to fix...On the first stage of castlevania (when simon enters the castle at the very start) he doesn't disapear behind the castle wall as he enters the door. It is as if the sprites are not correctly changing from foreground to background.
In SMB 3 the mushgrooms don't appear behind the bricks as they rise nor does Mario appear behind the green pipies as he enters/exits them...
All other games seem to work fine (for example: the mushroom/green pipe problem does not appear in SMB 1 but it does appear in SMB 3)