Almost working sprite enoder!

Sprite lengths don't always match, and the palette selection is broken
somehow, but it's *close*.