Enabling VBlank counter

Post Reply
Derrik
Posts: 63
Joined: Wed Aug 14, 2013 8:28 pm

Enabling VBlank counter

Post by Derrik » Sat Jan 17, 2015 12:02 pm

The VBlank counter is constantly stuck at 160, causing the DS to freeze if a swiWaitForVBlank is executed.

I couldn't work out which registers to set in order to re-enable it, BIT(2) of DISPSTAT is a read only value for whether the VBlank counter is enabled or not, but I don't know what I have to do to get it to enable.

IME is 1 so global interrupts are enabled. Not really sure what to check from here.

elhobbs
Posts: 354
Joined: Thu Jul 02, 2009 1:19 pm

Re: Enabling VBlank counter

Post by elhobbs » Sat Jan 17, 2015 6:50 pm

Derrik wrote:The VBlank counter is constantly stuck at 160, causing the DS to freeze if a swiWaitForVBlank is executed.

I couldn't work out which registers to set in order to re-enable it, BIT(2) of DISPSTAT is a read only value for whether the VBlank counter is enabled or not, but I don't know what I have to do to get it to enable.

IME is 1 so global interrupts are enabled. Not really sure what to check from here.
Are you trying to compile something built with an older version of libnds? This happens because some startup code was moved to the crt startup and should not be called manually. Doing so cause things to break. This does work in the examples so it must be something you are doing.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests