6502 Cpu wanted - Page 1
Forum section: electronics / general

author: Chopsticks
author_rank: Regular Contributor
timestamp: February 14, 2017, 05:41:40 am
content: hi everyone,Im studying engineering at uni and while I've been learning to code on MCU's I've developed quite an interest in older 8-bit computers. however I can't seem to find any local (aus) suppliers of 6502 cpu's and related peripheral chips. i usually do a lot of my shopping through element14 but they don't stock these parts so i was wondering if anyone knew of a supplier that sells theses at a fair price or perhaps if anyone had any old chips laying around that they would part with?

author: FrankBuss
author_rank: Unknown
timestamp: February 14, 2017, 06:36:32 am
content: eBay doesn't look too expensive:http://cgi.ebay.com/170828631732Just don't buy this onehttp://cgi.ebay.com/192041375586

author: Moshly
author_rank: Regular Contributor
timestamp: February 14, 2017, 07:55:28 am
content: rockby will have them but you will pay $20 +https://www.rockby.com.au/Index2012.cfmyou will pay around $5 on ebay for most older chips, you might as well go 16bit and use a 65c815http://www.ebay.com/sch/i.html?_from=R40&_sacat=0&_nkw=65c816&_sop=1565xx chips search ->http://www.ebay.com.au/sch/i.html?_odkw=%28rockwell%2C+commodore%2C+wdc%2C+synertek%29+65+-%28amiga%2C+holden%2C+falcon%2C+car%2C+opel%2C+floppy%2C+sark%2C+ring%2C+jet%2C+ad%2C+v8%2C+v6%2C+vn%2C+vp%2C+vt%2C+vx%2C+norman%2C+tyre%2C+tyres%2C+mag%29&LH_AvailTo=15&_sop=2&_osacat=0&_from=R40&_trksid=p2045573.m570.l1313.TR0.TRC0.H0.X%28rockwell%2C+commodore%2C+wdc%2C+synertek%29+65+-%28amiga%2C+pottery%2C+holden%2C+falcon%2C+car%2C+.TRS0&_nkw=%28rockwell%2C+commodore%2C+wdc%2C+synertek%29+65+-%28amiga%2C+pottery%2C+holden%2C+falcon%2C+car%2C+opel%2C+floppy%2C+sark%2C+ring%2C+jet%2C+ad%2C+v8%2C+v6%2C+vn%2C+vp%2C+vt%2C+vx%2C+norman%2C+tyre%2C+tyres%2C+mag%29&_sacat=0also, check out 6502.org if you haven't already for SBC schematics & projects.

author: borjam
author_rank: Unknown
timestamp: February 14, 2017, 07:58:04 am
content: Turns out Jameco Electronics still has them in stock!http://www.jameco.com/z/6502-Major-Brands-MPU-R6500-CISC-8-Bit-1MHz-40-Pin-CDIP_43191.htmlThey seem to stock other vintage offerings like Z80, 6809... No M68000 though!

author: Ian.M
author_rank: Super Contributor
timestamp: February 14, 2017, 08:09:30 am
content: The W65C02 is still in production, and is stocked by Mouser.Normally I'd go off on a long spiel about the best way to design a retro CPU board with modern glue chips, with a USB interface for loading code and control, so you don't have to suffer the traditional EPROM based build - burn - crash development cycle, but Hackaday have reviewed the Western Design Center's development boards with 65C02 and related cores and it turns out WDC have already done all the hard work for you. Seehttp://hackaday.com/2015/07/29/review-single-board-65c02-and-65c816-computers/. Not cheap mind you, but by the time you've added up the cost of a N.O.S. 6502 CPU, 6520 PIA, 6522 VIA, and stuck them on a board with RAM, FLASH, glue logic and a FTDI USB <> parallel chip that can emulate a COM port for host communications, you'll be up to a significant proportion of the WDC boards price. Then you have a long hard road ahead of you porting a 6502 monitor ROM to your board. On time factor alone it would be cheaper to wash car windows, do odd-job or flip burgers to pay for one of the WDC boards rather than attempting to roll your own.

