Sprite positions issue

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Sprite positions issue
by on (#78239)
I've a small spriteproblem in my emulator. In some games, the positions have a slightly off Y-position (-1 pixel too much). However in other games it works fine which confuses me.
The titles I am testing are "The Goonies II (PAL)" (Great game btw) and "Super Mario Bros (PAL)".
The above have sprites positioned -1 pixel wrong. However "Super Mario Bros 3" (PAL) looks fine as default.
So if I fix one game I break the other, sort of.
Anyone happens to have any hints for me?

by on (#78240)
Positions should be one pixel below what the Y coordinate byte says it should be. So a sprite at position 8.8 is actually at 8,9. No sprites are ever drawn in visible scanline 0.

by on (#78250)
Also, some games (mostly early ones) use a "negative" Y scroll value to push the whole screen down 1 scanline, to compensate for the way sprites work. Maybe your emulator is not handling the Y scroll properly in those cases?

by on (#78252)
^ My game does that right now to make it all align.