View unanswered posts | View active topics It is currently Fri Nov 24, 2017 7:36 pm

Reply to topic  [ 1 post ] 
 libnds: soundDisable() makes lid closing hang the ARM7 
Author Message

Joined: Mon Jul 12, 2010 9:45 pm
Posts: 21
This code:
#include <nds.h>
#include <stdio.h>

int main()
   iprintf("Hello World!\n");
   int i;
   for (i = 0; i < 60; i ++) swiWaitForVBlank();
   iprintf("Now try to close the lid!\n");

has a problem after soundDisable() is called: if the lid is closed, the ARM7 hangs. I've done some debugging, and this ARM7 line appears to produce the problem:
void disableSound() { // libnds/source/arm7/audio.c, line 139

I'm using the latest version of everything.

EDIT: libnds/source/arm7/system.c, line 64, function powerValueHandler():

This won't work because sound registers don't work when the sound HW is powered off. I'd suggest to add a check to only call swiChangeSoundBias() when REG_POWERCNT's bit0 is 1.

My blog

Fri Oct 28, 2011 7:50 pm
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
  Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.
Get devkitPro at Fast, secure and Free Open Source software downloads