author: FrankBuss
author_rank: Unknown
timestamp: February 14, 2017, 08:13:41 am
content: Another idea is to buy a C64 or 1541 floppy on eBay, and then desolder any chips on it. C64 is better, because you get the CPU (6510, but it is the same as a 6502, except for an additional 8 bit GPIO), two 6522 VIAs, the SID sound chip and the VIC graphics chip, and you can sell the rest like the PLA or the DRAM, if you don't need it. Of course, don't buy a working C64, would be a sacrilege, you can get broken ones for cheap. Usually the RAM or PLA is broken, so chances are high that the CPU still works.

author: brucehoult
author_rank: Super Contributor
timestamp: February 14, 2017, 08:16:48 am
content: Quote from: borjam on February 14, 2017, 07:58:04 amLooking back with 35 years hindsight, it's amazing how similar in concept the 6809 is to the x86. Same number of registers, just arranged differently. A couple of secondary opcode pages. Very similar ModR/M byte.It felt much nicer to use at the time though. A couple of friends and I designed/built our own wire-wrapped board using one, wrote simple OS and compiler...

author: jpb
author_rank: Super Contributor
timestamp: February 14, 2017, 06:38:58 pm
content: If you just want to do 6502 assembler it might be worth picking up an old BBC model B micro if there are any locally.The assembler is embedded in the BBC Basic which makes it quite easy to use and powerful (you can use the BASIC for macros and conditional assembly and so on).I did have a BBC Master in my attic which I bought ages ago for £50 but I had to get rid of it when I moved house recently.

author: james_s
author_rank: Super Contributor
timestamp: February 14, 2017, 07:06:21 pm
content: There's the T65 and several other 6502 softcores you can use on an inexpensive FPGA. You get all the support chips "for free" that way too. I've got a 6502 system running on a $13 FPGA board.

author: AndyC_772
author_rank: Super Contributor
timestamp: February 14, 2017, 07:41:07 pm
content: Quote from: jpb on February 14, 2017, 06:38:58 pm^^^ This!Either a model B or a Master 128 will do, and make sure you also pick up a copy of the Advanced User Guide which describes the built-in assembler in detail, as well as the other hardware. There really is no better way to make a 6502 accessible.If you want to build something, don't waste time actually wiring up a 6502 from scratch. Get the BBC machine and build something to plug into one of its various expansion ports, which are easy to use and will readily connect to modern hardware.

author: brucehoult
author_rank: Super Contributor
timestamp: February 14, 2017, 08:44:26 pm
content: Quote from: jpb on February 14, 2017, 06:38:58 pmI see there are real masochists here :-) I've done more than enough 6502 asm in my time. Painful. They were cheap and that was the best thing about them. The 6809 was massively more pleasant to program. But the modern AVR beats both hands-down. And are super cheap *today*.I'm also really enjoying programming the RISC-V in my "HIFive1" Arduino clone in asm. Very straightforward and easy to learn -- even more than ARMs.

author: eugenenine
author_rank: Frequent Contributor
timestamp: February 14, 2017, 08:48:45 pm
content: Distributors on the righthttp://www.westerndesigncenter.com/wdc/

author: james_s
author_rank: Super Contributor
timestamp: February 14, 2017, 09:04:03 pm
content: Quote from: brucehoult on February 14, 2017, 08:44:26 pmI like working with the retro stuff. It really makes you appreciate how far we've come in some areas. It also makes one appreciate just how capable some of the old hardware was, despite its simplicity. It amazes me what people have squeezed out of the humble 6502.

author: jpb
author_rank: Super Contributor
timestamp: February 14, 2017, 09:22:41 pm
content: Quote from: brucehoult on February 14, 2017, 08:44:26 pmThe ARM chip was based on the 6502. The 6502 has a nice simple instruction set and I think the designers of ARM (from Acorn) designed ARM along the same lines but with 32 bit registers and a barrel shifter and a few other goodies. The 6502 is definitely nicer to program than say the 8086 family.

