Mail Archives: djgpp/1997/10/11/14:01:31
Message-ID: | <343892FB.10E2@fm-net.com>
|
Date: | Mon, 06 Oct 1997 02:27:55 -0500
|
From: | justin deltener <deltener AT fm-net DOT com>
|
Reply-To: | deltener AT fm-net DOT com
|
MIME-Version: | 1.0
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Interrupts bite....wait...yup they do :-)
|
NNTP-Posting-Host: | 208.16.76.254
|
Lines: | 48
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
I've finally got around to programming interrupts again, and i'm so DARN
close i can taste it. I think my computer is laughing at me. Anyways
i'm hooking up into the SB16 sound card and for the life of me i can't
get it into auto-init mode! i'm doing the same DSP commands as i was in
real mode, and i think the rest is correct. It will play the DMAbuffer
once and thats it. No autoinit :-( Any ideas?
NewSB16.pm_offset =(int)SB16_ISR;
NewSB16.pm_selector=_go32_my_cs();
_go32_dpmi_get_protected_mode_interrupt_vector(BLASTER.SBIntr+8,&OldSB16);
_go32_dpmi_allocate_iret_wrapper(&NewSB16);
_go32_dpmi_set_protected_mode_interrupt_vector(BLASTER.SBIntr+8,&NewSB16);
masksave = inp(0x21);
short temp =(1<<BLASTER.SBIntr);
outp(0x21,(masksave& ~temp));
DMA SNIPPET
-----------
offs = phys & 0xFFFF; //phys is given to us by
seg=__dpmi_alloc_dos_mem.... phys=seg<<4;
c=BLASTER.DMA;
disable();
DMAPAGE = DMApageport[c];
DMAADDR = DMAaddrport[c];
DMACOUNT= DMAcountport[c];
outp(MaskReg[c],(c|0x0004)); //Disable DMA channel
outp(ModeReg[c],(c|(unsigned char)DMA_AUTO_INIT));//Put into 8-bit
mode..DMA_AUTO_INIT is 0x58
outp(ClearReg[c],0x0000); //Clear Flip-Flop
outp(DMAADDR,offs&0xff);
outp(DMAADDR,offs>>8);
outp(DMAPAGE,phys>>16);
outp(DMACOUNT,(BUFFSIZE-1)&0xff);//Low byte of buffersize
outp(DMACOUNT,(BUFFSIZE-1)>>8);//High byte of buffersize
enable();
outp(MaskReg[c],c); //enable DMA channel
everything is being done in the usual way, but i'll be darn if that
stupid thing will go into autoinit!
The new interrupt handler function does send an EOI (0x20) and it just
isn't working for me :(
Thanks for bothering to read this :)
--
http://www.fm-net.com/InverseReality
- Raw text -