6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Apr 26, 2024 10:54 pm

All times are UTC




Post new topic Reply to topic  [ 86 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next
Author Message
 Post subject: Re: R65C02P4 fake chips
PostPosted: Wed Jan 29, 2020 12:33 pm 
Offline

Joined: Mon May 21, 2018 8:09 pm
Posts: 1462
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: R65C02P4 fake chips
PostPosted: Wed Jan 29, 2020 12:34 pm 
Offline
User avatar

Joined: Sat Dec 01, 2018 1:53 pm
Posts: 727
Location: Tokyo, Japan
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:
Attachment:
conexant-R65C02P3.jpg
conexant-R65C02P3.jpg [ 28.15 KiB | Viewed 1406 times ]

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


Top
 Profile  
Reply with quote  
 Post subject: Re: R65C02P4 fake chips
PostPosted: Wed Jan 29, 2020 2:09 pm 
Offline
User avatar

Joined: Fri Dec 12, 2008 10:40 pm
Posts: 1000
Location: Canada
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


Top
 Profile  
Reply with quote  
 Post subject: Re: R65C02P4 fake chips
PostPosted: Wed Jan 29, 2020 4:43 pm 
Offline

Joined: Mon May 21, 2018 8:09 pm
Posts: 1462
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: R65C02P4 fake chips
PostPosted: Wed Jan 29, 2020 9:39 pm 
Offline

Joined: Mon May 21, 2018 8:09 pm
Posts: 1462
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:
; 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!


Top
 Profile  
Reply with quote  
 Post subject: Re: R65C02P4 fake chips
PostPosted: Thu Jan 30, 2020 9:48 am 
Offline
User avatar

Joined: Sat Dec 01, 2018 1:53 pm
Posts: 727
Location: Tokyo, Japan
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.

Attachment:
R65C02_4Mhz_phi0_phi2.png
R65C02_4Mhz_phi0_phi2.png [ 51.95 KiB | Viewed 1343 times ]


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


Top
 Profile  
Reply with quote  
 Post subject: Re: R65C02P4 fake chips
PostPosted: Thu Jan 30, 2020 10:51 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10793
Location: England
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: R65C02P4 fake chips
PostPosted: Thu Jan 30, 2020 12:19 pm 
Offline

Joined: Tue Jan 23, 2018 2:55 pm
Posts: 43
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?


Top
 Profile  
Reply with quote  
 Post subject: Re: R65C02P4 fake chips
PostPosted: Thu Jan 30, 2020 2:15 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3346
Location: Ontario, Canada
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


Top
 Profile  
Reply with quote  
 Post subject: Re: R65C02P4 fake chips
PostPosted: Thu Jan 30, 2020 5:23 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8144
Location: Midwestern USA
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!


Top
 Profile  
Reply with quote  
 Post subject: Re: R65C02P4 fake chips
PostPosted: Thu Jan 30, 2020 6:30 pm 
Offline

Joined: Tue Jan 23, 2018 2:55 pm
Posts: 43
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:
File comment: 65C816 reset and OSI Basic startup, various cycle types identified via 65C816 status signals (Opcode Fetch, Program Read, data ReaD, data WRite, spurious fetch).
65C816start2.png
65C816start2.png [ 18.77 KiB | Viewed 1293 times ]
Top
 Profile  
Reply with quote  
 Post subject: Re: R65C02P4 fake chips
PostPosted: Thu Jan 30, 2020 7:28 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3346
Location: Ontario, Canada
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

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Last edited by Dr Jefyll on Thu Jan 30, 2020 7:58 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: R65C02P4 fake chips
PostPosted: Thu Jan 30, 2020 7:58 pm 
Offline

Joined: Tue Jan 23, 2018 2:55 pm
Posts: 43
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:
; 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.


Top
 Profile  
Reply with quote  
 Post subject: Re: R65C02P4 fake chips
PostPosted: Thu Jan 30, 2020 8:02 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8428
Location: Southern California
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?


Top
 Profile  
Reply with quote  
 Post subject: Re: R65C02P4 fake chips
PostPosted: Thu Jan 30, 2020 8:11 pm 
Offline

Joined: Tue Jan 23, 2018 2:55 pm
Posts: 43
Ok, this works on 816, I need to check it on my C02s:
Code:
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.

Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 86 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 22 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: