Notes
A subset of the source code of this function is given in another section of my web pages.
Any error you receive after calling this function is due to bad DirectDraw installation
in your PC. Reinstall DirectDraw and retry.
If the displayed image looks strange (skewed or so) check that the image width in pixels
is an actual multiple of 8.
If the colors look strange check that the proper palette has been passed.