User's Manual

PMAC Dual-Ported RAM User Manual
28 Dual-Ported RAM Automatic Functions
The buffer in DPRAM is limited to 159 characters; however, a command line of up to 200 characters can
be sent by using the DPRAM buffer twice. The first 159 characters are placed in DPRAM without a
terminating NULL character and the host-output-complete flag is set; then the remaining up to 41
characters are sent with a NULL character to terminate, and the host-output-complete flag is set again
To read a response:
1. Wait for Host-Input Control Word 0x06D0 (Y:$D1B4) > 0 (Response Ready)
2. Interpret the value in this register to determine what type of response is present. If the register does
not show an error, continue with the following steps.
3. Read 0x06D2 (X:$D1B4) to find the number of characters in the response.
4. Read the Host-Input Buffer starting at 0x06D4 ($D1B5) until the specified number of characters has
been read.
5. Clear the Host-Input Control Word 0x06D0 (Y:$D1B4).
6. Repeat steps 1 to 5 until the Host-Input Control Word contains an <ACK> to mark the end of
transmission.
PROM version 1.15 provides a register in the DPRAM, 0x062E (X:$D18B) to be used specifically for
sending PMAC a control character. The read/write procedure is exactly as described above except now
instead of writing a string to the Host-to PMAC buffer, write the ASCII value of the control character to
the dedicated register 0x062E (X:$D18B).
Note:
PMAC’s ASCII response strings in DPRAM do not end with a carriage-return
character. The host computer has two ways of knowing where the end of the string
is. First, the register immediately preceding the string is given the number of
characters in the string – convenient for Pascal programmers. Second, the string is
terminated with the NULL character (ASCII value 0) – convenient for C
programmers.
Interrupts
I56 = 1 enables the Dual-Ported RAM ASCII interrupt feature. With this enabled, the PMAC will
interrupt the Host when a PMAC-to-Host buffer is ready to be read by the Host.
VME users will get the normal VME bus communications interrupt (IRQ line specified by the value in
X:$788) with an interrupt vector (default $A2) one greater than the value specified in X:$789 when the
Dual Port RAM ASCII PMAC to HOST data buffer is ready. The non-DPRAM (mailbox) VME interrupt
vectors remain as before ($A0 and $A1 default).
PC users will get IR7 interrupt from the PMAC PC or PMAC Lite if jumper E55 is installed. The EQU4
signal is used to generate this interrupt, so it is unavailable for position-compare use when I56 = 1. Due to
the fact that the 8259 does not latch the interrupt on a transition interrupt, the PMAC will hold the IR7 line
true until the host services the Dual Port ASCII PMAC-to-Host buffer and sets 0x06D0 (Y:$D1B4) to 0
(saying it has the data).
Because of this the host may see an IR7 interrupt still active when it gets another interrupt. If so, the
PMAC has not overwritten the PMAC-to-Host ASCII buffer; it just has not satisfied the above described
condition. Also if 0x06D0 (Y:$D1B4) = 0, the IR7 was from the previous exchange and there is no data to
be received by the Host. The last transmission should be an <ACK> regardless of whether you have I56
equal to one or zero.