#3904 - rome - Wed Mar 12, 2003 3:28 pm
My GBA Interrrput Engine works perfectly, but when i try use it with graphics, the screen stay blank....
when i comment line "REG_IME = 1"
the sound does not work, but graphics back to work...
waht happening???
my code:
when i comment line "REG_IME = 1"
the sound does not work, but graphics back to work...
waht happening???
my code:
Code: |
REG_INTERUPT = (u32)&InterruptProcess; //****************************************************** void InterruptProcess(void) { Game.pr_SoundDevice->HandleSound(); } //****************************************************** //****************************************************** void WGBASoundDevice::Initialize() { ... (init other things) REG_SGCNT0_H = *(u16*) &snd_ctrl; REG_SGCNT1 = SND_ENABLED; //turn sound chip on // Clear the FIFO REG_SGFIF0A = 0; // Enable IRQ for timer 0 REG_IE |= 0x8; //enable interrupts (comment it and graphics will be showed!!!!) REG_IME=1; //enable timer at CPU freq/1024 +irq =16384Khz sample rate REG_TM0D =0xffff; REG_TM0CNT =0x00C3; return; } |