author: AndyC_772
author_rank: Super Contributor
timestamp: February 14, 2017, 09:54:02 pm
content: The ARM instruction set was new from the ground up, and there's really no similarity between it and 6502.Examples: ARM2 has a set of 16 registers, of which 13 are completely general purpose, and conditional execution for every opcode. The 6502 has A, X and Y, all of which are 8 bit only. The only conditional operations are short range relative jumps, and indirect operators work differently depending on whether X or Y is the index.

author: brucehoult
author_rank: Super Contributor
timestamp: February 14, 2017, 09:55:16 pm
content: Quote from: james_s on February 14, 2017, 09:04:03 pmTrust me, I remember how far we've come!!!6502 just takes SO MUCH CODE to do anything. And you don't have that much memory to put it in.Ok, so you use zero page as registers. A lot of registers. Now add two variables in zero page together. If they're 8 bit then that's four instructions, seven bytes of code, eleven clock cycles. If they're 16 bit then it's seven instructions, thirteen bytes of code, twenty clock cycles. For 32 bit it's thirteen instructions, twenty five bytes of code, thirty eight clock cycles.8 bit AVR has 32 registers. You add two registers with one instruction, two bytes, one clock cycle. If you need 16 bit then it's two instructions, four bytes, two clock cycles. For 32 bit it's four instruction, eight bytes, four clock cycles. More than three times less code and about ten times fewer clock cycles. Same with Thumb or RISC-V, except they handle 32 bit variables with a single two-byte one clock cycle instruction (Thumb is a bit lacking in registers, but RISC-V isn't).Don't even talk about trying to manage a C/Pascal style stack! The only sane thing to do is go to a bytecode interpreter or threaded code, which adds yet more slowness. At least if you didn't need recursion zero page is big enough that you could probably allocate every function in your program its own little argument/scratch area (and even overlay areas for functions that couldn't call each other).I appreciate how far we've come. Really. I don't need to re-live it :-)On the other hand -- let's make a 6502 back end for LLVM!!!

author: brucehoult
author_rank: Super Contributor
timestamp: February 14, 2017, 10:19:53 pm
content: Quote from: jpb on February 14, 2017, 09:22:41 pmJust a few other goodies :-)Quick! What does this simple ARM instruction (valid from the first Archimedes PCs) do?LDMIAEQ SP!, {R4-R7,PC}Well! It loads five registers from memory. It adds 20 to the stack pointer register. One of the registers is the PC, so it's a branch instruction -- probably a function return. Oh, and it does all that only if the Z condition code flag is set. It's a conditional return from a function.Very RISC!What I find really scary is that IA part .. Increment After .. is only one of four options you could put there: also Increment Before, Decrement Before, or Decrement After. And you could use any register as the base register, not only the stack pointer.I love ARM, really I do. It's better than x86. But it's far from simple!Quote from: jpb on February 14, 2017, 09:22:41 pmBetter than 8080, for sure. Better than 8086. probably not. Worse than i386 or x86_64 for sure.ARM is nicer to program than any x86.It turns out the worst thing about the 8086 family is actually Intel's documentation, mnemonics, and assembler format. And the hideous complexity of implementing it to go fast.

author: Chopsticks
author_rank: Regular Contributor
timestamp: February 15, 2017, 05:41:49 am
content: thanks everyone for all the info and pointers to where to buy/acquire a 6502 cpu. the idea of getting a bbc micro sounds interesting unfortunately being in Australia i dont think I'm likely to find one to buy, and if i did it would probably cost a pretty penny down under.sorry if my reply is kind of short, I've come down with a bad flu but i do really appreciate all the help and ill probably do an order with mouser

author: brucehoult
author_rank: Super Contributor
timestamp: February 15, 2017, 09:28:59 am
content: Quote from: Chopsticks on February 15, 2017, 05:41:49 amNot Aussie, but here's three C64s for sale for $50 in NZ.http://www.trademe.co.nz/computers/vintage/auction-1261470379.htmBBCs were never common in NZ and Aus, but there should be any number of C64, C128, Atari 400/800 around in closets, and quite a lot of Apple's too. Some of these were made rigth from the late 70s until the early 90s.

