Hi everybody!
Very big thanks all for advices!
I didn't understood your advices till I disassembly ROM IRQ vector - system
code under it do everything what is needed for calling interrupt! My work is
to define NORMAL c/c++ function and set up it at $300FFFC! That's all!
This reason GBA don't need to implement any special interrupt functions!
America is discovered again! ;-))
Best regards
Jerzy Kut
----- Original Message -----
From: <DekuTree64@...>
To: <gbadev@yahoogroups.com>
Sent: Sunday, September 30, 2001 7:45 PM
Subject: [gbadev] Re: gba interrupts with c/c++
> Interrupt functions have to be in ARM, so you need ARM/Thumb GCC for
> it to work. I was using Thumb GCC (which of course has no ARM
> support, but I didn't realize that at the time) from devrs.com, and
> it didn't work, so I tried downloading DevKitAdvance (it's at devrs
> too, but I got my compiler before it was released) and everything was
> fine. Or if you're using ArmSDT, then you don't have to worry about
> everything I just said^^
>
> All you have to do is write a function that checks if the interrupt
> flag you want is set, and if so do something.
> Then do something like
> REG_INTERRUPT = (u32)IrqHandler;
> REG_IE = flags; file://where flags is the bits for the interrupts you want
> to enable (check the Mappy SDK to see which bit does what)
> REG_IME = 1;
> int your main function and it should call IrqHandler every time one
> of the interrupts set IE happens.
> Also, the handler function should set IME to 0 (to disable
> interrupts) before it does anything, to make sure your interrupt
> doesn't get interrupted^^ Be sure to set it back to 1 at the end
> though.
>
>
> --- In gbadev@y..., "Jerzy Kut" <gephard-gbadev@w...> wrote:
> > Hi!
> > Is there possible making interrupt functions ? Something like
> >
> > /**
> > * Interrupt service.
> > */
> > interrupt void myInteruptService() {
> > // somebody ;-)
> > ;
> > } // interrupt void myInterruptService()
> >
> > Normal function calling and interrupt calling is quite different...
> > Has GCC support for them ?
> >
> > Regards
> >
> > Jerzy Kut
>
>
>
> list rules: http://www.gbadev.org/rules.txt
> unsubscribe: gbadev-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>