6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Mon Apr 29, 2024 4:36 am

All times are UTC




Post new topic Reply to topic  [ 76 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next
Author Message
PostPosted: Mon Feb 24, 2020 11:23 pm 
Offline

Joined: Tue Jun 19, 2018 8:28 am
Posts: 122
Usually I have quite good experience with vintage electronic parts bought on Aliexpress. They work as they should.
Unfortunately there is also a negative aspect - chips are usually "refurbished" by sanding off original descriptions and applying new ones, to make chips look "brand new". So in fact you can never be sure if your MOS6502 is genuine MOS part, some compatible CPU by other manufacturer or completely different DIP40 chip. Usually I do not mind as long they work properly, but today I encountered weird situation.

Some time ago I've ordered dozen of 6502 on Aliexpress. Package arrived today. I tried to test them with my homemade computer, which works fine with different 6502 (albo bought on Aliexpress). I put first chip in the socket and for a moment it looked like it was running fine. It showed cold/warm boot message and executed EhBasic. So it was running 6502 code. Unfortunately just one moment later some error message from EhBasic had been printed and since then I wasn't able to run it once again. Even after reset or power cycle nothing happened. I've tried several other chips from the same order, but with no luck - EhBasic didn't run. After putting original CPU everything went back to normal.

Normally I would simply assume that chips are fake - completely different parts with fake designations, having nothing in common with 6502. I would, but one of them was able to run 6502 code for one brief moment.

So maybe they are some counterparts from different manufacturer, with slightly different application. Maybe some pin is left not pulled up or down and because of thet CPU can;t maintain stable operation? Is it possible?

Chips are described as:

"MOS
6502AD
4210"


Top
 Profile  
Reply with quote  
PostPosted: Mon Feb 24, 2020 11:40 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8428
Location: Southern California
Link to Ed's topic, "Bargain chips bought online - buyer beware!": viewtopic.php?f=12&t=5946

Link to our sticky topic "65xx parts sources, genuine and fake": viewtopic.php?f=1&t=1953

_________________
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  
PostPosted: Tue Feb 25, 2020 12:20 am 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3349
Location: Ontario, Canada
Atlantis wrote:
Maybe some pin is left not pulled up or down and because of thet CPU can;t maintain stable operation? Is it possible?
Yup. For example, perhaps the CPU's you bought are newer ones that use pin 36 as a Bus Enable input (which needs to be pulled high) but your computer has no connection to pin 36 on the CPU socket because it was designed to use older CPU's such as NMOS 6502 or Rockwell 65C02.

Have a look to see what attaches to pin 36 on the CPU socket. :wink:

_________________
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  
PostPosted: Tue Feb 25, 2020 2:51 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8154
Location: Midwestern USA
Atlantis wrote:
4210

A 2010 date code wouldn't be valid for an NMOS part.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 25, 2020 3:49 am 
Offline

Joined: Mon May 21, 2018 8:09 pm
Posts: 1462
There are a number of different hardware variants in the 6502 family, each with slightly different pinouts and auxiliary functionality - most famously the cut-down 28-pin 6504 and 6507, but also some full-fat 40-pin versions. The modern W65C02S is *mostly* a superset of these, but…

Consider the humble BBC Micro. It uses an NMOS 6502, right? Correct. The later BBC Master uses a 65C02, right? Wrong.
Attachment:
Acorn-Master-AIV-internal.jpg
Acorn-Master-AIV-internal.jpg [ 1009.29 KiB | Viewed 2790 times ]

Examining the above photo of an expanded Master Turbo, you should be able to find two CPUs. The one on the actual motherboard belongs to the Master proper - it's a 65SC12, lacking both the Rockwell instructions, a RDY input, and a Phi1 clock output - but unlike a 6502, it does have a Data Bus Enable pin, which might save you an octal transceiver in some applications. And the one on the daughterboard front and centre is a 65C102, which take a quadrupled clock and produces a quadrature clock for you, convenient for high-performance DRAM interfacing, as this 4MHz internal Second Processor card does. As proof, there's a 16MHz crystal visible.

In the NMOS family, there's also the 6512 which requires Phi1 as an input. Normally it's produced as an output (and many SBCs happily ignore it).

For a quick diagnosis, the good old NOP generator might be a good idea. Refer to the WDC datasheet, and make sure all inputs for the WDC part are correctly provided. Your chips should all do something recognisable with that. Then look for signals *not* provided by your SBC but required by the WDC part. Finally, check the cheat sheet below to see if there's a chip that lacks a signal your SBC relies on, or handles so much differently that things may be going very wrong.
Attachment:
Screenshot 2020-02-25 04.47.50.png
Screenshot 2020-02-25 04.47.50.png [ 97.57 KiB | Viewed 2790 times ]


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 25, 2020 5:38 am 
Offline

Joined: Tue Jun 19, 2018 8:28 am
Posts: 122
Dr Jefyll wrote:
Yup. For example, perhaps the CPU's you bought are newer ones that use pin 36 as a Bus Enable input (which needs to be pulled high) but your computer has no connection to pin 36 on the CPU socket because it was designed to use older CPU's such as NMOS 6502 or Rockwell 65C02.


Like WDC65C02? I already thought about it.
I tried to put it into my other design, utilizing WDC CPU. It also didn't work.
Is there some other variant? Normally I'd ignore it coming to the conclusion that chips are completely different parts, relabeled as 6502s. But one of them was able to briefly run 6502 code...

BigDumbDinosaur wrote:
A 2010 date code wouldn't be valid for an NMOS part.


Yes, of course it wouldn't. You have to take designations of chips bought on Aliexpress with a grain of salt. They are usually relabeled. And of course people doing it don't care about putting accurate description on each chip. They put the same label on entire batches. Date code is most likely pure fiction. Until yesterday chips I bought were more or less what seller claimed them to be - I mean they worked after putting them in socked. Only once on eBay I bought parts that supposed to be CMOS version of 6502, but in the end they turned out to be NMOS parts, still working however.

Also: chips came stacked up on each other and wrapped in packing foil. Is it very likely that they were damaged during packing/unpacking, by the static discharge?


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 25, 2020 6:38 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8154
Location: Midwestern USA
Chromatix wrote:
For a quick diagnosis, the good old NOP generator might be a good idea. Refer to the WDC datasheet, and make sure all inputs for the WDC part are correctly provided. Your chips should all do something recognisable with that. Then look for signals *not* provided by your SBC but required by the WDC part. Finally, check the cheat sheet below to see if there's a chip that lacks a signal your SBC relies on, or handles so much differently that things may be going very wrong.

Also note that when the W65C02's and 65C816's BE input is negated RWB is tri-stated as well as the address and data buses.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 25, 2020 6:43 am 
Offline

Joined: Mon May 21, 2018 8:09 pm
Posts: 1462
Yes, I'd say that's a likely candidate for those symptoms. As well as the WDC parts, my cheat sheet says it's on the '102 and '112 parts; where the "bus tristate" column contains "address & data".

If you can't figure it out, or find that those chips work but are somehow useless for you, I'll gladly take them off your hands for use in my 6502 Fake Finder project. I'm going to need test cases, after all!


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 25, 2020 10:30 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10793
Location: England
Chromatix wrote:
... the Master proper - it's a 65SC12, lacking both the Rockwell instructions, a RDY input, and a Phi1 clock output ...


Hmm, I see there are sources which say the 65CSC12 lacks RDY, but it's there on the schematic of the Master! And it works for both read and write cycles, so (IIRC) the Master doesn't need the clock stretching that the Beeb uses.


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 25, 2020 12:03 pm 
Offline

Joined: Sun Jun 29, 2014 5:42 am
Posts: 337
BigEd wrote:
Hmm, I see there are sources which say the 65CSC12 lacks RDY, but it's there on the schematic of the Master! And it works for both read and write cycles, so (IIRC) the Master doesn't need the clock stretching that the Beeb uses.

The data sheet itself is inconsistent:
http://archive.6502.org/datasheets/cmd_ ... family.pdf

Specifically, table 1 on the first page is inconsisent with the later pinouts, which indicate RDY present on all devices.

Dave


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 25, 2020 1:43 pm 
Offline

Joined: Tue Jun 19, 2018 8:28 am
Posts: 122
Is it possible to design some "universal" CPU board, which would be able to support any member of 6502 family?
I would like to modify my CPU board design by adding some jumpers of dip switches, to test different processors. Which pins are common for all 6502 CPUs an which differ in function somehow?


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 25, 2020 2:53 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3349
Location: Ontario, Canada
The humble Throw-Together Computer is built to accept different 65xx processors. Though not completely "universal" it does support the '816, the WDC version of the 'C02 and the original NMOS 6502 (whose pinout is the same as older C02's such as Rockwell). Perhaps you'll find this diagram from my notes helpful.

A red dot shows where a pin's function varies from that of its counterparts. (In some cases WDC has assigned new names even though the function remains the same.) The notations in blue show what the TTC motherboard attaches to each specific pin.

Although RDY (pin 2) is unused I gave it a pullup, rather than tying it straight to VCC. That's to protect WDC CPU's, which sometimes drive RDY low.

-- Jeff


Attachments:
pinouts jumpers 02.png
pinouts jumpers 02.png [ 48.8 KiB | Viewed 2720 times ]

_________________
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  
PostPosted: Tue Feb 25, 2020 4:17 pm 
Offline

Joined: Mon May 21, 2018 8:09 pm
Posts: 1462
The 6502 Fake Finder is effectively a simple SBC with universal 40-pin 65xx support. The hard parts are the NMOS 6512 (the only one to require a Phi1 input), and supporting both the '816 and the '102 variant - as the '816 doesn't have a Phi2 output, but on everything else it's the most reliable way to adapt the bus timing to the possibility of encountering a '102. I figured out a way to do this with two jumpers and a small number of passive components; I figure the 6512 and '816 will be rare enough on the Chinese fakes market that you can leave them set for a standard 6502, most of the time.

This approach works because many of the pins and signals are indeed common across the 65xx family, enough to boot the machine and interface it to RAM, ROM and basic I/O devices. The rest can be tied off to safe input values where necessary, or ignored as outputs. I don't completely ignore the unused outputs though, but wire them through a multiplexer to a pair of shift registers and the input port of a 6522 VIA. By sampling a time history of those signals while executing a known instruction sequence, I can distinguish between all of the models listed in my cheat-sheet.


Top
 Profile  
Reply with quote  
PostPosted: Wed Feb 26, 2020 7:25 am 
Offline

Joined: Tue Jun 19, 2018 8:28 am
Posts: 122
I had some free time last evening, so I testem entire batch of ordered 6502 CPUs. Out of a dozen only one works perfectly fine with my computer. I left it running simply BASIC code for night and it was still running in the morning.
I am not quite sure what to think about the rest of them. Normally I'd simply assume they are damaged, if not the aforementioned situation with one of them working for a short while.

Anyway, I've ordered ten more from different seller. I hope this time I will have more luck...


Top
 Profile  
Reply with quote  
PostPosted: Wed Feb 26, 2020 9:22 am 
Offline
User avatar

Joined: Sat Dec 01, 2018 1:53 pm
Posts: 727
Location: Tokyo, Japan
Atlantis wrote:
Out of a dozen only one works perfectly fine with my computer.

You don't mention anything about the board you're using. Is it designed to work with NMOS CPUs? Given that many failures, and that one of your parts kinda worked for a bit, I'd start to suspect that there may be something about your board incompatible with them.

I'd chuck each CPU into a breadboard wired up with NOP pull-ups/downs on the data bus. You'll need to pull up the interrupt pins, etc., too, and make sure you both have plenty enough power to run an NMOS chip (200 mA or more should be fine, since you won't have any memory or I/O chips), and that you have a full 5 V or very close to it on the Vcc pin. (Also make sure you use bypass caps somewhere near each power pin.) Clock the chips at 800 kHz - 1 MHz. After bringing /RESET low than high again, see if the address bus is counting up as expected. (You should see a 500 kHz square wave on A0, 250 kHz on A1, etc.)

I've got six used "R65C02" CPUs from various vendors (including at least four from AliExpress), and of those fully half of them are actually relabeled 1 MHz NMOS parts.

_________________
Curt J. Sampson - github.com/0cjs


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 25 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: