[OT] Tri-state line drivers

Discussions about Sinclair ZX80 and ZX81 Hardware
User avatar
1024MAK
Posts: 5101
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: [OT] Tri-state line drivers

Post by 1024MAK »

RWAP wrote:Not sure whether this will help, but the Sinclair QL uses a form of double writing (I believe) in order to be able to provide bi-directional data on the normally read-only ROM port.

This enabled a hard disk, and a Flash EPROM card to be connected to the ROM port.
The Atari ST range has a read only ROM port.
In theory you can write to the address range covered by this ROM port, but the plugged in cartridge has no way of telling a read from a write.
The way round this, is to use the lower bits of the address lines for output data (to write). So to write a byte wide value, you loose part of the address range available. Reads are done normally, but do not use the same addresses as the "write" addresses.

Again, to save confusion, here is another fictional computer...

So if you have 16 address lines, 8 are used to write data, that leaves you with only 265 usable addresses.

A0 - A7 used for writing data by shifting data bytes into the lower bits of the CPU register used for the device address.
A8 - A15 used for addressing (addresses 0 to 65536 but in multiples of 256)
D0 - D7 used for reading.

When the plugged in cartridge sees a valid address on A8 - A15, it can latch address lines A0 - A7 and this them forms the write data ;)

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer later in the year.
User avatar
1024MAK
Posts: 5101
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: [OT] Tri-state line drivers

Post by 1024MAK »

Rink wrote:The lines which are inputs to the box (CPU -> Expansion) are easy enough to work out - they're buffered with SN74LS541 line drivers. Where I'm having difficulty, is understanding the inputs (Expansion -> CPU - NMI, EXWAIT, EXINT, EXIO, IEI) and the data bus.
Rink wrote:The others seem to be running through a SN74LS367 bus driver. But I can't work out how the card knows when to enable the *G pin on the 367 and when to tri-state. Or can these chips be configured to tri-state when not at logic 0?
If the CPU board does NOT have any other circuitry that needs /NMI, /WAIT or /INT, then there is no need to use tri-state buffers, the buffers can either be normal buffers or tri-state type buffers, but with them permanently enabled.

If the CPU board does have other circuitry that needs /NMI, /WAIT or /INT. Then you may find special circuitry on board to take a normal TTL signal, feed it to a open-collector buffer, and then connect this line to the CPU pin.

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer later in the year.
Rink
Posts: 165
Joined: Wed Jun 27, 2012 5:48 pm

Re: [OT] Tri-state line drivers

Post by Rink »

Wow. That read-only writing system is seriously cool. Thanks for the info guys - that's a trick that might come in very handy one day.

Wish there was more documentation for this bloody X1. :D To the best of my knowledge, the I/O expansion system on the X1 functions pretty similar to a backplane. Two on-board external I/O connectors can see every memory and I/O request that happens, every interrupt, the CPU's M1, WR, RD lines etc. etc. And they sit right on the data bus. There's no protection or multiplexing circuitry.

We'll just ignore all the internal I/O operations because this would get silly. ;)

Where the external box really has problems, is that its connected to one of the two on-board I/O connectors and it doesn't matter which. So when the CPU requests, for example, input from 0x1234. There are five slots which can choose to act at will on the data bus (the one spare on-board slot, four slots in the connected expansion box)... and none of the others would know anything about it. So the box (or its adapter card), can't even assume that it has control of the lines for the non-system address range recommended by Sharp, because that other I/O connector could be responding. As far as I can understand things, if the data bus was to be buffered, the box would need to know whether one of its cards was going to drive the lines - and it doesn't get told that information.

You might not believe me from reading this, but the X1s are actually seriously excellent computers. However, god knows what would happen if you tried to connect two expansion boxes. :D

If the data lines aren't buffered (and I don't think they are), then is there any reason why the others would have to be?
User avatar
1024MAK
Posts: 5101
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: [OT] Tri-state line drivers

Post by 1024MAK »

Rink wrote:If the data lines aren't buffered (and I don't think they are), then is there any reason why the others would have to be?
That very much depends on what is externally connected to the computer.
If you have only a short cable with only one or two "simple" expansion cards, the Z80 address and control lines may not need to be buffered.
The normal reasons for buffering are simple - (1) to increase the "fan-out" so that the buffered lines can drive many devices, (2) so that longer cables and PCB tracks/traces can be driven with less signal degradation and (3) to provide protection for the internal bus in the event of an external device shorting out the (now buffered) bus.

It may well be, that Sharp buffered the address lines and the some of the control lines because it was easy, but did not buffer the data bus, because of the extra expense / problems involved with including suitable address decoding for this.

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer later in the year.
Rink
Posts: 165
Joined: Wed Jun 27, 2012 5:48 pm

Re: [OT] Tri-state line drivers

Post by Rink »

1024MAK wrote: It may well be, that Sharp buffered the address lines and the some of the control lines because it was easy, but did not buffer the data bus, because of the extra expense / problems involved with including suitable address decoding for this.
Seems so. I suppose some buffering is better than none, but I'd have been (and currently am) tempted not to bother at all if the data bus wasn't buffered and works fine.

On the other hand... my card will look a bit crappy too without any components on. Maybe I should do the buffering on the lines that can be - if for no other reason than practice. :D

Cheers Mark.
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: [OT] Tri-state line drivers

Post by sirmorris »

Rink wrote:Maybe I should do the buffering on the lines that can be - if for no other reason than practice. :D
Can't argue with that. What X1 have you got? The hot pink MSX-alike or the black twin-tower?
Rink
Posts: 165
Joined: Wed Jun 27, 2012 5:48 pm

Re: [OT] Tri-state line drivers

Post by Rink »

sirmorris wrote:Can't argue with that. What X1 have you got? The hot pink MSX-alike or the black twin-tower?
I have an X1 Twin (X1 + PC Engine combo) - same as this, except mine has two 5.25" drives in (and an HxC floppy emulator hanging out the back):
Image

And a fully-boxed CZ-803C (needs a little repair work):
Image

Btw here's the expansion box - got one of these too:
Image

Those aren't my pictures btw. I don't have my own photos uploaded yet.

Unfortunately, I don't have a red X1 - which is a source of great sadness to me. Will be rectifying that situation as soon as I can be bothered to get a job. :lol:

(Edit: Just to clarify, I'm not on benefits - your tax money isn't being spent so I can sit around the house playing on Japanese computers :D )
Post Reply