BitWise wrote:
This should make the 65C02 compatible with a socket wired for a 6502. Can anyone see anything I've missed?
Sounds good, Andrew. Just remember other manufacturers' 'C02s are pin-exact replacements, made to drop straight into an NMOS '02 socket. IOW your adapter idea has relevance only if you're intent on using a WDC chip. Also, the WDC wouldn't
need any adapter if you tied BE high and just cut off pins 1 and 5 (VPB and MLB). I admit the idea makes me cringe, but those rather esoteric signals are unlikely to ever get used.
The WDC will
output a low on RDY should a WAI instruction ever be executed, so
ideally you should insert a current-limiting resistor in series. But in an adapter scenario that won't be easy to do, and I myself wouldn't bother. I believe the risk of permanent damage to the chip is small -- and it's further minimized by the unlikelihood of a WAI executing in the first place.
BTW an alternative way of isolating CPU pin 1 from pin 1 on the board is to simply bend the CPU pin sideways about 45 degrees so when you plug it in it doesn't engage the socket on the board. You might also want to check that pin 5 on the board is indeed a no-connect (per NMOS), and hasn't been co-opted as a via or something. The WDC '02 outputs MLB on pin 5.
BitWise wrote:
When the PIC boots I'm going to execute a dummy JMP ($00FF) and see which address is accessed for the high byte ($0000 = 6502, $0100 = 65C02) to determine the processor type.
Nice idea, detecting the NMOS $6C bug -- but are you serious?
Do you really want to be able to detect an NMOS chip??? Don't answer; I don't care if you
are joking -- it's a fun little problem to solve!
The $6C instruction is one clock slower on the 'C02, and that could be detected by monitoring SYNC. Conversely, the 'C02 is one clock
faster for a Read/Modify/Write instruction absolute indexed in same page. Or you could stage a write, and see if pulling RDY low produces any effect... The list of NMOS/CMOS differences goes on!
cheers,
Jeff
_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html