Hi,
I've been trying to display 24-bit graphics in the mode 13h 256-colour graphics mode by converting the pixel values to their average and setting the palette so it is 256 shades of grey.

The only thing is, I kept getting some weird sharp transitions from white to black and vice-versa in certain areas of each image, which I attributed to an overflow occuring somewhere in my calculations. After playing around with them for about 15 mins, I finally remembered that only six bits of each eight bit colour value in the palette is actually used, subsequently I'd only get 64 shades of grey.

Is there a way around this, or a different graphics mode that will give me a full grayscale palette?