author: Chopsticks
author_rank: Regular Contributor
timestamp: February 15, 2017, 09:42:19 am
content: unfortunately at least as far as i can find, any apple II's, Commodore 64/128 etc or other similar era hardware are just to expensive to buy, everything i find on eBay is $150 upwards and being a university student its the old issue of lack of funds. unless anyone knows something i dont about where to get old systems in Australia or wants to donate one then i think i'll have to buy some new chips from mouser

author: Moshly
author_rank: Regular Contributor
timestamp: February 15, 2017, 09:46:30 am
content: Or download WinVICEhttp://vice-emu.sourceforge.net/& emulate most commodore 8bit's (all 6502)Get yourself a cross development IDE herehttp://6502.org/tools/asm/Now you don't even need a legacy system.There are emulators for every just about any 6502 based system, some even have monitors & cross dev stuff built in.If you do want to get an old system, choose something that someone has made an SD or USB interface for. The main problem you will have is getting data in & out of it.Another thing to note is that not all 6502 CPU's have the same instruction set.The CMOS version has more instructions and fixed some bugs.The Rockwell version has some added bit instructions. (not compatible with the CMOS version)There are also some other variants, the 16bit 65c816 (when in 6502 8bit mode) uses the CMOS set.

author: brucehoult
author_rank: Super Contributor
timestamp: February 15, 2017, 09:48:32 am
content: Quote from: Chopsticks on February 15, 2017, 09:42:19 amGo any relatives? If you ask around you can probably find one for free. If they haven't been tossed...

author: Chopsticks
author_rank: Regular Contributor
timestamp: February 15, 2017, 09:51:48 am
content: mmm, not really interested in WinVICE as emulation isn't on much interest to me. i basically just want to get a 65C02 and interface it with RAM/ ROM and PIA/VIA chips and write some code to see how things where done before microchips suck as the PIC and AVR changed everything with integrationas for relatives, well none have any old 8 bit systems, I've certainly asked around

author: Moshly
author_rank: Regular Contributor
timestamp: February 15, 2017, 11:05:48 am
content: Ok, cool, jumping straight in at the deep endSome good books on the subject ->http://www.bombjack.org/commodore/books-generic.htmScroll down to programming section and check out the Rodnay Zaks titles & the MOS hardware & software manuals. Lots of other good stuff too.

author: FrankBuss
author_rank: Unknown
timestamp: February 15, 2017, 12:06:30 pm
content: Quote from: Chopsticks on February 15, 2017, 09:42:19 amInteresting, ebay.com.au has nearly no C64 auctions (if you search for C64). In ebay.de there are lots of them. But you could order the individual chips. I don't know the seller, but this auction is still online:http://cgi.ebay.com/170828631732US $2.54 for a 6502, and free shipping doesn't look to expensive. But it is in China, if I order it from Germany usually needs 4 weeks or more delivery time. But I have good experience with it, once I ordered a lot of MC6850 UART chips for myKerberos cartridgefrom China and they all worked with no problems. Very useful chip, if you want to implement a serial port on your system. You can get them, too, for cheap on Australia eBay, again from China. It's crazy, cost with free shipping is less than the shipping cost alone would be if I would send you one:http://cgi.ebay.com.au/191964446415But I couldn't find a cheap 6522 VIA.For the RAM and ROM, I would just use modern parts. See e.g. my Kerberos cartridges (schematic in my github project page for it). It provides 128 kB RAM extension and 2 MB flash memory, besides the MIDI ports. I used a CY62128EV30 SRAM chip. You can tie A15 and A16 to GND and then you'll have 32 kB RAM for your system for less than 2 bucks (you can get it from Mouser and Digikey). You'll might need some logic gates, too, for decoding the addresses and chip select. Note that you need some voltage level translators as well, like the 74LVC8T245, because the RAM operates with 3.3V. I guess there are cheap 5V SRAM chips out there as well.For the second 32 kB you can use a flash, like on my catridge. But this is available with 5V supply voltage as well, e.g. SST39SF010A. So for a start, you could just use a 6502 and a flash, then program a blinking light by toggling A15, or something more fancy like an 8 bit digital output with a 74373 and related trigger logic. If you use the outputs of this chip, you could even implement bank switching. It's all too easy these days, no need to use complicated DRAM chips.For flashing the flash, I used my C64 in combination with the CPLD (and for fun builta programmer with a Raspberry Pi), but it works with a TL866CS, too, a universal programmer thatDave tested once:. Relatively cheap on ebay:http://cgi.ebay.com.au/191736125106Very useful device, can read old EPROMs and ROMs, too.If you don't have already many gates for testing on a breadboard, maybe design a circuit first (which is the most fun part anyway, at least for me), then you'll know what you need to buy.

