cr1901 wrote:
GARTHWILSON wrote:
If you later go to the 65816, you will need to bring Φ2 into the ROM's output enable, to avoid bus contention when Φ2 is low since the processor will be trying to force the bank address onto the data bus while the ROM will be trying to force its output data onto the same bus at the same time.
Is that actually necessary?
As a general rule, a chip's write-enable input
should not be asserted on Ø2 low with any 6502 MPU, not just the '816. The reason for this is the data bus is never valid when Ø2 is low with the 6502 or 65C02, and when Ø2 is low during a valid memory cycle, the data bus is being driven by the 65C816 with the bank bits (A16-A23). Write-enabling a device during that time on a 65(c)02 machine will cause random data to be written into the device, or will cause the bank bits to be written on a 65C816 machine. In some cases, this behavior will cause an I/O device to malfunction, as the bit pattern on D0-D7 won't be stable while /WE is asserted.
It is recommended that a device's output-enable also be gated by Ø2, as no member of the 6502 family reads the data bus when Ø2 is low. In the case of the 65C816, devices
MUST NOT be output-enabled during Ø2 low, as that is when the '816 is driving the bank bits on to D0-D7. This requirement may be met by gating write-enables with Ø2 or by using a bus transceiver (e.g., a '245) to isolate the data bus during Ø2 low. Failure to do so will likely cause bus contention and interfere with the 65C816's ability to emit the bank bit pattern.
Note that RWB, chip selects and register selects for the 65C21, 65C22 and 65C51 should not be qualified by Ø2—all of these inputs on these devices must be stable before the rise of Ø2.