Wrong comparison was being made between the old value and new for
checking to write a sprite pixel. This has now been corrected.
Priorities for sprites actually fixed now. Discovered that the background
colour used for comparison is the last actual value in that location
before it being converted through the palette, and not that actual
converted end colour value. Documentation on sprite priorities is almost non
existant so took a few attempt to get right.