gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Easy way to set vblank rate?

#165252 - JYC376 - Mon Dec 15, 2008 6:51 am

Is there a libnds function out there that can set the vblank rate? Or do I just skip a vblank (I need 30 fps)?

#165254 - eKid - Mon Dec 15, 2008 6:59 am

Just skip the frame, the hardware draws at at fixed 60hz rate. There are some weird tricks you can do to extend the vblank period though.

#165256 - Dwedit - Mon Dec 15, 2008 9:26 am

eKid wrote:
There are some weird tricks you can do to extend the vblank period though.

O RLY?
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."

#165257 - eKid - Mon Dec 15, 2008 9:47 am

Dwedit wrote:
eKid wrote:
There are some weird tricks you can do to extend the vblank period though.

O RLY?

gbatek wrote:
VCOUNT register is write-able, allowing to synchronize linked DS consoles.
For proper synchronization:

write new LY values only in range of 202..212
write only while old LY values are in range of 202..212

So you can stall the VCounter during that time. I think an emulator or two take advantage of this to slow the screen refresh rate to 50hz.

#165258 - Dwedit - Mon Dec 15, 2008 10:13 am

Thanks, I'll have to steal this.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."

#165325 - tepples - Wed Dec 17, 2008 6:10 am

I would imagine that with the LCD, freezing the refresh on line 208 for too long might cause visible artifacts. Who dares test this?

Nintendo is also known for locking licensed developers out of some hardware features, claiming that they're subject to change in future hardware revisions. Are these "emulator or two" homebrew or licensed?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#165332 - JYC376 - Wed Dec 17, 2008 8:17 am

eKid wrote:
Just skip the frame, the hardware draws at at fixed 60hz rate. There are some weird tricks you can do to extend the vblank period though.


Alright, two swiWaitForVBlanks, coming right up. Thanks