R65C02P4 fake chips

For discussing the 65xx hardware itself or electronics projects.
Chromatix
Posts: 1462
Joined: 21 May 2018

Re: R65C02P4 fake chips

Post by Chromatix »

I think the Rockwell logo looks better than an MOS, CMD or Synertek one. It's a brand name that people recognise and appreciate; there was a time when a Rockwell modem chipset was the one to aim for.
User avatar
cjs
Posts: 759
Joined: 01 Dec 2018
Location: Tokyo, Japan
Contact:

Re: R65C02P4 fake chips

Post by cjs »

Hm. I went looking for what happened to Rockwell Semiconductors and discovered they were spun off as Conexant in 1999. Then I found this image on Ebay, which seems to make it clear that Conexant did change the branding on their chips:
conexant-R65C02P3.jpg
So yeah, sounds like we should never see a "Rockwell" part with a date code after 2000 or so.

And yeah, my thought too was that folks were demanding "Rockwell" from AliExpress suppliers, so they decided to satisfy that demand. :-)
Curt J. Sampson - github.com/0cjs
User avatar
BillO
Posts: 1038
Joined: 12 Dec 2008
Location: Canada

Re: R65C02P4 fake chips

Post by BillO »

One sure way to tell if your R65C02 is a real CMOS or a relabeled NMOS version is to measure the current the chip draws. The CMOS version will draw between 4mA and 16mA, the NMOS version will draw between 70mA and 160mA. It's quite striking.

So, if your cheap and cheerful R65C02 works more or less like a 6502 and draws less than 20mA, then it's more or less legit.

I have Rockwell branded R65C02P4 that works perfectly and draws only 15mA @ 4MHz, is marked MEXICO and has a date code of 0815. It has markings on the bottom. So, either the date code is wrong, or Rockwell branded chips were being made in 2008 in Mexico. It is, however, a perfectly operational R65C02

All my other Rockwell R65C02P4s have dates between '90-'93, they all work, draw less than 16mA and have nothing printed on the bottom.

