Can anyone give me a difinitive answer to this one?
I've been working on a fractal demo in mode4 using mappy,
visualBoyAdvance(7.*), and boycottAdvance0.2.6
I don't have facilities to test on hardware yet.
Today (AFTER upping my demo to gbadev :-|) I discovered I didn't have
the latest visualBoyAdvance, and that when I tried it, my demo is
broken!
when i first wrote my putpixel routine, i was masking the lowest bit
of the x coordinate, as I assumed this was necessary, during a try
everything bug search, i discovered that this didn't seem to matter -
in every emu i have, so i left it out : see '//(x&0xfe));' below
adding the mask back in fixes the graphics on visualBoyAdvance0.8
void putPixelM4(u32 x,u32 y, u32 colour) {
u16* p = (u16*)(0x06000000+y*240+x); //(x&0xfe));
u16 screen=*p;
if(x&1) {
*p=((screen&0x00ff)|(((u16)colour)<<8));
}
else {
*p=((screen&0xff00)|(u16)colour);
}
}
I had assumed that either one of compiler/assembler/linker was
aligning things up to work, or that the arm just 'coped'
would the above code need the &0xfe mask so function correctly on
hardware, or is there something else going on here.
(how many other bugs might appear when i get a flash linker????)
cheers,
col.