Improved R8 support.

* Fixes #3728.
* Allows custom palettes to be loaded.
* Adds subtractive blending (for move-flash and possibly shroud).