Creative SB0350 Hardware Programming Guide - Page 27

Creative SB0350 Manual

Page 27 highlights

Introduction to DSP Programming 2-5 Sharing of Interrupts With DSP version 4.xx, four interrupts use the same Interrupt Request (IRQ) line. These are the 8-bit and 16-bit DMA mode digitized sound I/O, Sound Blaster MIDI (SB-MIDI), and MPU-401 MIDI UART mode interrupts. The Interrupt Status register, addressed as register 82h on the Mixer register map, is used by the ISR to determine whether the interrupt is meant for it or for some other ISR, in which case it should chain to the previous routine. Reading register 82h is accomplished in the same manner as reading any of the other mixer registers (see the chapter on "Mixer Chip Programming"). The byte read in from register 82h is interpreted as follows: D7 D6 D5 D4 D3 D2 MPU-401 D1 16-bit DMA-mode digitized sound I/O D0 8-bit DMA-mode digitized sound I/O SB-MIDI where the grayed areas denote reserved bits. A bit is set to 1 if the corresponding interrupt is triggered. To send an interrupt acknowledgment signal to the DSP, perform a read in from one of three I/O ports with: in al,dx where register DX has been pre-loaded with 2xEh for 8-bit DMA-mode digitized sound I/O or SB-MIDI 2xFh for 16-bit DMA-mode digitized sound I/O 3x0h for MPU-401 Note that it is not possible to distinguish between 8-bit DMA mode digitized sound I/O and SB-MIDI interrupts because these two processes share the same interrupt status bit. It is thus important to avoid running both processes at the same time. To remain backward compatible, the interrupt acknowledgment of 8-bit DMA mode digitized sound I/O and SB-MIDI is done via the Read-Buffer Status port of the DSP.

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141

Introduction to DSP Programming
2-5
Sharing of Interrupts
With DSP version 4.xx, four interrupts use the same Interrupt Request (IRQ) line.
These are the 8-bit and 16-bit DMA mode digitized sound I/O, Sound Blaster MIDI
(SB-MIDI), and MPU-401 MIDI UART mode interrupts.
The
Interrupt Status
register, addressed as register
82h
on the Mixer register map,
is used by the ISR to determine whether the interrupt is meant for it or for some other
ISR, in which case it should chain to the previous routine.
Reading register
82h
is accomplished in the same manner as reading any of the other
mixer registers (see the chapter on "Mixer Chip Programming").
The byte read in
from register
82h
is interpreted as follows:
D7
D6
D5
D4
D3
D2
D1
D0
MPU-401
16-bit
DMA-mode
digitized
sound I/O
8-bit
DMA-mode
digitized
sound I/O
SB-MIDI
where the grayed areas denote reserved bits.
A bit is set to 1 if the corresponding
interrupt is triggered.
To send an interrupt acknowledgment signal to the DSP, perform a read in from one
of three I/O ports with:
in
al,dx
where register
DX
has been pre-loaded with
2
x
Eh
for 8-bit DMA-mode digitized sound I/O or SB-MIDI
2
x
Fh
for 16-bit DMA-mode digitized sound I/O
3
x
0h
for MPU-401
Note that it is not possible to distinguish between 8-bit DMA mode digitized sound
I/O and SB-MIDI interrupts because these two processes share the same interrupt
status bit.
It is thus important to avoid running both processes at the same time.
To remain backward compatible, the interrupt acknowledgment of 8-bit DMA mode
digitized sound I/O and SB-MIDI is done via the
Read-Buffer Status
port of the
DSP.