-- Lark8237.txt
-- L. Stewart  December 21, 1981  12:03 PM

Audio DMA:  Port 1x
Encrypt DMA: Port 4x

Audio DMA:
Channel		Use
----------------------------
    0		Audio Input
    1		Audio Output
    2		Zeros
    3		Unused

Encrypt DMA:
Channel		Use
----------------------------
    0		Audio DMA (cascade)
    1		SLC  (cascade)
    2		Enc. Master
    3		Enc. Slave


Both DMA controllers set up for:
High true request lines
Low true acknowledge lines
Fixed priority, channel 0 highest

Ports:

Audio	Enc.	Read	Write
--------------------------------
  18	48	Status	Command
  19	49	---	Request
  1A	4A	---	Single mask bit
  1B	4B	---	Mode registers
  1C	4C	---	Clear byte pointer
  1D	4D	Temp	Master Clear
  1E	4E	---	---
  1F	4F	---	Write all mask bits


Word registers (write low byte first)

Channel 0
  10	40	Addr	Base Addr
  11	41	Count	Base Count
Channel 1
  12	42	Addr	Base Addr
  13	43	Count	Base Count
Channel 2
  14	44	Addr	Base Addr
  15	45	Count	Base Count
Channel 3
  16	46	Addr	Base Addr
  17	47	Count	Base Count


Command register:
20	DAck low, DReq high, extended write,
	fixed priority, normal reads, controller
	enable, ch. 0 normal, BLT disabled

Mode Register
0  |	Channel select	
1  |	   "
2   |	00:  Verify  01:  Write
3   |	10:  Read    11:  illegal
4	Autoinitialize
5	Address Decrement
6  |	00:  Demand  01:  Single
7  |	10:  Block   11:  Cascade


Program Enc DMA to cascade channel 0 only

-- Master reset both controllers
O4D,00
O1D,00

-- Set both command registers
O48,20
O18,20

-- Set mode registers
-- ch. 0 AND 1 cascade, 2 read, 3 write
O4B,C0,C1,4A,47
-- all auto, single, write, read, write, ch. 3 read
O1B,54,59,56,4B

-- Audio addresses
-- clear byte pointer
O1C,00
-- Ch 0 (input) address
O10,00,80
O11,00,02
-- Ch 1 (output) address
O12,00,80
O13,00,02
-- Ch 2 (zeros)
O14,00,80
O15,00,02

Enable requests
-- Enc DMA channel 0, 1 only
O4F,0C
-- Audio DMA, channels 0, 1, 2
O1F,08

-- Whole thing, for stuffing
O4D,00
O1D,00
O48,20
O18,20
O4B,C0,C1,4A,4B
O1B,54,59,56,4B
O1C,00
O10,00,80
O11,00,08
O12,00,80
O13,00,08
O14,00,80
O15,00,08
O4F,0C
O1F,08

-- remember to set up 9513 first
-- Alternative, for 1/2 second echoing
O4F,0F
O1F,0F
O4D,00
O1D,00
O48,20
O18,20
O4B,C0,C1,4A,47
O1B,54,59,56,4B
O1C,00
O10,00,08
O11,00,10
O12,04,08
O13,00,10
O14,04,08
O15,00,10
O4F,0C
O1F,08