author: eugenenine
author_rank: Frequent Contributor
timestamp: February 15, 2017, 12:27:50 pm
content: The whole retro computing in an in thing now so everyone is buying them and the prices are high. I've only had any decent luck just finding old stuff local (craigslist, etc) but even the the prices are much higher than they used to be.You may just have to eat the shipping cost from Jameco or one of WDC's distributors.I tried to do a proxy once a few years ago and add a few parts to one of my orders then forward to someone in another country but there are so many laws and regulations just to walk into the post office before you even try to ship anything, shipping anything is a complete mess now a days.

author: james_s
author_rank: Super Contributor
timestamp: February 15, 2017, 09:21:40 pm
content: That happens with everything though, everybody throws most of it away, so the stuff that's left is harder to find and commands higher prices. It's too bad there isn't a computer graveyard in a warehouse out in the desert somewhere cheap like the graveyard for old aircraft. A lot of cool old stuff could have been saved for future generations to play with.

author: eugenenine
author_rank: Frequent Contributor
timestamp: February 15, 2017, 09:35:42 pm
content: I hate that about the whole e-waste thing too. people bring their old computers and they get sent to china and scrapped. Some people don't know the value of a commodore or amiga and they end up there or in trash.

author: Chopsticks
author_rank: Regular Contributor
timestamp: February 16, 2017, 04:08:29 am
content: im not to sure what goes on here in Australia, we do have some recycling centres in some cities for e-waste but as it costs money most people seem to just throw electronics out in the trash (bad practice i know).i always tell my friends and family to send all there stuff my way first so i can salvage anything of use such as motors, IC's (not common chips but unique or hard to get ones) and so forth but I've yet to come across any vintage electronics from my small network of family and friends...

author: james_s
author_rank: Super Contributor
timestamp: February 16, 2017, 05:22:53 am
content: Do you have Craigslist or something like it there? Thrift stores? Maybe you can find a group or club of vintage computer enthusiasts? That's a great way to network with people who may have extra stuff available. Most 6502 systems are now old enough that they are either long gone and buried or they are in someone's collection.

author: Chopsticks
author_rank: Regular Contributor
timestamp: February 16, 2017, 06:00:14 am
content: there is gumtree thats similar to crags list but i never see anything good on there vintage electronics wise. While it would be amazing to get an old 8 bit system and start learning what can be done with it, unless someone has one to donate i think that ill end up just wording some new chips or mouser when i have a bit of spare cash for another shopping spreeon a side note, i just wanted to thank everyone for all the help and suggestions, I've been a member for awhile now but rarely post anything however its been great knowing that this forum is so helpful to myself any others when we get stuck

author: james_s
author_rank: Super Contributor
timestamp: February 16, 2017, 08:53:29 am
content: Well there's certainly fun to be had in building your own. You might be interested in this:http://searle.hostei.com/grant/6502/Simple6502.html

author: Chopsticks
author_rank: Regular Contributor
timestamp: February 17, 2017, 02:20:20 am
content: I bookmarked that link a couple days ago, between that and Quinn's Veronica computer project there's a good deal of useful information I'll be able to cobble togetherThere's also a couple other 8 bit minimal chip designs on that site for the z80 if memory serves correct

