Subject: audio interrupt implementation
To: None <port-mac68k@NetBSD.ORG>
From: SUNAGAWA Keiki <kei_sun@ba2.so-net.ne.jp>
List: port-mac68k
Date: 04/28/1998 02:36:54
Hi,
I'd been playing asc and got the playing (with coughing,
anyway) raw sound file. So I plan to implement the audio
interrupt and have some questions.
In my understanding, the ROM sound driver uses one byte of
ASCBase + 0x801 to detect if playing sound is done. The
VBL_Task routine clears the byte of that address and main
driver routine updates the sound buffer area.
To add this feature into NetBSD/mac68k, I looked at
mac68k/via.c and changed 5th record of the VIA2 interrupt
handler table from via2_noint to snd_intr then added
function snd_intr looks like below but it doesn't work.
/*ARGSUSED*/
void
snd_intr(bitarg)
void *bitarg;
{
caddr_t ad = (caddr_t)0x50f14801;
*ad = 0;
via2_reg(vPCR) &= ~V2IF_ASC;
printf("snd_intr()\n");
}
I think that it is needed to map the flag address, but I
have no idea to do so. Am I correct? What should I do
next?
--
SUNAGAWA Keiki <kei_sun@ba2.so-net.ne.jp>
Happy Hacking!