Nov 14/86
How do you represent .5 in binary? How about .75? That is a teaser for next time.
What I want to talk about this month is getting on the QL bus, a 6821 expansion board. The 68008 addresses one megabyte directly; in hex that is 0 -> $0FFFFF. The memory map looks roughly like this:
$0FFFFF - 1M - Top of address space
- 128K ROM expansion
$0DFFFF - 896K -
- 8 - 16K Expansion cards
$0BFFFF - 768K -
- 512K Expansion Ram
$03FFFF - 256K -
- 128K On board ram
$01FFFF - 128K -
- I/O Hardware
$00FFFF - 64K -
- Plug in ROM
$00BFFF - 48K -
- On board ROM
$000000 - - Bottom of address space
From this brief outline you can see that we have to aim for the 768K-1M slot. If we look at the address lines in binary we see:
A19 A18 A17 A16 A15 A14 RANGE FUNCTION 1 1 x x x x 768K-1M Hardware expansion 1 0 x x x x 512K-768K Ram expansion 0 1 x x x x 256K-512K Ram expansion
If we are to design a circuit to get into this slot we will have A19 & A18 high; while the other address lines will narrow the range in that slot. In particular, what I chose to do was use this decoding.
A19 A18 A17 A16 A15 A14 A13 ....... A1 A0 1 1 1 0 1 1 1 R R which is $0EE00R
The 6821 uses the two low address lines to differentiate 4 of its internal registers. Looking at the circuit diagram, you see that lines A19-A17 go directly to the 74LS21 which has dual 4 input AND gates. A16 is first inverted by the 74LS05 and then goes to the 74LS21. Note that the 74LS05 is an open collector device & so needs a pull up resistor at its output. The output of the first AND gate is fed to the other side which also watches A15-A13.
This positive signal I have called board select. One of the intricacies of the QL is that the internal hardware will grab any address above 256K unless it is told not to via an open collector input line called confusingly Data Strobe Master Chip; DSMCL where the L indicates active low. One other restriction has to do with timing. DSMC must be driven low before Address Strobe (ASL) becomes active. On the board this is accomplished by the 2N3903 transistor which is driven by board select.
So far we have generated a board select & told the QL we are interested. The ASL signal is used to qualify board select to generate a Chip select signal for the 6821. Note that Motorola recommends that Chip Select (CSL) be qualified as well by the E signal; which I have not done. Now the 6821 knows the QL is talking to it, the board has to be able to tell the QL to continue. This is done with the Valid Peripheral Address (VPAL). Note that VPAL is an open collector line , so that no pullup resistor is used for this connection.
All of the other connections are straightforward; such as the Data lines & power grid.
This is a hardware expansion which ignores QDOS completely. There is no way for the operating system to know that this board is attached. All driving software must therefore be particularly written for the $0EE00R address.