author: TNOBLE8888
author_rank: Newbie
timestamp: July 27, 2017, 01:59:05 am
content: Hey there, I have a virgin 6502 and a couple 6522 (I/O ports), if still looking.Thom

author: tiger99
author_rank: Newbie
timestamp: August 07, 2017, 11:31:15 pm
content: It was noticeable at the time that 6502 based computers seemed to be consistently slightly faster than those based on the Z80. I suspect that the small instruction set forced better programming techniques, or maybe just made it easier.But what I did find surprising is that a BBC Micro, running an 8 bit 6502 at 2MHz and with no floating point hardware, consistently beat an original 16 bit IBM PC/AT, with an 80286/287 running at 6MHz and hardware floating point, by a factor of between 2 and 5. The programs were partial helicopter simulations, as we were designing autopilots at the time, and some minimal translation between Basic dialects was done to enable what had been written in M$/IBM ROM Basic (apparently translated from the original code for the 8086 by Gates himself) to run on the BBC. The engineers who witnessed these trials were suitably impressed, and thereafter paid little credence to Gates and his alleged programming skill. We also tried some kind of Basic on a PDP11-45, which thrashed them both of course, but not by very much.The BBC could do in 32k (yes, k, not M or G!) of RAM what seems to take bloatware programmers a minimum of 1000 times more to do these days, thinking about the bloat of most mobile apps, for instance. It sickens me to see the way software development has gone, all the power ans speed of modern hardware being gobbled up by bloatware. The great virtue of a 6502 is that it forces you to think properly, and not waste precious instruction or data space or machine cycles. But note that the BBC had a very well coded Basic interpreter in a 16k ROM and an unusually comprehensive and also well coded operating system in another 16k ROM, which were of immense help in getting it to do what was wanted efficiently.I would suggest that everyone who writes code should have a go at an old 6502 based system from time to time. It encourages good habits.

author: brucehoult
author_rank: Super Contributor
timestamp: August 08, 2017, 01:12:39 am
content: Quote from: tiger99 on August 07, 2017, 11:31:15 pmI really can't agree with this part.I cut my programming teeth on the 6502, and it's main virtue was costing eight to ten times less than its competition.If you want 8 bit nostalgia, the 6809 had almost all the same virtues, while being a whole lot more pleasant and efficient in execution and programmer effort.

author: Kleinstein
author_rank: Super Contributor
timestamp: August 08, 2017, 10:21:11 am
content: The 6502 was about as fast as an Z80 system running at 3.5 to 4 times the speed. However clock speeds where also at about that ratio: 6502 often a 1 MHz and Z80 at 3.5xx MHz. The early PCs where relatively slow. This is only partially due to the software, but also from some slow software and using the 80286 most of the time in 8086 mode only. Especially DOS code often did not use an FPU unless specially complied for it. So the basic comparison might have just ignored the FPU. A 2 MHz 6502 might thus compete with a 6 MHz 8086 - especially if the code is written for low width data.

author: bsudbrink
author_rank: Frequent Contributor
timestamp: August 08, 2017, 03:39:16 pm
content: Here's a higher res version of my avatar, how "real men" (just kidding) learned to program the 6502 back in the day:

author: PA0PBZ
author_rank: Super Contributor
timestamp: August 08, 2017, 05:18:17 pm
content: Quote from: bsudbrink on August 08, 2017, 03:39:16 pmDon't you love it when the data bits outnumber the address bits?But it's true, once you learned how to program things like this (a KIM-1 for me) you never forget how assembly language works.

author: bingo600
author_rank: Super Contributor
timestamp: August 19, 2017, 09:07:38 am
content: I'd go for the FPGA ($13) version (I have the FPGA board as a MC6809)http://searle.hostei.com/grant/Multicomp/And this baseboardhttps://www.retrobrewcomputers.org/forum/index.php?t=msg&th=19&start=40&Using NealC's implementation (MC6809 or Z80)https://www.retrobrewcomputers.org/doku.php?id=boards:sbc:multicomp:cycloneii-c:start#downloads/Bingo

