Anders Nielsen 3:42 PM
Pot stirring time. The 65C02. I might sound like I have strong opinions about it sometimes... But.. I just feel it came around at a point where it was just "another micro".
|
Anders Nielsen 3:43 PM
Am I right the Rockwell C02's are pin compatible but the WDC's are not?
|
Mitsuru Yamada 3:45 PM
The 65C02 surprised me at the time with its low power consumption.
|
J.B. Langston 3:45 PM
yeah, the wdc is not pin compatible but can be made so with a few simple mods https://kerosmacmods.fc2.net/blog-entry-12.html
|
Anders Nielsen 3:45 PM
For my "bigger" #ABN6502 SBC R1, I had to add jumpers for the WDC but I believe a lot of relabelled ones that turned out to be C02's actually works without the jumpering.
|
J.B. Langston 3:46 PM
i have put one in my apple IIe that came with an original 6502 and it worked, though i later purchased an enhancement kit from reactive micro which came with a rockwell 65c and the updated roms
|
Xark 3:47 PM
From my understanding PIN 1 is slightly different in WDC 65C02 (it is an input and output so needs a resistor or similar). 🤔
|
Anders Nielsen 3:47 PM
@Mitsuru Yamada I have a USB cable that changes color with current - I spot a lot of "fake" 6502's from the unexpected power usage. Could also be bad silicon of course.
It's fun when a 65C02 is labelled MOS6502A in super clear paint.
|
Pete Willard 3:48 PM
I've not imagined that there would be a benefit to updating the 6502 in my IIC
|
Anders Nielsen 3:48 PM
@Xark Pin 1 is GND so a resistor won't do :)
|
J.B. Langston 3:48 PM
some later software only worked with enhanced IIe... i think the IIc already came with the cmos chip
|
Xark 3:48 PM
Okay, never mind me, but some info here: https://www.westerndesigncenter.com/wdc/AN-002_W65C02S_Replacements.php
|
J.B. Langston 3:49 PM
yeah you have to clip pin 1 off and tie bus enable high
|
Anders Nielsen 3:49 PM
|
Anders Nielsen 3:49 PM
Good chart!
|
Pete Willard 3:49 PM
BTW JB, thanks for the TMS9918 board for the RC2014...
|
J.B. Langston 3:50 PM
oh, my reputation preceeds me ;)
|
Mitsuru Yamada 3:50 PM
Regarding the subtle differences between the 6502 and 65C02, in my experiments, when I replaced the 6502 and 65C02 on my own computer board, the number of clocks from reset to the first instruction execution seemed to be different.
|
DrG 3:51 PM
Did all those C varieties maintain the bugs in the 6502?
|
Xark 3:51 PM
Yes, clock timing is indeed different on 65c02. It has an extra cycle on some instructions, e.g.
|
J.B. Langston 3:51 PM
no the C got rid of all the undocumented instructions and replaced them with NOPs
|
Pete Willard 3:51 PM
Geez. I never knew that
|
J.B. Langston 3:52 PM
also added a few other instructions
|
Anders Nielsen 3:52 PM
Or "new and interesting" instructions. Like STX, STY,
|
J.B. Langston 3:52 PM
there's a load zero iirc now
|
Anders Nielsen 3:52 PM
I mean PHX
|
Xark 3:52 PM
Yes, fixed (most of) the bugs. In fact one of the extra cycles added was to correct JMP ($xxFF) bug.
|
Xark 3:53 PM
Several very welcome new opcodes and some semi-useful new addressing modes.
|
Xark 3:54 PM
Most useful IMHO are as mentioned PHY/PLY/PHX/PLX, but also INC and DEC of A is handy, along with BIT #$XX and the new ($XX) addressing mode can sometimes be handy to not need to load Y with 0.
|
Anders Nielsen 3:56 PM
I always find it interesting to check the ones I get. You'd be surprised.. Well you might not.. Some might be surprised to find how many 6502's "fail" the BRA test.
|
Xark 3:56 PM
Nice rundown of the improvements (and examples of use): http://www.6502.org/tutorials/65c02opcodes.html
|
J.B. Langston 3:56 PM
i admit ignorance on most of the new opcodes... most of my interest in the 6502 is in the c64 demoscene so there's no C in that 6502 code :)
|
J.B. Langston 3:57 PM
and also, i've since gone to the dark side and i'm a much better Z80 programmer than I ever was at 6502
|
Mitsuru Yamada 3:57 PM
What I think is wrong with the 6502 in terms of readability is the lack of BRA, but with the 65C02, it is there.
|
J.B. Langston 3:58 PM
yeah people would just do clc, bcc, or if they were very clever they'd rely on a flag already being set or cleared by the previous instruction and use the appropriate branch when they wanted relative jumps
|
Xark 3:58 PM
@Mitsuru Yamada Yes, BRA is super welcome too.
|
DrG 3:59 PM
I personally remember stepping through code and being stymied by "An indirect JMP (xxFF) will fail because the MSB will be fetched from address xx00 instead of page xx+1.
" It made my brain hurt. Then some *real* programmers told me, "oh yeah, that's a 6502 bug". ugh...good times
|
Xark 4:00 PM
I remember using it in "copy protection" (along with other tricks) to try to obfuscate the trail (but it was fairly well known).
|
DrG 4:00 PM
lol sweet
|
Anders Nielsen 4:01 PM
If I tell people to go out and buy a 65C02 and it turns out they get the "wrong" 65C02, things get frustrating fast.
I have to admit I sometimes CLC, BCC but usually I have a flag available.
|
Xark 4:03 PM
WDC65C02 is nice because it is still made and available from suppliers (and ~14MHz).
|
J.B. Langston 4:04 PM
supermon64 used a very clever method to get relocatable code with regular jumps: https://github.com/jblang/supermon64
|
J.B. Langston 4:04 PM
discussed in the paragraphs right above the usage instructions
|
J.B. Langston 4:05 PM
there is a quote from jim butterfield explaining how it worked
|
Anders Nielsen 4:05 PM
There are plenty of cases where you need a factory new with warranty chip so I certainly appreciate it exists.
|
asciimo 4:05 PM
What's a reliable source for real 6502s?
|
Anders Nielsen 4:05 PM
Truth: Aliexpress
|
DrG 4:06 PM
@J.B. Langston I remember going through KIM cassette format and thinking - wow, neat. Then I read Butterfield's hypertape and went - WoW
|
Xark 4:06 PM
Apparently not too difficult to find pulls and such. Beware remarked parts...(e.g., 2+MHz may not really be...).
|
Anders Nielsen 4:07 PM
The 6507's I sell with the 65uino kits, I painfully have to test each and every one of them. And it seems they are rebadged to say whatever I order - but otherwise come from the same pile. Especially the 6532's.
|
J.B. Langston 4:07 PM
i have had decent luck buying used chips on ebay, but it's been a few years
|
J.B. Langston 4:08 PM
all of the TMS9918, SN76489, and YM2149 chips I bought turned out to be genuine. have never tried to get a 6502
|
Anders Nielsen 4:08 PM
Usually I can tell the actual manufacturer from the markings on the bottom.
|
Dan Maloney 4:09 PM
OK, sorry to break up the party but our time is up. I want to thank Anders for his time today and all of you for the excellent discussion. And everyone needs to start collecting those chips!
|
asciimo 4:09 PM
Awesome chat. Thanks!
|
DrG 4:09 PM
Thanks Anders and thanks Dan for hosting
|
Xark 4:10 PM
https://linuxjedi.co.uk/2023/12/01/fake-chips-i-got-stung/ might be useful
|
Anders Nielsen 4:10 PM
A lot of people assume that relabelled == fake, but that's obviously not the case. Worst case it's a different chip, but usually it's just to make the labelling uniform :D
Oh - and at the end: Read ALL Don Lancaster's books.
Thanks for having me!
|
Xark 4:10 PM
Thanks! 🙏
|
Anders Nielsen 4:10 PM
@Dan Maloney Thanks for the invite!
|
Dan Maloney 4:10 PM
My pleasure! Transcript coming up. Thanks all!
|
Mitsuru Yamada 4:11 PM
Thanks! from Mitsuru Yamada in Japan.
|
DrG 4:14 PM
I confess that chats like these make me wonder where all the excitement of the times went....It's weird being the same age as old people :)
|
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.