Hello alex,
Saturday, September 01, 2001, 5:14:12 PM, you wrote:
am> hiya :)
am> just started on this whole gba thing, but it feels a lot like good old mode
13h (ahh- nostalgia!).
am> so, anyway, i'm in gfx mode 3. i've been coding a simple little demo
involving a bunch of vertical lines.
am> if it was mode 13h, i'd do it like this:
am> main_loop:
am> update positions of lines
am> draw new lines
am> wait for vsync
am> erase old lines
am> goto main_loop
am> but this doesn't work on the GBA. i get all kinds of wierd things happening
to my lines (on both Mappy and iGBA). It seems to be that the tops of the lines
are 1 pixel further along than they
am> should be. I've changed my drawVLine routine so much, and i am now simply
plotting individual pixels (euch!).
am> i think it's connected with the vsync, because moving the waitNextVSync()
changes the effect.
am> again, i've used several routines for waiting for the vsync, and i'm
currently using:
am> void waitNextVBlank ()
am> {
am> while((*((volatile u16 *)0x04000004) & (1<<0)));
am> while(!(*((volatile u16 *)0x04000004) & (1<<0)));
am> }
am> does anyone have any ideas?
maybe what you are seeing isnt related to vsync at all, but the effect
that you get when doing not 16-bit aligned writes to vram ? (read/write
16bit aligned words to vram only!)
--
Best regards,
groepaz mailto:groepaz@...