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.

Beginners > Multiple interrupts

#19042 - punchy - Sat Apr 10, 2004 4:17 pm

Hi.
I have two interrupt routines. One, called by the HBlank interrupt is use to scale the screen vertically, the other, called by the timer 1 interrupt is used to refill the sound buffer. Both work perfectly independantly when i use the fast interrupts approach to call them.

I'm using my own linkscript and crtO, but the interrupt code is ripped straight from the standard crt0.

I started off by enabling single interrupts, and everything runs, although obviously the sound is scratchy and the display wobbles quite a bit.

When i enabled multiple interrupts nothing worked. Defining __SwitchToUserStack gets it up and running, but the screen still wobbles a little bit, and much worse the game speed nosedives sharply.

Can anyone explain what's wrong?

Thanks.

#19045 - dagamer34 - Sat Apr 10, 2004 6:02 pm

Did you set up your interrupt table correctly? Is the GBA even calling your ISRs?
_________________
Little kids and Playstation 2's don't mix. :(

#19051 - punchy - Sat Apr 10, 2004 7:15 pm

Yes, otherwise there would be no sound or scaling.

#19131 - LOst? - Sun Apr 11, 2004 8:20 pm

Do you copy the sound buffer with DMA? Do you copy anything else with DMA at the same time?

#19156 - punchy - Mon Apr 12, 2004 1:32 pm

Only the sound buffer is DMA'd.