Mail Archives: djgpp/1994/07/28/16:29:16
Allright. I am trying to write a music playback system which utilizes the Gravis UltraSound card, and I'm doing it under DJGPP. Problem is, I need a timer. Ok. Easy enough. The GUS has a timer. But to use it, I need to get it's IRQs, and muck around with them. (I _COULD_ get the timer interrupt, and use it, but there are other usefull functions the GUS IRQ serves. (click elimination, DMA stuff, etc) ) Here's my basic code to grab those vectors...
_go32_dpmi_seginfo NewHandler;
NewHandler.pm_offset = (int) TheHandler;
NewHandler.pm_selector = _go32_my_cs(); /* I also tried without this. */
_go32_dpmi_set_protected_mode_interrupt_vector(TheSettings.GF1_IRQ, &NewHandler);
This is in a function with the following prototype:
void GUSNewIRQ(void (*TheHandler)())
;
TheSettings is a structure that contains information about the sound card, such as which IRQ it uses. GF1_IRQ _IS_ which IRQ it uses.
This does absolutely nothing. When I replace TheSettings.GF1_IRQ with 8, it crashes. Any suggestions?
- Raw text -