> (on both Mappy and iGBA). It seems to be that the
> tops of the lines are 1 pixel further along than they should be
I've seen similar results on Mappy with various of my own projects. I
always just assumed it was a problem with the emulator though since the same
code works fine on hardware.
:a
----- Original Message -----
From: "alex mole" <nal@...>
To: <gbadev@yahoogroups.com>
Sent: Saturday, September 01, 2001 11:14 AM
Subject: [gbadev] bizarre vsync issue maybe?
> hiya :)
>
> just started on this whole gba thing, but it feels a lot like good old
mode 13h (ahh- nostalgia!).
>
> so, anyway, i'm in gfx mode 3. i've been coding a simple little demo
involving a bunch of vertical lines.
>
> if it was mode 13h, i'd do it like this:
>
> main_loop:
> update positions of lines
> draw new lines
> wait for vsync
> erase old lines
> goto main_loop
>
> 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 should be. I've changed my
drawVLine routine so much, and i am now simply plotting individual pixels
(euch!).
>
> i think it's connected with the vsync, because moving the waitNextVSync()
changes the effect.
>
> again, i've used several routines for waiting for the vsync, and i'm
currently using:
>
> void waitNextVBlank ()
> {
> while((*((volatile u16 *)0x04000004) & (1<<0)));
> while(!(*((volatile u16 *)0x04000004) & (1<<0)));
> }
>
>
> does anyone have any ideas?
>
> cheers-
>
> alex :)
>
>
>
> list rules: http://www.gbadev.org/rules.txt
> unsubscribe: gbadev-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>