Initial internal palette support format (4 and 8 bit)

Still missing OpenGL stuff and other stuff.