It should be noted (and I've mentioned this here before) Conexant sold their facility in Mexico to NXP in 2008. It is entirely possible that NXP obtained the right to market the chips under the Rockwell brand which was possibly up for grabs after 2001. They do seem to do this with other brands they acquire.
Bill
Chromatix
Posts: 1462
Joined: 21 May 2018

Re: R65C02P4 fake chips

Post by Chromatix »

A 6502 with CMOS power consumption but has clearly been re-marked as Rockwell may actually be a 65SC02 rather than a 65C02. The difference is in the S/RMB and BBR/S instructions, which only the Rockwell and WDC parts have. On a 65SC02 these opcodes (in the $x7 and $xF ranges) will be 1-byte, 1-cycle NOPs.

It should be possible to devise a short instruction sequence that identifies the four major 6502 core families, using for example the $A7 and $AF opcodes. There are several simple ways to distinguish NMOS from CMOS 6502s in software, but the finer distinctions are less commonly checked.
Chromatix
Posts: 1462
Joined: 21 May 2018

Re: R65C02P4 fake chips

Post by Chromatix »

Okay, here's a dainty little 20-byte program which can distinguish between four core families upon the behaviour of the $47 opcode, leaving the following ASCII codes in the accumulator:

Code: Select all

; N - NMOS 6502
; S - 65SC02
; C - 65C02 or 65CE02
; 8 - 68C816 or 65C802
TestCPU:
LDA #0
STA $84
STA $85
LDA #$1D ; 'N' EOR 'S'
STA $83
LDA #$25 ; 'N' EOR 'S' EOR '8'
STA $1D
LDA #$4E ; 'N'
RMB4 $83 ; magic $47 opcode
EOR $83

; output routine for BBC Micro
JSR $FFEE ; OSWRCH
JSR $FFE7 ; OSNEWL
RTS
The $47 opcode is EOR [dp] on the 65816, RMB4 zp on the 65C02, a 1-byte NOP on the 65SC02 (as is the $83 operand), and SRE zp (LSR then EOR) on NMOS. Have fun figuring out how the jigsaw fits together - but it does!
User avatar
cjs
Posts: 759
Joined: 01 Dec 2018
Location: Tokyo, Japan
Contact:

Re: R65C02P4 fake chips

Post by cjs »

Well, curiosity finally got the better of me and I went and breadboarded up one of my "Rockwell R65C02P4" parts to see if it worked, at least in a basic way.

I used a 4 MHz crystal oscillator, both directly into the Φ0 input of the MPU and divided down via a 74LS161 to get 2 MHz and 1 MHz clocks, so I could test at all three of those clock frequencies. I did the usual thing with pull-ups and pull-downs to have a running system with NOP ($EA) on the data bus.

The good news is that it seems to do the right thing (address bus incrementing every two clock cycles) at 1 MHz, 2 MHz and even 4 MHz. So it's some sort of 6502, at least, and doesn't totally fail at the rated speed.

But the bad news is that it draws around 100 mA (the same at all three frequencies), which points to it being an NMOS part, right? And I'm also thinking that maybe it's not really a 4 MHz part: at 1 MHz my Φ2 output looks pretty squarish (better than some I've seen), but at 4 MHz the rising edge is more a casual, "I'll get there eventually" curve that takes most of its half of the cycle to get near the peak. Now I am a total noob when it comes to real-world clock signals, but this doesn't look so good to me.
R65C02_4Mhz_phi0_phi2.png
Anyway, now that I've started in on this, I'm thinking I may just cons up a little SBC with ZIF sockets and jumpers that would let me more easily test this stuff, both with hardwired NOP (ideally set with a DIP switch so I can test different NOPs) and test programs in an EEPROM. Plus I guess I could use it for development or something.
Curt J. Sampson - github.com/0cjs
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: R65C02P4 fake chips

Post by BigEd »

I think it's normal for NMOS to struggle with driving to the rail, so that's evidence and maybe also an excuse. So long as the on-chip clocks are good enough, that might be good enough.
gbm
Posts: 43
Joined: 23 Jan 2018

Re: R65C02P4 fake chips

Post by gbm »

I was happy to find out that my nicely printed, new Chinese R65C02 is a 65C02 (no R, no WDC, no SC), so I am quite lucky with my latest shopping results. ;) Some time ago I bought "UMC W65C02S" which also was an ordinary 65C02, laser remarked.
There is, however, a real, non-remarked bargain at Ali - 3 pcs. of 65C816 for $4.1. Got these already, verified positively.
I am still unable to find 65SC02 for adding to my collection of CMOS 6502 chips. Anyone willing to exchange 65SC02 for some other CPU?
User avatar
Dr Jefyll
Posts: 3526
Joined: 11 Dec 2009
Location: Ontario, Canada
Contact:

Re: R65C02P4 fake chips

Post by Dr Jefyll »

gbm wrote:
There is, however, a real, non-remarked bargain at Ali - 3 pcs. of 65C816 for $4.1. Got these already, verified positively.
May I ask, who is the seller and how did you verify?

-- Jeff
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
User avatar
BigDumbDinosaur
Posts: 9426
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: R65C02P4 fake chips

Post by BigDumbDinosaur »

Dr Jefyll wrote:
gbm wrote:
There is, however, a real, non-remarked bargain at Ali - 3 pcs. of 65C816 for $4.1. Got these already, verified positively.
May I ask, who is the seller and how did you verify?
Like Jeff, I'm curious as well how it was determined the supposed 65C816's are the real McCoy. What is the full part number on the 65C816s you have?
x86?  We ain't got no x86.  We don't NEED no stinking x86!
gbm
Posts: 43
Joined: 23 Jan 2018

Re: R65C02P4 fake chips

Post by gbm »

If it executes 65C816 code and produces all those fancy 65C816 signals for cycle type and emulation mode identification, then it must be 65C816. Any other explanation of this phenomenon?
The part number printed (not engraved) is W65C816SP-8. The 3 chips I got had different date codes from around 95.
There is only one seller selling 3 pcs. packs. Gee, just two months ago it was the only seller offering 65C816. Checked today - there are many more, so the chances to buy remarked 6502 as 65C816 increase. ;(
Attachments
65C816 reset and OSI Basic startup, various cycle types identified via 65C816 status signals (Opcode Fetch, Program Read, data ReaD, data WRite, spurious fetch).
65C816 reset and OSI Basic startup, various cycle types identified via 65C816 status signals (Opcode Fetch, Program Read, data ReaD, data WRite, spurious fetch).
User avatar
Dr Jefyll
Posts: 3526
Joined: 11 Dec 2009
Location: Ontario, Canada
Contact:

Re: R65C02P4 fake chips

Post by Dr Jefyll »

gbm wrote:
If it executes 65C816 code and produces all those fancy 65C816 signals for cycle type and emulation mode identification, then it must be 65C816. Any other explanation of this phenomenon?
Sorry -- I guess my post sounded skeptical. But I don't dis-believe you -- wasn't intending to attack your conclusion; was just curious what info you're using. Maybe I'll buy some of those chips myself.

But you didn't answer my question about the vendor! Is there no name? (Better yet, a link) Or do you think I should just order a 3-pack and hope for the best? :|

-- Jeff
Last edited by Dr Jefyll on Thu Jan 30, 2020 7:58 pm, edited 1 time in total.
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
gbm
Posts: 43
Joined: 23 Jan 2018

Re: R65C02P4 fake chips

Post by gbm »

Chromatix wrote:
Okay, here's a dainty little 20-byte program which can distinguish between four core families upon the behaviour of the $47 opcode, leaving the following ASCII codes in the accumulator:

Code: Select all

; N - NMOS 6502
; S - 65SC02
; C - 65C02 or 65CE02
; 8 - 68C816 or 65C802

The $47 opcode is EOR [dp] on the 65816, RMB4 zp on the 65C02, a 1-byte NOP on the 65SC02 (as is the $83 operand), and SRE zp (LSR then EOR) on NMOS. Have fun figuring out how the jigsaw fits together - but it does!
Actually it prints 'v' (hex 76) on 65C816, and that's quite expected: 4e xor 25 xor 1d ;)

Jeff: my mistake, or even two mistakes; please accept my apologies. Just realized that I ordered 3 times x 1 chip, not 3pcs. together. The seller was "Shop1157182 Store". Two of the chips are marked W65C816SP-8, one was laser-marked W65C816S6PG-14, but the marking seemed original - the same kind as the only original WDC W65C02S in my possession, bought from a legitimate source by my friend. All three of them are true 65C816s and work OK.
User avatar
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: R65C02P4 fake chips

Post by GARTHWILSON »

Something that would be good to test on the 816's: Early versions needed a NOP after REP and SEP above 4MHz. (I think that information came from the Eyes & Lichty manual, but I can't remember for sure.)
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
gbm
Posts: 43
Joined: 23 Jan 2018

Re: R65C02P4 fake chips

Post by gbm »

Ok, this works on 816, I need to check it on my C02s:

Code: Select all

TestCPU:
	LDA #0
	STA $84
	STA $85
	LDA #$1D ; 'N' EOR 'S'
	STA $83
	LDA #$6B ; 'S' EOR '8'
	STA $1D
	LDA #$4E ; 'N'
	RMB4 $83 ; magic $47 opcode
	EOR $83
	STA	io_dr
Update: works on 65C02 and 816.
SDC runs at approx. 500..600 kHz, so no way to check anything at 4 MHz. :(

Another update: checked all my 65C02s
The new, printed "R65C02P" and the old, engraved "UMC W65C02S" from Ali both execute RMB and other Rockwell opcodes, but do not support WDC-specific WAI. So they both look like Rockwell-compatible.
Last edited by gbm on Thu Jan 30, 2020 9:42 pm, edited 2 times in total.
Post Reply