6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 24, 2024 9:25 pm

All times are UTC




Post new topic Reply to topic  [ 33 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Why the 6502
PostPosted: Fri Nov 25, 2005 1:42 am 
Offline

Joined: Thu Jul 07, 2005 12:34 am
Posts: 23
Location: Minnesota
I was just wondering out of curiosity. Why people have chosen to use the 6502 over the other 8-bit processors? No other 8-bit processor still has this kind of support and probably never did. My reason is the Woz used it in the Apple-1 and ][s. The ][e being my first computer. :D


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Nov 25, 2005 7:14 pm 
Offline

Joined: Fri Jun 27, 2003 8:12 am
Posts: 618
Location: Meadowbrook
Woz used it because of cost compared to other ones at the time.

And even today, there is still a lovefest for a basic and solid design.

_________________
"My biggest dream in life? Building black plywood Habitrails"


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Nov 25, 2005 8:09 pm 
Offline

Joined: Sat Aug 31, 2002 12:33 pm
Posts: 64
Location: USA
Hi Everyone,

The bus structure is simple and it's a Von Neuman architecture. The 6089 is nice but you can't get it in CMOS any more (the 6309 is out of production).

Cheers,

Paul


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Nov 26, 2005 4:23 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8546
Location: Southern California
I'd like to write an article on this subject for the website. [Edit: I put a list of reasons in the 6502 primer intro at http://wilsonminesco.com/6502primer/65tutor_intro.html, although some of it already needs updating.] Back in May I wrote to the designer for info, saying "I have my own reasons for using it, but what do you see as the reasons for the 6502's continuing success?" He gave some reasons relating partly to the design philosophy and said he'd get back to me with more, but then I suppose he forgot.

One of the things he said was, "The 65xx architecture is sold in hundreds of millions of chips per year, and the volume is growing. We now find engineers porting applications that might have first been market-tested on PCs or ARM processors and finding the 65xx economy (both business and silicon) attractive and well worth the effort to change to the 65xx."

Note that virtually all of these chips he mentions are embedded. You might have some you didn't know you had, like in your camcorder, your car, etc.. Instead of doing desktop computing, they're controlling processes.

One forum member here said he found it much easier to envision a solution on the 6502 than on the others of the dozen or so processors he's used, and that he can develop an application faster and with less bugs with the 6502.

One of my own reasons for using it is the excellent interrupt performance. (See my article on interrupts at http://wilsonminesco.com/6502interrupts/ .)

Paul has a good point about the simple bus and the Von Neuman architecture, which, although the RISC enthusiasts say is inefficient, seems to avoid some of Harvard's programming disadvantages. It does this while still having a lot of op codes that execute in 2-3 clocks, whereas a lot of processors can't do anything in less than 4. The 6502's minor pipelining (allowing, for example, ADC#, which requires five distinct steps, to be carried out in only two clocks) and its zero page addressing modes make it more efficient than a lot of processors having more registers. It definitely doesn't hurt either that some instructions are implied, like the automatic CMP#0 that is part of LDA FOOBAR for example, so the two instructions together only take 3 clocks if FOOBAR is in ZP. In the case of the ADC# above, the implied CMP#0 that goes with it means you get two instructions in two clocks.

I think you'll be interested in the thread at http://www.6502.org/forum/viewtopic.php?t=18 which less than half way down the first of two pages, it turned into a discussion on comparing performances.

_________________
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?


Last edited by GARTHWILSON on Fri Dec 02, 2005 5:34 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Nov 30, 2005 7:09 am 
Offline
User avatar

Joined: Thu Mar 11, 2004 7:42 am
Posts: 362
Like so many others, I started using and programming computers with the Apple II family. As I've become familiar with other processors over the years, I've come to appreciate that the 6502 was quite well designed.

As for why it continues to thrive, the processors that have longevity seem (to me) to be the ones that are or were popular and widely used. Unfortunately, aspects like performance, flexibility, efficient design, and clean architecture don't seem to contribute to longevity as much. The 6502 was in some ways quite fortunate to have been a good design that was popular. Yet there is something to be said for choosing a processor based on popularity. There are likely to be more tools available, and there are likely to be more (and talented) programmers who are familiar with it. One thing that's struck me about the 6502 is that it's among the easiest processors to get back up to speed with (at least for me) after not having used it in some time, which can't hurt.

Interestingly, even things that seem like limitations are not necessarily so. For example, the 6502 does not have a multiply instruction, but an 8-bit * 8-bit to 16-bit product multiplication can be done in 11 cycles, with a latch (or flip-flop) and a 128k * 8-bit ROM containing a multiplication table (and possibly some additional address decoding, if necessary). And there is quite a bit of flexibility about which registers will be used for the multiplicand, multiplier, and high and low bytes of the product.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Dec 02, 2005 3:16 am 
Offline

Joined: Sat Jan 04, 2003 10:03 pm
Posts: 1706
I use the 65816 instead of the 6502, but the rationale for the latter would be similar to the former. Considering the benchmarks that have been published prior, the 6502 offers more or less the same level of performance as an 8088, and with a far simpler bus interface. The 65816 offers performance comparable to a 80286 or 68000 (for all but 32-bit arithmetic), again with a vastly simpler bus interface for most tasks.

So, assuming that the price of a 6502 or 65816 are competitive with the 8088 and 68000, which in my experience it has been all along, the price of the *processor* is no longer an issue. But the simpler bus interfaces of the 65816 and 6502 lead to inherently cheaper *system* design. The 68000 has a 64-pin DIP, and the 80286 has a 68-pin PLCC, both with a 16-bit databus. The 80286 additionally has a pretty retarded method for identifying 8-bit versus 16-bit transfers on the bus. Which would you rather deal with?

Throw in the excellent levels of performance that these processors provide, and it becomes an absolute no-brainer why anyone would want to choose a 6502 over an 8088. This is especially true in the homebrew camp, where cost often dominates a design even more than it would in a commercial, embedded application.

That being said, there are times when the 6502/65816 would NOT be a good choice. If you need to interface to a wide variety of peripherals that each can be operating at completely different speeds (e.g., each is wholesale unaware of each other), then you'll probably want to use a 68000 instead, assuming you can still find one. This processor has a very well designed asynchronous bus interface. The 80286 would be useful if you're looking for space-based applications, since it's one of the few CPUs that is available in rad-hardened form (the Hubble space telescope runs on an 80286, for example). A StrongARM processor (in the $25 range, from the research I've performed previously) is a good choice if you're looking for very low power with the ability to address gigabytes of memory space. Etc.

The 6502/65816 in particular represents a great compromise in most embedded and nearly every homebrew project I can think of.


Top
 Profile  
Reply with quote  
 Post subject: Re: Why the 6502
PostPosted: Sun Jan 08, 2017 4:24 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8546
Location: Southern California
We've had variations on this topic over the years. To avoid starting yet another, I was trying to find the best one to post some thoughts I had today while out for a bike ride after an email exchange with Bert (satpro). There are some parallels. Why would I ride a bicycle, when I have a car and a van which can carry more and go faster? Fun, getting a workout (and keeping my greyhound waist), and enjoying a simple but very high-quality machine (with the same carbon-fiber frame Lance won his first Tour de France on). The reasons for using a 6502 might be similar.

Fun: I've gone on countless rides of 100 miles or more in one day which weren't for getting anywhere, since I either did a loop and ended the ride right where I started, or took a commuter train one direction and rode bike the other direction, like taking the train from Los Angeles to Santa Barbara in the morning, and riding the 116 miles back in the afternoon. It's a beautiful, fun ride. Similarly, I enjoy the beauty and fun and reward of doing a good job writing a program I know will be useful.

Getting a workout: Exercising the mind brings its own reward. Something non-cyclists don't understand is that even long climbs in the local canyons and mountains are fun when you're in shape. We don't do the climbs for the "reward" of the fast downhill like many many think. Much of programming on much higher-powered computers is kind of like using power steering or other hydraulic controls; you might be doing the commanding, but it's not really under your own power that things get done, like it is with the '02. Accomplishing a good piece of programming or hardware design feels good!

Enjoying a simple but very high-quality machine: I like the fact that I can understand and maintain every part of my bike. (I can fix it too, although actual breakdowns are almost non-existent on quality equipment whose rider is attuned to his machine and senses when maintenance is in order, long before something becomes a failure.) The few times there's mechanical trouble with one of our cars, I feel trapped, frustrated, and I wish we could go car-free. Personally, I just about could; my wife, not so much. I like the fact that I can understand my 6502 computer completely. There aren't black boxes, in either hardware or software, making me dependent on someone else to fix or maintain, even if for reason of lack of tools rather than lack of knowledge.

Just as our society practically demands that we have a desktop or laptop or at least a tablet computer, it also practically demands that we have cars, and is not very friendly to bikes. Nevertheless, I have seen bikes made for freight (I saw one carrying a roll of chain-link fence), I've seen huge bike trailers (even carrying a standard-size household refrigerator, lying down), and even enclosed pedal cars made for riding in the rain (although I couldn't tell you how suitable they were). You probably won't ever be doing your video editing on a 6502; but it has plenty of uses anyway, and it can do a lot more than people think.

35 years ago, I commuted to school 25 miles each way by bicycle, using panniers to carry my change of clothes and my books. It consistently took me an hour and ten minutes, which always surprised anyone who asked. I was faster three decades later, because of knowing how to train more effectively. Similarly, I maintain that even the home computers of three decades ago could have been more powerful, even with the same hardware, if the software methods had been more developed at the time.

FWIW, this month I will have 40,000 miles on the bike I'm riding now, and I have no reason to stop or to replace it. It suits me quite well. I ride a lot more miles per year than I drive.

_________________
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: Why the 6502
PostPosted: Sun Jan 08, 2017 8:36 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8514
Location: Midwestern USA
GARTHWILSON wrote:
We've had variations on this topic over the years. To avoid starting yet another, I was trying to find the best one to post some thoughts I had today while out for a bike ride after an email exchange with Bert (satpro). There are some parallels. Why would I ride a bicycle, when I have a car and a van which can carry more and go faster? Fun, getting a workout (and keeping my greyhound waist), and enjoying a simple but very high-quality machine (with the same carbon-fiber frame Lance won his first Tour de France on). The reasons for using a 6502 might be similar.

On my homebrew computer website's home page I posted this:

    Why the W65C816S processor? Aren't 65xx processors obsolete?

    Good questions! I chose this microprocessor for a number of reasons:

    • Familiarity. I have been writing assembly language programs for the 65xx family almost since its inception. Needless to say, I have a large body of accumulated knowledge that can be easily transferred to the '816. Why start from scratch with a different processor and incur a huge learning curve?

    • Performance. The '816 can get a lot done when measured against wall clock time. Typically, an '816 running at 20 MHz can execute between 3 million and 10 million instructions per second (MIPS). That's very good for a design that was conceived in the early 1980s and, in fact, better than most of its contemporaries. Also, interrupt latency is very low, much lower than similar designs, such as the Motorola 68000. Low interrupt latency is an important characteristic in any MPU that is to be used in real-time situations. In fact, using the proper programming techniques, the '816's interrupt latency can be as short as one machine cycle. At 20 MHz, that's a mere 50 nanoseconds.

    • Adaptability. The '816 uses the same basic bus architecture as the rest of the 65xx family, which makes it "hobby-friendly" and highly adaptable to a variety of applications. The '816 also includes some hardware management signals that are not present on the eight bit family members. These signals can ease the complication of adapting non-65xx family peripheral silicon, as well as improve overall system stability and performance.

    • Scalability. As it has a fully static CMOS core, the performance of the '816 is in direct proportion to the phase-two (Ø2) system clock rate. In fact, the Ø2 clock may be halted in either phase and the '816 will indefinitely maintain its state.

    • Reentrancy and recursivity. The '816 has hardware stack addressing capabilities not found in its eight bit cousins that facilitate the creation of fully recursive/reentrant code. Also, parameter passing via the stack is a breeze with the '816.

    • Cost and availability. The '816 is available in quantity from electronic parts sources such as Jameco and Mouser for less than ten dollars US. Other parts typically used with the '816, such as I/O chips and glue logic, are also inexpensive and readily available.

    As for the question of obsolescence, both the W65C02S and W65C816S are in current production and are found in numerous products, often as part of a microcontroller or other custom chip. You are probably using the 'C02 or '816 every day without knowing it, as these processors are at the core of many consumer products. The 65xx family is even found in medical devices, such as implantable defibrillators.

    So the Why? is Why not? and no, the 65xx family isn't at all obsolete.

