Yeah, SWI's are locked in the GBA's bios.
if you were desperate to make an interrupt, you could use one of the timer
interrupts, and set it up so the timer would overflow on the next cycle or
somesuch... But there's not much reason to use interrupts for stuff like
that because all interrupts have a fairly significant overhead (>50 cycles),
so you might as well just call some function to do the work for you.
Additionally, you *could* attempt to find a SWI vector that would do
something favorable (the SWIs are not bound-checked, so there *may* be some
4-byte address somwhere in the data/code after the jumptable that would jump
to some place in iwram, or something similar that could be useful...)
But, that's bios-dependent, if they changed the bios your code would no
longer work... not a recommended practice :)
-Stephen
----- Original Message -----
From: "Michael Reid - CSCI/P2003" <m6reid@...>
To: <gbadev@yahoogroups.com>
Sent: Friday, February 27, 2004 4:54 PM
Subject: [gbadev] swi calls
> hi,
>
> i'll start with the obligatory, "i'm new to this" bit. i've only been
> playing around w/ programming the gba for about a month.
>
> anyhow, i would like to be able to add my own system calls, via the swi
> instruction, however, the little info i have found about this implies that
> the system calls are BIOS only, and that there is no way to add any
> user-defined calls.
>
> does anyone know if this is true or not? has anyone been able to define
> their own syscalls?
>
> if not, then can anoyone think of a way to force a hardware interrupt
> (enter irq mode)?
>
> thanks
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>