<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Sun, 12 Aug 2007 00:42:28 +0100
From   : jgh@... (Jonathan Graham Harston)
Subject: Emulating Econet hardware?

>Message-ID: <Marcel-1.53-0810224305-b49xSBG@...>
 
Johan Heuseveldt <johan@...> wrote:
> > Econet uses a 16-bit 'address' - net.stn - but as to the ALDC,
> > everything after the opening flag is just 'data', it's irrelevant
> > what that data is.
> 
> No, it isn't.
> The first byte is the Address field for the 68B54. The first NMI handler
> set up is expecting that, and tests for it.
 
Yes, the handler, ie, the software, not the hardware. There's
nothing to stop the handler treating it as any other type of data
- as NetMon does. The following code reads every byte from the
ALDC, including the first byte.
 
.NMI
PHA
LDA ALDC_Status1
AND #byte_arrived
BNE exit
LDA ALDC_Data
.addr
STA Address
INC addr+1:BNE exit
INC addr+2
.exit
PLA
RTI
 
Programming convention defines the first byte as the address byte,
but the 6854 has no capability of imposing that convention.
 
> Normally the data is received per two bytes - CtrlReg 2, bit1, and
> interrupts are prioritized - CtrlReg 2, bit0. The Address field has a
> higher priority than normal data, so this very first byte - after the
> opening flag - causes an Address field interrupt.
 
Otherwise known as 'Frame Start interrupt'.
 
Motorola Device Data p3-544 says:
 
"The AP status bit provides the frame boundary and indicates an Address
octet is available in the RxData FIFO register. In Extended Addressing
mode, the AP bit continues to indicate addresses until the Address is
complete. The Address Present status bit is cleared by reading data or by
RxReset."
 
In non-Extended Addressing mode, the AP bit indicates that the first byte
of the frame has arrived. It's up to the software handler to interpret
that 'first byte of frame' in whatever manner it choses. If the software
is implementing a data-link protocol, it (the software) interprets it as
an address.
 
> Also note that the Address field is an ADLC 68B54 property, and has
 
It's a Data-Link Control property, which the 6854 and the Z80SIO
implement. With the 6854 the software has to implement that property
imbued in the first byte of the frame, and set 'ignore this frame'; with
the Z80SIO it can implement that property itself setting the 'ignore this
frame' by itself. The 'first received character' interupt then occurs on
the second byte in the frame. The Econet software handler then checks that
byte as the network number, setting 'ignore this frame' if it not &00 (my
net) or &FF (broadcast).
 
I really must upload the programmer's data references.
 
There's a good quote in the Z80SIO datasheet: "Although the Z80-SIO device
at first appears to be bewilderingly comples..." :)
 
-- 
J.G.Harston - jgh@...                - mdfs.net/User/JGH
Youth has now fled. Their best years have been passed in the service
of the party. They are ageing and their ideals have also passed,
dispersed by the contrarities of daily struggles.
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>