Hello Andrew,
Would you please explain about "ECB data flow direction control"?
How does it switch direction?
Thank you
ziloo
Hi,
The ECB bus control is in two parts; the address/control lines and the data lines. I'll explain the address/control lines first since those are easier.
The address/control lines are "export only" from the SBC perspective virtually all the time. In other words, the address/control lines are repeated from inside the SBC onto the ECB but not vice versa. The only exception to that is when something on the bus asserts bus control by lowering the /BUSRQ line. In that case, the CPU goes into BUSRQ mode and the ECB places the address/control lines into the SBC. Again, this is a pretty rare scenario but it is possible and the SBC supports it if and when a "bus mastering" peripheral is ever made. Possibly another CPU card could do this.
The SBC data lines are "import and export" depending on the situation. Normally, the SBC exports the data lines onto the ECB and does not import them. There is two exceptions though; first is the /BUSRQ being pulled low by a yet undesigned peripheral which is pretty rare, and more likely is the SBC CPU has made a IO request READ (/IORQ goes low and /RD is low) AND the IO address is outside of the internal SBC IO range ($60-$7F). In other words, the CPU is requesting to IO reads to IO address EXTERNAL to the SBC.
In all cases, it is fairly rare for the SBC to be pulling information (address, control, or data) in from the ECB. Normally, it just transmits the internal CPU bus onto the ECB for peripherals to observe and act on.
Now you may have noticed one peculiarity about this implementation of the ECB. The SBC supports CPU MEMORY WRITES (/MERQ low and /WR low) onto the ECB but it does NOT support CPU MEMORY READS from memory on the ECB. The address, control, and data lines are all there to perform the task but the SBC internal bus control logic is limited for the sake of simplicity. Also, the 1M ROM and 512K RAM is likely sufficient for actual real memory for a relatively simple CP/M or monitor based system. More than that would probably go to a secondary store like a disk drive.
If and when there is ever a next generation SBC, I will probably change the bus control logic to allow CPU MEMORY READS across the ECB. The modification would require changes to the RAM/ROM memory selection logic to allow RAM disabling in order to leave the lower 32K page fully deselected (ie, nothing is there at all, no internal RAM nor ROM) so the ECB peripheral memory would have a "hole" in the CPU address space to exist in. Also, the bus control logic would be changed to allow changing the data bus direction flow in to the SBC from the ECB whenever the SBC requests a memory write from the lower 32K memory page AND the lower 32K memory page has been disabled.
Probably, I could have made those modifications in the initial design but I put them off to lower the risk down on this SBC design. I had strayed off my prototype already in a few areas and I wanted to make sure the PCB version was fairly close to prototype to increase the likelihood it would work. PCB respins are expensive in terms of time and money so risk introduced by "feature creep" is highly undesirable.
In practical terms, having an IO only ECB is not a limitation for all the peripherals I would like to make. Virtually all of the Z80 style peripherals communicate via a IO ports. Even the "pipe dream" video cards (SY6545 and TMS9918) use IO ports only. What would be more difficult to implement would be ECB memory expansion (RAM/ROM) or memory mapped peripherals like a 6845 VDU. However, even those are possible by just using IO ports and latches to simulate the memory accesses. In other words, we are a LONG WAYS away from ever encountering this theoretical limitation and if and when it ever does get realized, there are relatively simple fixes to either get around it or resolve it as needed.
Hopefully this helps explain the SBC ECB bus design a little better. Please let me know if you have any questions. Thanks and have a nice day!
Andrew Lynch