Port-dreamcast archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: interrupt hardware?



Mouse <mouse%Rodents-Montreal.ORG@localhost> writes:

> I've got some bare-metal code written on my Dreamcast (I'm playing with
> the BBA) and now I'm trying to use interrupts.
[...]
> The NetBSD code is somewhat of a twisty maze of data structures, all
> different; I may be able to untangle it, but it would be difficult and
> error-prone.
[...]
> which gives me the impression
> there's an ASIC there, but it doesn't seem to include much
> documentation.

Yes.  The BBA is a PCI device behind the "GAPSPCI" host adapter,
so you should look at gaps_intr_establish() in gapspci_pci.c,
which in turn calls sysasic_intr_establish() in sysasic.c.  There
you'll see how to unmask the interrupt.  The sysasic basically has 32
interrupt sources, each of which can be enabled at different CPU IRQ
levels by setting the corresponding source bit in the
corresponding level register.  You can check which events are
currently fired by reading 0xa05f6900.  The enable words are at

0xa05f6910  enable at CPU IRQ level 13
0xa05f6920  enable at CPU IRQ level 11
0xa05f6930  enable at CPU IRQ level 9


  // Marcus




Home | Main Index | Thread Index | Old Index