> Copy your isr(interrupt service routine) to iwram/ewram
> Handle the card interrupt at highest priority
> Disable sound, set IME to 0 (disable all interrupts), and go to an
> infinite loop
there's no need to handle game pak interrupt at highest priority. only one
interrupt is handled per entry to the main ISR (for most usual setups), so
giving the lowest priority is fine.
but if you disable all interrupts, you'll never get the game pak interrupt
if someone inserts the cart again. ;)
Hmm, would be interesting.. Does anybody know wheter you can distinguish between a insert card and remove cart interrupt?? What happens when you try to read...
... there's no need to handle game pak interrupt at highest priority. only one interrupt is handled per entry to the main ISR (for most usual setups), so ...
... I think I see what you mean. If you have multiple interrupts enabled like how Nintendo has demonstrated, then a "lower priority" interrupt will still...
Jason Wilkins
fenix@...
May 2, 2003 2:50 pm
From: "Damian Yerrick" <d_yerrick@...> ... I've been wondering about that. The specs (e.g. gbatek) explicitly say that most of the cart ROM is locked...
Jonathan Perret
jonathan.perret@...
May 2, 2003 5:36 pm
... oops... I meant 'mb -1'. It's -1 to read a cart and -p to write. ... Perhaps Nintendo wrote that in the spec but didn't put it in the first generation...
From: "Jason Wilkins" <fenix@...> ... if you're handling a higher priority (in terms of its order in the branch table in the dispatch routine) interrupt,...
... Actually, it is. The IME is saved, and then set at the beginning of the ISR. Interrupts are still disabled in the CPSR, so interrupts are still disabled...
Jason Wilkins
fenix@...
May 4, 2003 12:31 pm
FYI People were talking about the cart removed interrupt. Well, be sure you disable DMA, or probably better yet, set the audio volume to zero in the loop while...
Mike Schwartz
mykes@...
May 4, 2003 5:02 pm
... more ... DMA ... a ... additional ... Yes, that's a good question IMHO. In a non-embedded OS it is generally considered very bad practice to have...
Jonathan Perret
jonathan.perret@...
May 5, 2003 1:00 pm
... Now, of course the issues are not the same on the GBA; if there's just one handler that occasionnally needs more time to do its work perhaps it's not...
... The multiple interrupt code in my crt0.S is nearly identical to Nintendo code as a result of my "review" :-) of N examples. However, I made small changes...
... interrupt handler Well, I guess, although it seems to be more of a 'timed request processor'. ... return immediately to the BIOS while user control returns...
... Part of the point I was trying to make is that switching the CPU back into System mode to execute the handler, then returning to IRQ mode just before...
Jonathan Perret
jonathan.perret@...
May 7, 2003 3:29 pm
Okay you guys have sucked me into this. My limited understanding of how ARM sees the world is the same or similar to where some of these ideas are headed. I...
Anyway, yes, umm, and, anyway, in theory, anyway, I didnt proof read that before I sent it...sorry. The encoding of the LDRT is not obvious, apparently there...
... This is exactly what I was thinking about, but you state it 100 percent more clearly than me....
Jason Wilkins
fenix@...
May 8, 2003 8:42 am
From: "David Welch" <gba@...> ... Very much agreed. ... The LDRT/STRT instructions look yummy. I have an "ARM7TDMI data sheet" (arm7tdmive.pdf) here and...