6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Sep 21, 2024 1:57 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: Thu Jan 30, 2020 8:23 pm 
Offline

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

I have the Eyes/Lichty manual in hardcopy now. It says absolutely no such thing.

However, I *have* managed to unearth a WDC datasheet dated 1991, which *does* say so, as an erratum right at the end. I've attached a copy.


Attachments:
WDCIS00025-1.pdf [4.25 MiB]
Downloaded 94 times
Top
 Profile  
Reply with quote  
 Post subject: Re: R65C02P4 fake chips
PostPosted: Fri Jan 31, 2020 3:56 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8390
Location: Midwestern USA
Chromatix wrote:
GARTHWILSON wrote:
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.)

I have the Eyes/Lichty manual in hardcopy now. It says absolutely no such thing.

However, I *have* managed to unearth a WDC datasheet dated 1991, which *does* say so, as an erratum right at the end. I've attached a copy.

Also, note on page 23 the VIL and VIH ratings for the '816. Recall my theory that the current data sheet is wrong and the '816 (and 'C02) must have TTL-compatible inputs in order to work with the currently-available 5 volt SRAM?

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


Last edited by BigDumbDinosaur on Fri Jan 31, 2020 4:34 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: R65C02P4 fake chips
PostPosted: Fri Jan 31, 2020 4:17 am 
Offline

Joined: Mon May 21, 2018 8:09 pm
Posts: 1462
If the SRAM has CMOS output drivers, it'll have no problem satisfying CMOS-style input thresholds.

I suspect that the modern WDC parts can also work with TTL inputs if they are put in a TTL system - and people *have* put a W65C02S in, for example a BBC Micro, with 74LS glue logic everywhere - but that timing margins are significantly worse in that case. In a 2MHz BBC Micro running at 5V, that's not noticeable.

One really amusing note is that the older datasheet lists the '816 and '802 as working down to as little as 1.2V, but only at 40kHz. Perfect for running off a single cell and a watch crystal. Someone should try that with the modern parts.


Top
 Profile  
Reply with quote  
 Post subject: Re: R65C02P4 fake chips
PostPosted: Fri Jan 31, 2020 4:33 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8390
Location: Midwestern USA
Dr Jefyll wrote:
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.

I too am skeptical. Try as I might, I see nothing in the test code that would conclusively prove the device under test is a genuine '816.

_________________
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: Fri Jan 31, 2020 4:37 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8390
Location: Midwestern USA
Chromatix wrote:
If the SRAM has CMOS output drivers, it'll have no problem satisfying CMOS-style input thresholds.

The two SRAMs I've used are specified to produce TTL output levels. Manual testing confirmed that. They pull up to near three volts, but that is still more than a half volt shy of a valid CMOS logic 1 level.

_________________
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: Fri Jan 31, 2020 5:06 am 
Offline
User avatar

Joined: Fri Dec 12, 2008 10:40 pm
Posts: 1005
Location: Canada
Chromatix wrote:
If the SRAM has CMOS output drivers, it'll have no problem satisfying CMOS-style input thresholds.
Definitely. Most of the older design CMOS devices quote specs for TTL environment loads, as this was the expected environment at the time of design. This might have some folk believe they won't meet more up to date CMOS input specs. However, under CMOS environment loads they will perform just fine. Indeed, as you mention, this is to be expected.

Chromatix wrote:
I suspect that the modern WDC parts can also work with TTL inputs if they are put in a TTL system - and people *have* put a W65C02S in, for example a BBC Micro, with 74LS glue logic everywhere
I've put WDC 65C02s into an OSI 600 (Superboard II), a SYM-1 and an Apple IIe and they all worked just fine. In fact the bus signals never looked so good.

_________________
Bill


Top
 Profile  
Reply with quote  
 Post subject: Re: R65C02P4 fake chips
PostPosted: Fri Jan 31, 2020 5:15 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8510
Location: Southern California
The 74xCT245 (74HCT245, 74ACT245, etc.) between the '816 and the system data bus make the thresholds irrelevant, as memory and other devices on the bus don't feed the '816 directly. The '245 is there to prevent bus contention with A16-A23 going into the '573, not give the '816 any additional drive strength (since it doesn't need any help anyway).

_________________
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: Fri Jan 31, 2020 7:55 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10938
Location: England
Interesting to score some '816 parts. It's worth noting that out-of-spec, failed, or rather old parts could turn up on these markets. If it seems to work in a given application, that sounds good to me. If it then fails to work in some other application, I wouldn't be too surprised. Don't go building medical equipment from such sources!

It is of course wrong to expect to get pristine chips from such sources, but I don't suppose anyone is expecting that. If you're inclined to want the genuine article, you know that you need to pay full price from a reputable channel.


Top
 Profile  
Reply with quote  
 Post subject: Re: R65C02P4 fake chips
PostPosted: Fri Jan 31, 2020 8:53 am 
Offline

Joined: Tue Jan 23, 2018 2:55 pm
Posts: 43
BigDumbDinosaur wrote:
I too am skeptical. Try as I might, I see nothing in the test code that would conclusively prove the device under test is a genuine '816.

I don't know of any other 65xx chip which outputs VPB, VDA and VPA signals, and without these it would not be possible to decode the cycle type info. The CPU type determination routine executes opcode 47 as EOR [x]. I tried the mode switching code and it works.
The screens below show EOR [83] and mode switching (see EMX letters changing case) with 24-bit addresses and 16-bit data. Hope this will convince you. :)

Another interesting point: the X mode output changes during the fetch of the next instruction after REP, so even if the CPU is already switched to 24-bit addressing, it doesn't say so. M output changes during the last cycle of REP - correctly. NOPs following mode switch seem to be a good idea regardless of timing issues.

And no, I will definitely NOT design any medical equipment using any 65xx. :)