author: james_s
author_rank: Super Contributor
timestamp: December 05, 2017, 08:46:43 pm
content: I made a similar daughterboard some time back that does roughly the same thing but it's much smaller than that baseboard. I'll post the design here when I get home in case anyone wants to make one, I've got all three varieties running on the hardware, 6502, 6809 and a decked out Z80 system running CP/M.

author: stj
author_rank: Super Contributor
timestamp: December 06, 2017, 12:44:29 pm
content: what's the goal here?if you just want to write code then use an emulator - like MAME.emulate an apple2 or a bbc micro and write your code in the emulator.mame has a debugger & dissassembler built in you can cheat with!6502 was faster btw, because it had very low cycle-count operations.there was a video on utube of an interview with a guy from Atari arcade-division - possibly Edd Logg,he was saying that a 6502 cound run code almost as fast as a 68000, and the only reason they switched was to get the bigger memory-map!

author: brucehoult
author_rank: Super Contributor
timestamp: December 07, 2017, 07:40:07 pm
content: Quote from: stj on December 06, 2017, 12:44:29 pmCode with 8 bit variables only, i the 68000 is running at twice the clock speed of the 6502 .. ok, maybe.1 or 2 MHz 6502 vs 8 MHz 68000 ... not a chance.

author: stj
author_rank: Super Contributor
timestamp: December 08, 2017, 08:08:20 am
content: 2MHz 6502, vs 7MHz 68000and his comment was based on real hardware his unit built running software his team wrote - so i trust him.

author: brucehoult
author_rank: Super Contributor
timestamp: December 08, 2017, 09:04:30 am
content: Quote from: stj on December 08, 2017, 08:08:20 amI don't believe it.6502 takes 1 clock cycle per byte read/write (including instruction fetch), with a minimum of 2, plus 1 extra for a taken branch, or for a carry (page crossing) during indexed addressing or branch offset calculation.68000 takes 4 clock cycles per byte or word read/write (including instruction fetch), plus 2 more for indexed addressing (each operand) or a taken branch.So, on the face of it, it looks at first that a 2 Mhz 6502 and 8 MHz 68000 are going to have similar timings.The problem is, the 6502 usually needs several instructions to do what the 68k can do in one.For example, your commonly-used variables are usually in registers on 68k and in Zero Page on 6502. The 68k does a register-to-register add in 4 clock cycles (8 for a = b + c rather than a += b because it needs an extra move). The 6502 needs 11 cycles for 8 bit variables (CLC, LDA, ADC, STA) or 20 cycles for 16 bit variables.If they were clocked the same and you only needed 8 bit variables then the 6502 would be not too far off. But that's not the case. The 68k is clocked 3 or 4 times faster.What about memory block moves (often a limiting factor)?The 68k typically does "move (an)+,(an)+; dbne" for 22 cycles for copying either a byte or a word at a time. (let's ignore 32 bits at a time, which is 30% faster again). 6502 typically does "lda (zp),y;sta (zp),y;dey;bne" for 15 cycles per byte assuming no page crossing. If you don't mind self-modifying code you can cut the 6502 time down by 2 cycles. Unrolling has a similar effect for both, so I'll ignore that.So, again, if they were clocked the same and the 68k is restricted to byte-at-a-time then the 6502 is competitive .. even a little faster. But, again. the 68k is actually clocked 3 or 4 times faster.I'm sorry, but I just don't see it.

author: brucehoult
author_rank: Super Contributor
timestamp: December 08, 2017, 09:41:17 am
content: Oh, one possibility. Maybe your friend was not talking about the 68000 but the 68008 which, like the 8088 in the original PC, used an 8 bit bus. That might hobble it almost enough for the 6502 to be somewhat speed competitive on some programs.

author: stj
author_rank: Super Contributor
timestamp: December 08, 2017, 02:41:31 pm
content: memory block move in atari's case can be done using the blitter chips - so it does not count.