Although the above refers to the 65C816, just about all of it equally applies to the 65C02.

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


Top
 Profile  
Reply with quote  
 Post subject: Re: Why the 6502
PostPosted: Sun Jan 08, 2017 7:27 pm 
Offline

Joined: Tue Nov 10, 2015 5:46 am
Posts: 230
Location: Kent, UK
The 6502 provides a good introduction to computer systems fundamentals.

Assembly language can be daunting if you've never tried it, so a simple 8-bit CPU with a small instruction set makes for a good trainer. The instruction set lacks multiplication and division operations, but if you can work these out for yourself, or study available examples, then they're an effective demonstration of multi-bit arithmetic.

The bus structure is very simple. 40-pin DIP part, add a ROM, RAM, I/O chip and a few gates for address decoding and you have an entire computer. You can put something together on a breadboard. Learning by doing - there's nothing quite like it. You can point to every pin, every signal and say, "I know what that does."


Top
 Profile  
Reply with quote  
 Post subject: Re: Why the 6502
PostPosted: Mon Jan 09, 2017 1:21 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1250
Location: Soddy-Daisy, TN USA
bvold wrote:
No other 8-bit processor still has this kind of support and probably never did.


That's not true. Z80's are still made, cheaper than 65C02's and run "OFFICIALLY" at up to 20MHz. Plus, there is still a huge following for them for everything from the Colecovision, GameBoy, MSX, etc. These systems still see new games being produced recently.

