6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Apr 27, 2024 6:04 pm

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Fri Dec 29, 2023 8:36 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10793
Location: England
I might have written something like this before, but I don't see it, and I feel moved to write...

When pondering what it is about the 6502 which has made it a long-term interest for me, what do I come up with?
- it was the first CPU I got to know well
- it's the CPU in the BBC Micro, and as the Basic includes an assembler, and as I got a Beeb early on, it's become the only CPU for which I've written any real amount of assembly code
- it's popular! So it hasn't been so unusual to bump into other people who share the same interest, whether in-person or online
- it had a good coverage in magazines, because of the popularity of computers using it
- it's got a good presence on the web, both for discussion and for projects
- it's simple! So it wasn't so difficult for me to learn to program it
- and yet it's adequately complex - can host Basic or Forth, can implement chess or spreadsheets or calculators, can run sophisticated operating systems or control machines, and more besides
- from the simplicity and the popularity, we get many emulators, some very small, some very fast, some very accurate, some very portable
- being simple makes it a useful teaching tool, whether to teach CPU implementation, or simple single board computer construction, or programming at the machine level
- being simple also makes it a tempting target for reimplementations, whether with TTL, or CPLD, or FPGA, or even discrete transistors
- being simple also makes it a good starting place for enhancements, whether the several 'C02 variations or homebrew extensions or tributes, or of course the '816
- it's still available in DIP, as are enough of the peripheral, memory, and glue chips one might attach
- naturally, this forum and the people on it have been a large part of my enduring interest!

In some ways, then, the reasons for my continuing interest spring from the same causes which led to the initial popularity of the chip: it's simple, but adequately capable, so it was cheap and could be designed into machines which became very popular, leading to a continuing community of enthusiasts.

My fascination with 6502 has been 40-some years, long may it continue...


Top
 Profile  
Reply with quote  
PostPosted: Fri Dec 29, 2023 8:52 am 
Offline

Joined: Mon Jan 19, 2004 12:49 pm
Posts: 660
Location: Potsdam, DE
Y'know, I fell into it by accident... I started computing with the SC/MP 8060 in the Sinclair MK14, but outgrew that after a few months (memory and video cards were designed and built but weren't an easy fit to the system, and the machine language was, um, interesting).

And then the choice came down to a Nascom (Z80) or a Microtan 65 (6502). And Nascom didn't accept my brand of credit card... the rest is history. I did no end of ripping off the Microtan design (er, I mean, I was inspired and strongly influenced by it); working in the BBC I used it to provide a graphical countdown for the first space shuttle flight, to control a bank of umatic VCRs to pre-record colour bars and countdown and timecode so they could more quickly be used for editing (that lasted until the BBC moved over to digital recording!) and studio timers and controllers (again, they lasted until the building was knocked down!).

And here I am again, forty years later! I've worked (professionally) with the Z80, among others, but it never really appealed to me, though I have a soft spot for the original 8080. But the 6502 seems to have just the right mix of simplicity and complexity to be both usable and fun.

Neil


Top
 Profile  
Reply with quote  
PostPosted: Fri Dec 29, 2023 9:01 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10793
Location: England
Wow, that's impressive!


Top
 Profile  
Reply with quote  
PostPosted: Fri Dec 29, 2023 4:23 pm 
Offline

Joined: Mon Jan 19, 2004 12:49 pm
Posts: 660
Location: Potsdam, DE
Thanks! I've never seen another system with one 6502 and sixteen 6522s... but for anything with proper video, the fact that it's so easy to synchronise a ph2 clock generated video system with an incoming video signal makes it a no-brainer for anything to do with live video.

Neil


Top
 Profile  
Reply with quote  
PostPosted: Fri Dec 29, 2023 4:49 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3346
Location: Ontario, Canada
Banks of studio-grade VCRs under control of a 6502 in a fast-paced, on-air environment... I love mental the image of this! :)

Like Neil, I too fell into using the 65xx family by accident. The KIM-1 is what happened to be in stock at my local electronics store, and, to my 1979 noob sensibilities, it seemed as good an option as any for getting my feet wet. At the time I wasn't able to foresee just how richly that particular choice -- KIM and 6502 -- would reward me. :!:

I'll mention two factors whose importance is pivotal, and the first is the MOS 6500 Family hardware and software manuals included with my KIM-1.

Chuck Peddle famously procrastinated on creating those manuals -- humorous story, and the manuals themselves, here -- but eventually he and his team delivered in spades.
Quote:
And what we were trying to do is make it so anybody could read it and do it. And they did. Those manuals, really and truly we were proud of them.
Well done !! The educational impact for me was enormous.



Hackability (new instructions)

The other factor which makes the 65xx Family memorable for me is its hackability in terms of creating new instructions. (I mean full speed, hardware-based instructions, not software interrupts.) The scope is such that many plans remain on the drawing board -- I have accumulated far more ideas than I'll ever be able to implement! But off the top of my head I can think of 3 or 4 ventures that actually did get completed and successfully put in service (see below). Again I need to credit a legendary figure; Don Lancaster and the hacking described in his Cheap Video Cookbook were inspirational for me.

It's no small advantage that the 65xx relies so heavily on zero-page indirect accesses. Unlike those of other processor families, the 65xx "pointer registers" don't reside on-chip. This (and tracking the history of the SYNC pin) make it easily possible to snoop or even hijack and subvert :shock: the fetches upon which an address calculation is about to be performed.

There's a more down-to-earth advantage when it comes to the 'C02 in particular. Unlike NMOS undefined opcodes, 'C02 undefined opcodes are all nominally NOPs, and for the most part they have highly predictable and exploitable behavior. Various possibilities are mentioned in more detail here, but one quick example as a teaser is the single-cycle NOPs. Beside being extremely fast (single cycle), these truly *are* NOPs, which the CPU obligingly fetches for us then ignores. External hardware can easily detect a single-cycle NOP and perform a discrete response. Or, far more powerfully, the response may be to modify the following instruction. This is similar to the escape "prefix" bytes used with x86, Z80 and 6809 (to name just a few).

-- Jeff

Here is a very simple scheme that allows 'C02 single-cycle NOPs to produce a discrete response (a write to an output port).

This and the following posts show how an ordinary 6502 can be coaxed to produce the 20-bit extended addressing found on a 6509. I never built this circuit; but, as the thread reveals, Jim Brain successfully used it as the basis for his PLD-plus-65xx 6509 substitute. (Actual 6509's are scarce these days.)

This post touches on my first 'C02 hack, the so-called "time bomb" circuit which enabled my KIM-1 to momentarily or otherwise flip the entire 64k address space all at once in order to access a total of 128K.

My KK Computer features new registers, new instructions and also some new address modes. I may perhaps be guilty of getting carried away! :oops: KK uses external microcode to coordinate with what the 'C02 is doing internally, but there's much that the 65xx family makes possible without resorting to that level of complexity.

_________________
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  [ 5 posts ] 

All times are UTC


Who is online

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