I couldn't find any bug in my gameplay code, so I started to try some test on sprite display, and I found that the "bug" is coming from the Megadrive itself, but I can't figure out why.
Here is my test, I display 3 sprites on the same line, one outside of screen and 2 on screen.
Then I display another 4th sprite on the same line at coordinate X = 0, and suddenly, one of the 2 visible sprite, disappear !
what kind of sorcery is this ??
(Also, I have the same behavior when X = 512 (but not when X = 513 ??))
For now my workaround is, I won't display the sprite if X/Y <= -32 or X/Y >= 320/224