Attachments:
File comment: 816 mode switching, 24 bit addressing, 16-bit data STA 123456.
816native.png
816native.png [ 18.36 KiB | Viewed 856 times ]
File comment: 816 executing EOR [83] in CPU type detection code.
816typedet.png
816typedet.png [ 18.85 KiB | Viewed 856 times ]
Top
 Profile  
Reply with quote  
 Post subject: Re: R65C02P4 fake chips
PostPosted: Fri Jan 31, 2020 1:44 pm 
Offline
User avatar

Joined: Fri Dec 12, 2008 10:40 pm
Posts: 1005
Location: Canada
One could simply put a scope on pin-3. If it's any kind of 6502 you'd see a clock signal there. If it's a 65816 you won't.

_________________
Bill


Top
 Profile  
Reply with quote  
 Post subject: Re: R65C02P4 fake chips
PostPosted: Fri Jan 31, 2020 4:53 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8390
Location: Midwestern USA
BillO wrote:
One could simply put a scope on pin-3. If it's any kind of 6502 you'd see a clock signal there. If it's a 65816 you won't.

That would depend upon which package is being used. Pin 3's assignment is different in each case.

gbm wrote:
NOPs following mode switch seem to be a good idea regardless of timing issues.

The firmware code in my POC V1.1 unit is peppered with REPs and SEPs that are immediately followed by regular instructions, not NOPs. I've never had any issues with mode switches, even at 15 MHz. Whatever timing errata my have existed in the past with REP and SEP seems to have been eliminated.

BigEd wrote:
Interesting to score some '816 parts. It's worth noting that out-of-spec, failed, or rather old parts could turn up on these markets.

Funny you mention that. Years ago, Dell computers had an unusually high hard drive failure rate, with quite a few barely making it past the one year warranty period. It turned out Dell had been purchasing drives from manufacturers that had rejected product due to the drives not formatting to rated capacity due to magnetic media defects. So the (relabeled) drives were being reformatted to lower capacities, marked as such and dumped on the "secondary" market at a fraction of the going price. Dell, seeing an opportunity to improve sales margin on their product, bought a large number of these drives and screwed their customers in the process.

_________________
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: Fri Jan 31, 2020 5:15 pm 
Offline

Joined: Mon May 21, 2018 8:09 pm
Posts: 1462
Okay, question for my own purposes: is there a difference in the behaviour of the MX signal between the old 65816 and the current one? Running the same code sequence on a genuine current '816 and carefully sampling the signal should answer that question. It's a test I can incorporate into the 6502 Fake Finder, if there is indeed a detectable difference.


Top
 Profile  
Reply with quote  
 Post subject: Re: R65C02P4 fake chips
PostPosted: Fri Jan 31, 2020 5:37 pm 
Offline
User avatar

Joined: Fri Dec 12, 2008 10:40 pm
Posts: 1005
Location: Canada
BigDumbDinosaur wrote:
BillO wrote:
One could simply put a scope on pin-3. If it's any kind of 6502 you'd see a clock signal there. If it's a 65816 you won't.

That would depend upon which package is being used. Pin 3's assignment is different in each case.
Quite true.

_________________
Bill


Top
 Profile  
Reply with quote  
 Post subject: Re: R65C02P4 fake chips
PostPosted: Fri Jan 31, 2020 6:17 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
gbm wrote:
I don't know of any other 65xx chip which outputs VPB, VDA and VPA signals, and without these it would not be possible to decode the cycle type info.
gbm, I'm a little uncertain, and other may be, too. You seem to imply that the screen shots you posted reveal info based on signals from a real, physical '816... but you didn't actually say so (and the line up top about "Software-Defined Computer" confuses the matter by sounding like a simulation instead). Can you be explicit please regarding all the details of what's in the scree shots? Thanks.

_________________
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: Fri Jan 31, 2020 6:21 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
On another subject, the sad truth is that increasing numbers of modern 5 volt CMOS devices (example: many RAMs, and at least one CPLD I'm aware of) do not produce rail-to-rail voltage swings on their outputs. The logic high falls short of Vcc (even short of a valid CMOS logic high, as BDD noted).

That may seem absurd -- after all, the C in CMOS means complementary! But the effect is as if the chip's internal Vcc is somewhat lower than the +5 that arrives from the outside world. And indeed that may actually be the case. :shock:

Somewhere (here on this forum?) I heard an explanation which seems plausible although I can't verify it. Modern geometries are smaller than those used in legacy 5 volt stuff, and smaller translates to more cost-effective for the manufacturer. But modern geometries are also low voltage, 3.3 volt for instance. So, nowadays manufacturers are in some cases supplying the 5V market with chips that operate at a lower supply voltage internally. It's trivially easy to make the inputs 5-volt tolerant. The outside world won't "notice" this aspect of low-voltage operation. But with outputs it's a different story.

Does anyone have authoritative details on this? The datasheets don't explain reasons, of course. But they do tell us not to expect symmetrical (ie, rail-to-rail) voltage swings on the outputs.

-- 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  
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 7 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: