The bitmap stuff

Just pulling the bitmap functions, colour functions and the cross-platform changes for EIOS..

Now sure why there is red parts. Line endings should have been normalized to LF instead of CRLF.