Re: TTL 6502 Here I come
Posted: Sun Apr 10, 2016 11:44 pm
A brief update on the 65C02 implementation. It turns out that the circuits required for the remaining incompatibilities are straight forward and compact after all! Here is what it looked like:
Wow. Never thought I would get to this point!
Cheers,
Drass
- A single 7474 latch captures the /SO pin transition and generates a low-going pulse to the PRE input of the V Flag flipflop in the status register. The ALU can easily clobber this depending on what instructions are being executed at the time, but so far as I can tell, there is not need to protect against this. It's a "programmer beware" scenario for this one. (Btw, I realize the 6502 has an /SO pin, but I had left it unimplemented to this point. Feels good to get it done now).
- /VP required only a single NAND gate! Turns out a couple of signals which trigger the Constant Generators for the vector addresses could be easily used as inputs to a NAND to generate /VP.
- /ML was trickier. /ML goes low on the Modify cycle of Read/Modify/Write instructions. The Rockwell data sheet says the signal should of high again after the Write cycle, but the WDC data sheet specifies /ML should remain low for three cycles to the end of the instruction sequence (essentially to the next opcode fetch in the Read/Modify/Write/Opcode-fetch sequence which all RMW instructions share). The WDC spec is easier to implement since the end of the instruction is a clear point to bring /ML high again. So, a specific signal from the microcode sets the /ML flipflop on PHI2 of the Read cycle and the end of the instruction sequence clears it.
- STP and WAI are also triggered by specific signals from the microcode. A couple of NAND gates take RDY and BE low as necessary to stop the clock and tri-state the busses. The interrupt signals are used to free RDY and BE once again thereafter. Thankfully, Dieter (ttlworks) made quick work of dealing with the bi-directional nature of RDY on the 65C02., which would have stumped me completely

Cheers,
Drass