Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.

Aren't interrupts possible with DevKitAdvance ?

This topic is 5820 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m trying to do interrupts with DevKitAdvance. But for some strange reason, there is no crt0.s that can be modified to allow interrupts, but just an already compiled crt0.o !!! I think I have to modify a crt0.s in order to be able to deal with interrupts because you can''t for example, return with "bx lr" from C++ (?). Why have DevKitAdv already compiled the crt0.s file and how are one supposed to use interrupts with DevKitAdv ??? Should I compile my own crt0.s and replace the original crt0.o with my own ? This seem to be a really stupid approach and I guess that isn''t the way it should be done, because then you''ll have to replace all the four crt0.o that comes with devKitAdv all the time if you switch between diferent projects that use different crt0.o:s. I downloaded DevKitAdv about a week ago, so I have the most recent version. I would be happy if someone could help me out of this nightmare, thanks

Share this post

Link to post
Share on other sites
I use DevKitAdvance too, but I don''t see where any of that fits into the matter. As long as you fill the appropriate registers properly, it should work fine. As an example:

// enables vblank and hblank interrupts, which will follow the
// InterruptFunction function
REG_INTERUPT = (u32)InterruptFunction;
REG_IE |= 0x0002 | 0x0001;
REG_DISPSTAT |= 0x10 | 0x8;
REG_IME = 1;
This works fine for me, if I''m taking your problem right.

Sorry, I''m probably not getting what you''re saying.

-Arek the Absolute

Share this post

Link to post
Share on other sites

Actually, you''re on the right track. Most of the people I know do seem to make a few changes to the crt0.s and then recompile, replacing the original crt0.o with the new one. I can''t tell you what those changes are by heart because I haven''t toyed with interrupts, but you can probably find the information on gbadev.org or on the #gamedev channel in EFNet server of IRC.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!