On Jan 6, 2015, at 11:46 AM, Peter Maydell wrote: > On 6 January 2015 at 16:30, Programmingkid <programmingk...@gmail.com> wrote: >> I was doing some searching and thought I should show you this: >> file: vga.c >> >> This indicates that all operations are expected to be in the little endian >> format. > > That controls the endianness to be used when writing words to > the VGA registers, which is not the same as the endianness of > the pixel format (which is what your previous patch was affecting). > > See the comment in vga_common_init(): > > /* > * Set default fb endian based on target, could probably be turned > * into a device attribute set by the machine/platform to remove > * all target endian dependencies from this file. > */ > #ifdef TARGET_WORDS_BIGENDIAN > s->default_endian_fb = true; > #else > s->default_endian_fb = false; > #endif > > What do we sent default_endian_fb to in the configuration that > doesn't give the right colours, and if we set it to the other > setting does it work? > > -- PMM
After investigating the TARGET_WORDS_BIGENDIAN code, I noticed that s->default_endian_fb was being set to true. So I undefined the macro and then ran QEMU. The i386 target showed no change in colors. The ppc target still had the same incorrect colors. Sorry, this doesn't fix the problem.