Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

IRQ_TIMER1 should have top-priority in devkitPro's crt0 #2

Open
sebknzl opened this issue Aug 22, 2013 · 3 comments
Open

IRQ_TIMER1 should have top-priority in devkitPro's crt0 #2

sebknzl opened this issue Aug 22, 2013 · 3 comments

Comments

@sebknzl
Copy link
Owner

sebknzl commented Aug 22, 2013

IRQ_TIMER1

  • should be able to interrupt any other running interrupt but
  • should not be interrupted by any other interrupt.

This is because the GBA's DMA needs to be reset manually and this is done by kradInterrupt() which is tied to IRQ_TIMER1. A too long delay after IRQ_TIMER1 fired will result in unwanted noise/clicks being output.

This has been solved for older crt0's, see krawall/examples/crt0 but there's no solution for devkitPro, yet.

See http://devkitpro.org/viewtopic.php?f=25&t=7882#p15033 for hints on implementing it.

@chr15m
Copy link
Contributor

chr15m commented Oct 17, 2014

Hi Seb,

(First, thanks so much for releasing and maintaining this awesome library after so many years!) Practically speaking, for someone like myself who is trying to build an old project with new devKitPro, should I use the crt0.s that is bundled with krawall instead? Here is my project and I am having crashes as soon as I uncomment kragInit( KRAG_INIT_STEREO ); http://github.com/chr15m/LooperAdvance

If you could throw any light on that I would really appreciate it!

If I was to build with krawall's crt0.s - what is the best way of overriding the devKitArm one from inside my project? I couldn't find any Makefile setting to allow me to do that so if you have a hint let me know.

@sebknzl
Copy link
Owner Author

sebknzl commented Oct 22, 2014

Hi Chris!

It's been a while, nice to hear from you! :)

I would stick to DevKit's crt0, like I do in the examples... I've left the old crt0 there only for reference.

The only thing that can go wrong with DevKit's crt0 is that there may be clicks if you spend too much time in ISRs and IRQ_TIMER1 can't run. But there shouldn't be any crashes.

If the clicks are a problem, we'll have to look at the interrupt-dispatcher in libgba as WinterMute pointed out in the post linked to above.

Seb.

@chr15m
Copy link
Contributor

chr15m commented Oct 22, 2014

Thanks Seb, it must be something else I am doing that is breaking things then. I will keep digging to see if I can get to the bottom of it.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants