I was pretty sure I had already tried the "topmost-per-pixel" approach, and indeed when I applied it again, I ended up with the following image I remembered from my past tests:
![[Linked Image from mamedev.emulab.it]](http://mamedev.emulab.it/etabeta/fast/files/0046.png)
the "lighted" tile is OAM0 and I thought (when I first tried this solution) it was a priority problem causing it to appear above BG2B. This time, thanks to AWJ, I knew priorities were fine, so I looked for other possible causes. In particular, toggling off the color math, I obtained this
![[Linked Image from mamedev.emulab.it]](http://mamedev.emulab.it/etabeta/fast/files/0047.png)
i.e. color math is the effect responsible for darkened/lightened images...
long story short, the way I implemented sprite priorities was properly disabling color math whenever the sprite had palette 0-3, but it was not enabling it again if the sprite was covered by a BG with color math enabled. Fixing this stupid bug, sprites are finally correct
![[Linked Image from mamedev.emulab.it]](http://mamedev.emulab.it/etabeta/fast/files/0045.png)
known graphics issues still present:
- hires mosaic is slightly wrong (and it cannot be fixed without partially rewriting hires rendering, however it should be barely noticeable)
- some tiles get corrupted after a while (R-Type 3)
- TMNT has strange coloured rectangles partially covering texts in the intro...
- pseudo-hires is still missing (I think I have it working, as the following snap shows
![[Linked Image from mamedev.emulab.it]](http://mamedev.emulab.it/etabeta/fast/files/0049.png)
but I'd like to test screens with Dr.DNA trivia before officially adding it... does anyone know how to reach one of these trivia screen in Jurassic Park?)