Having said that, 6502 (i.e., the 65C02) is still my favorite. I grew up with the 6510 (a variant of the 6502) in my Commodore 64.

_________________
Cat; the other white meat.


Top
 Profile  
Reply with quote  
 Post subject: Re: Why the 6502
PostPosted: Mon Jan 09, 2017 2:23 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
"This kind of support" probably means this site and forum - which is I think an outstanding monument. I'm not sure there is such a singular resource for Z80.

Edit: heaps of reference info at http://z80.info/ but not sure about community.


Last edited by BigEd on Mon Jan 09, 2017 2:51 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Why the 6502
PostPosted: Mon Jan 09, 2017 2:30 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1250
Location: Soddy-Daisy, TN USA
BigEd wrote:
"This kind of support" probably means this site and forum - which is I think an outstanding monument. I'm not sure there is such a singular resource for Z80.


Ah, that could be the case.

I find Atari Age (of all places) to be the best place for Z80 help.

_________________
Cat; the other white meat.


Top
 Profile  
Reply with quote  
 Post subject: Re: Why the 6502
PostPosted: Mon Jan 09, 2017 6:51 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8514
Location: Midwestern USA
cbmeeks wrote:
That's not true. Z80's are still made, cheaper than 65C02's and run "OFFICIALLY" at up to 20MHz.

Yes, and at 20 MHz they perform at about the same level as the 65C02 running at 10 MHz. :shock: As always, you only get what you pay for. :D

Years ago (mid-1970s, to be precise), I learned the Z80 assembly language as part of a work assignment. I used it for about six months and then got involved with the 6502, learning its assembly language. I have not touched a Z80 since around 1980, but continue to write code for the 6502 family. That should tell you something...

As for support, everyone and his uncle, it seems, knows something about the 6502. I don't know anyone who knows anything about the Z80. Most likely that has to do with the proliferation of the 6502 in so many products.

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


Top
 Profile  
Reply with quote  
 Post subject: Re: Why the 6502
PostPosted: Mon Jan 09, 2017 6:54 pm 
Offline

Joined: Tue Nov 01, 2016 12:28 pm
Posts: 59
Hmm, and seems to be still available as well. http://www.mouser.com/ProductDetail/ZiL ... 3LaLmSsNlp

Darn you, i didn't need another project :P


Top
 Profile  
Reply with quote  
 Post subject: Re: Why the 6502
PostPosted: Mon Jan 09, 2017 7:10 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8514
Location: Midwestern USA
EugeneNine wrote:
Hmm, and seems to be still available as well. http://www.mouser.com/ProductDetail/ZiL ... 3LaLmSsNlp

Darn you, i didn't need another project :P

That part is more like a primitive microcontroller than microprocessor. It runs at a relatively sedate 6 MHz.

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


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

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 13 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: