Looking for recommended 65C02/65C816 SBC for learning

Building your first 6502-based project? We'll help you get started here.
Ardis
Posts: 27
Joined: 07 Dec 2023

Looking for recommended 65C02/65C816 SBC for learning

Post by Ardis »

I'm looking to pick up an SBC to use for learning to write code for the 65xx and wanted to ask what options are recommended for someone who:
  • Comes from a self-taught C programming background and would prefer to use something that is supported by a C compiler (Whether it's the WDC tools or another compiler)
  • Does not like assembly and will try to avoid using it as much as possible
  • Has a budget of $100 for the SBC and a simple display for it (looking at monochrome LCDs that are 96x64 or smaller, still exploring options, but will be using SPI or I2C)
  • Needs something made from off the shelf parts still in production as what I develop with this will be spun off into projects I'd like to make more than one of cheaply
  • Can solder if the the SBC is a kit that comes pre-assembled, but won't touch any grid array ICs unless a socket is used
  • Wants to get output to a SPI/I2C graphic display as quick as possible by direct CPU drawing (in terms of time spent getting it working, not the communication speed)
  • Wants exposed address/data bus lines
My goal is to get the basics down, but also have something I can slowly turn into a project of its own, something far simpler than the 65C816 handheld console I had described before (that's a long term goal and smaller projects along the way will help me learn what I need to get there.)

I was leaning towards the 65C02SXB, with plans to purchase a W65C02EDU for it at a later date if I go that route, but I wanted to hear thoughts on it as a first SBC for a newbie to this field and see if there were better options that I might not have heard of.
enso1
Posts: 197
Joined: 30 Jul 2024

Re: Looking for recommended 65C02/65C816 SBC for learning

Post by enso1 »

The 6502 is ill-suited for C (lack of registers, poor stack access, irregular instruction set), and even though there are a couple of compilers out there, the code generated is not great and fitting anything useful into sub-64K space (code and data) is tough. If you like C small, inexpensive ARM boards make a lot more sense.

The 6502 is extremely fun for assembly coders for the same reasons it is bad for C. We are still managing to impress each other with a neat way to do things no one has thought of before (see the Programming forum). I would strongly recommend learning assembly (it is easy!), especially if you plan to build hardware and are in it for the long haul.

There is also Forth, which is a great option for the 6502.

65C02SXB was one of the tougher boards to use (I wish I could remember exactly why -- but I do remember much frustration, though maybe it was some other SXB). For instance see the topic viewtopic.php?f=12&t=7168 titled "Trying to decipher the mysteriously confusing WDC 65c02 SXB"...
Paganini
Posts: 516
Joined: 18 Mar 2022

Re: Looking for recommended 65C02/65C816 SBC for learning

Post by Paganini »

If I'm reading your requirements right, I think you are pretty much out of luck.

If you want to learn to write code for the 6502, that means learning to write 6502 assembly language. If that's *all* that you want to do (i.e., you are not a hobby hardware hacker) then you can easily do that in the Virtual 6502: https://www.masswerk.at/6502/

Setting aside the question of assembly language, the only "ready go to" commercial SBCs I know of are the ones from WDC, and they seem to be fraught for a variety of reasons.

Most SBCs come from 6502 hobbyists, so even if you're willing to build from a kit you're unlikely to find one with all the parts assembled where all you have to do is solder. The ones that do exist, like the Mini PET from Tynemouth, tend to be very expensive (that one was in excess of $300, if I remember).

If you *are* a hardware hacker, then you basically have 3 ways to go:

1) - Build wire-wrap on perf-board as Garth suggests in the Primer: https://wilsonminesco.com/6502primer/WireWrap.html
2) - Build on breadboards like Ben Eater: https://eater.net/ (But do it like Radical Brad with Twin Industries breaboards and cut up ethernet cable or do wire-wrap on breadboards, like me!)
3) - Order some PCBs from PCBWay or similar place for a kit such as the RC6502 or the Planck6502. You'll have to supply your own components, populate and solder the boards yourself, but this is probably your best bet if you want something actually resembling anything that can fairly be called an "SBC."
"The key is not to let the hardware sense any fear." - Radical Brad
User avatar
AndrewP
Posts: 368
Joined: 30 Aug 2021
Location: South Africa

Re: Looking for recommended 65C02/65C816 SBC for learning

Post by AndrewP »

Paganini wrote:
Most SBCs come from 6502 hobbyists, so even if you're willing to build from a kit you're unlikely to find one with all the parts assembled where all you have to do is solder. The ones that do exist, like the Mini PET from Tynemouth, tend to be very expensive (that one was in excess of $300, if I remember).
There's also the PE6502, the concept of which got me back into 6502, from Putnam Electronics. I've not ordered one and have no idea if they're still manufactured but I like the minimalist Apple I style.

And of course there's always the Commander X16. But it's kind of out of SBC territory.
GlennSmith
Posts: 162
Joined: 26 Dec 2002
Location: Occitanie, France

Re: Looking for recommended 65C02/65C816 SBC for learning

Post by GlennSmith »

Paganini wrote:
Most SBCs come from 6502 hobbyists, so even if you're willing to build from a kit you're unlikely to find one with all the parts assembled where all you have to do is solder. The ones that do exist, like the Mini PET from Tynemouth, tend to be very expensive (that one was in excess of $300, if I remember).
There is also the RP 'pico' computer, details can be found here and here
The single board has standard parts : WDC65C02, 6522, 1Mb SRAM (only half used), some CMOS TTL, 2 RPi 'pico' boards and a handful of R's and C's. Everything is through-hole.
If you're in Europe I can even supply you with a PCB, 'cos I had to get 5 mfd. & delivered from china. There is a BOM with all the component refs. at Mouser (altho some refs. will need a little tweaking, 'cos component lifecycles seem to get shorter & shorter in these modern times).
The rp6502 has a development environment that is designed around cc65 - a very comprehensive C compiler that also includes a powerful assembler. There is a small user base that have contributed some software, including a port of EHBasic, a self-hosted on-screen editor and the most amazing Space-Invaders game (compiled with cc65!). The presence of the RPi 'pico' boards gives you immediate access to an optional VGA graphics environment (1 pico board), a multi-channel sound card, USB peripherals (kbd, mouse, USB stick/HDD) and a filesystem that is compatible with Win/Linux( 2nd pico board). If you remove the 'VGA pico', you have an integrated UART that provides 3v3 Tx/Rx signals, and also access via a terminal emulator on a host PC. You can really concentrate on learning & coding!
I'm now incorporating the rp6502 base design into my own 'homebrew' design with the bells & whistles that I had originally designed and debugged on a completely homegrown SBC.
Glenn-in-France
enso1
Posts: 197
Joined: 30 Jul 2024

Re: Looking for recommended 65C02/65C816 SBC for learning

Post by enso1 »

I don't want to offend, but... You could get a $30 Tang Nano 20K board and load my 70MHz 65c02 with 64K RAM, SD card support, etc. See viewtopic.php?f=10&t=8270. And as you get comfortable, you can try modifying the verilog to use the built-in sound, 8MB SDRAM and LCD display (or HDMI if you want), which is what you previously specified... I still don't know why you are so resistant to the most obvious and absurdly cheap off-the-shelf solution that exactly matches your requirements!
BruceRMcF
Posts: 388
Joined: 21 Aug 2019

Re: Looking for recommended 65C02/65C816 SBC for learning

Post by BruceRMcF »

enso1 wrote:
I don't want to offend, but... You could get a $30 Tang Nano 20K board and load my 70MHz 65c02 with 64K RAM, SD card support, etc. See viewtopic.php?f=10&t=8270. And as you get comfortable, you can try modifying the verilog to use the built-in sound, 8MB SDRAM and LCD display (or HDMI if you want), which is what you previously specified...
Do those leave enough pins for the specified exposed data bus, address lines and bus signals? That's part of the appeal of the RP pico 6502 system.
Ardis
Posts: 27
Joined: 07 Dec 2023

Re: Looking for recommended 65C02/65C816 SBC for learning

Post by Ardis »

enso1 wrote:
The 6502 is ill-suited for C (lack of registers, poor stack access, irregular instruction set), and even though there are a couple of compilers out there, the code generated is not great and fitting anything useful into sub-64K space (code and data) is tough. If you like C small, inexpensive ARM boards make a lot more sense.

The 6502 is extremely fun for assembly coders for the same reasons it is bad for C. We are still managing to impress each other with a neat way to do things no one has thought of before (see the Programming forum). I would strongly recommend learning assembly (it is easy!), especially if you plan to build hardware and are in it for the long haul.

There is also Forth, which is a great option for the 6502.

65C02SXB was one of the tougher boards to use (I wish I could remember exactly why -- but I do remember much frustration, though maybe it was some other SXB). For instance see the topic viewtopic.php?f=12&t=7168 titled "Trying to decipher the mysteriously confusing WDC 65c02 SXB"...
The simpler project I want to try building first is just a little digital pet type of toy, eventually adding on a cartridge slot with mini-games you'd play with said pet, so I don't think I'm trying to squeeze a lot performance out of it. I had considered switching to a different CPU or microcontroller for this project, but I wanted to have something that had both 8 and 16 bit counterparts.

With that said, I suppose learning assembly is unavoidable if I want to design custom hardware, so I would have to start learning. I've been hesitant to approach it because I have trouble reading shorthand. If I had an assembly compiler that let me use full words for my op codes instead of two letters, that would probably help me understand it better.

AndrewP wrote:
Paganini wrote:
Most SBCs come from 6502 hobbyists, so even if you're willing to build from a kit you're unlikely to find one with all the parts assembled where all you have to do is solder. The ones that do exist, like the Mini PET from Tynemouth, tend to be very expensive (that one was in excess of $300, if I remember).
There's also the PE6502, the concept of which got me back into 6502, from Putnam Electronics. I've not ordered one and have no idea if they're still manufactured but I like the minimalist Apple I style.

And of course there's always the Commander X16. But it's kind of out of SBC territory.
The PE6502 was one I had found in my searches and had considered. Last I saw, the designer for it found a box of old boards that they were looking to sell (meaning I'd have to buy parts to populate it myself.) I had an email draft sitting in my email about to ask if they had any left before I started looking at the W65C02 more closely (mostly after noticing that the W65C02EDU board had SPI and I2C ports on it.)

On a side note: Funnily enough, it was the Commander X16 dropping plans to use the W65C816 that caused me to go down the whole "I want to make a 16-bit handheld" path to begin with.

enso1 wrote:
I don't want to offend, but... You could get a $30 Tang Nano 20K board and load my 70MHz 65c02 with 64K RAM, SD card support, etc. See viewtopic.php?f=10&t=8270. And as you get comfortable, you can try modifying the verilog to use the built-in sound, 8MB SDRAM and LCD display (or HDMI if you want), which is what you previously specified... I still don't know why you are so resistant to the most obvious and absurdly cheap off-the-shelf solution that exactly matches your requirements!
I'm hard to offend. Stubborn, but hard to offend. The Tang Nano sounds like massive overkill for the types of devices I want to make and leaves a lot of room for feature creep with all that available power (which is something that has paralyzed many of my past projects before.) Like strapping booster rockets meant for space shuttles to an airplane.
User avatar
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: Looking for recommended 65C02/65C816 SBC for learning

Post by GARTHWILSON »

Quote:
I've been hesitant to approach [assembly language] because I have trouble reading shorthand. If I had an assembly compiler that let me use full words for my op codes instead of two letters, that would probably help me understand it better.
You could do that to some extent with macros, but I think you'll find 65xx assembly-language mnemonics themselves pretty easy.  (BTW, they're all 3-letter, unlike other processors' overloaded 2-letter ones like "LD.")
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?
User avatar
BigDumbDinosaur
Posts: 9425
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: Looking for recommended 65C02/65C816 SBC for learning

Post by BigDumbDinosaur »

Ardis wrote:
With that said, I suppose learning assembly is unavoidable if I want to design custom hardware, so I would have to start learning. I've been hesitant to approach it because I have trouble reading shorthand. If I had an assembly compiler that let me use full words for my op codes instead of two letters, that would probably help me understand it better.

Of all the assembly language dialects that have been developed, the 6502 rendition is, in my opinion, one of the easiest with which to get up to speed.  As Garth said, the mnemonics are three letters and, for me at least, intuitive.  6502 assembly language lends itself very well to solving problems, with that utility enhanced by an assembler with a good macro language.  I have written major applications in 6502 assembly language, one such application which ran to nearly 100,000 lines of code.

The eight-bit 6502 family doesn’t mesh well with the needs of C compilers, especially since stack operations beyond basic pushes and pulls are awkward.  The simplicity of the instruction set is what makes it easy to use, but is also why the 6502 is not a good compiler target (the 65C816’s ISA was developed to make it a better compiler target than its eight-bit brethren).
x86?  We ain't got no x86.  We don't NEED no stinking x86!
enso1
Posts: 197
Joined: 30 Jul 2024

Re: Looking for recommended 65C02/65C816 SBC for learning

Post by enso1 »

tangnano20k.png
There are a lot of free pins, although getting the full address and data buses out would be a challenge.

I don't understand the 'too big' objection -- my 65c02 system takes up almost all the BRAMS, and while there are a lot of free flip flops, you can just ignore them. And power consumption is in milliwatts. Adding on features is really not that easy without dropping the clock speed and increasing build time, so if anything, there is an incentive in keeping it small. Given your stated goals, the only thing you don't need is the HDMI port, which is hardly a deal-breaker!

It's pretty much custom-made for your application, just add controllers, a charging circuit/battery, attach a speaker to the on-board amp, and choose an LCD.
tangnano20k1.png
Someday I will get to the bottom of why you are self-sabotaging your project!
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: Looking for recommended 65C02/65C816 SBC for learning

Post by BigEd »

It's perfectly reasonable for someone to have a preference for how they implement their projects. Breadboards, PCBs, FPGAs, microcontrollers, emulators, it's a choice.

Don't suppose everyone wants to the follow the same path - it's just not so.
BruceRMcF
Posts: 388
Joined: 21 Aug 2019

Re: Looking for recommended 65C02/65C816 SBC for learning

Post by BruceRMcF »

enso1 wrote:
tangnano20k.png
There are a lot of free pins, although getting the full address and data buses out would be a challenge.
And plus there's the level shifting, if the full 65C02 bus is coming out of the Tang Nano. You'd want that to be either a 5v bus or a 3.3v bus.

There's part of the appeal of a hybrid approach like the RP+65C02 circuit ... fewer free pins are required on the "modern" part (whether RP pico or an FPGA mini-board) if the full address and data bus is from an actual 65C02 and the 65C02 is talking to the "modern" part somewhere in the top of the memory space.

Say you had a Tang Nano (whichever), an 8 pin I/O port on it used as the data bus in data bus mode, and the 65C02 talks to the Tang Nano (wevs) at $FF00-$FFFF. A page is plenty to offer the interrupt vectors, the I/O pseudo-register locations and a boot-loader routine for the 65C02 to execute on start-up.

A little glue logic multiplexes the lower 8 bits of the 65C02 address bus in Phase1 and the 65C02 data bus in Phase 2 ... and the cores implemented for the Tang Nano have the necessary delays from the start of the clock phase designed in, so an input for the 65C02 clock, an input for R/W and an input for the /select for $FFxx addresses would be it ... so the same 8 I/O pins is where the Tang Nano gets the 8bit page address ... so a total of 8 pins I/O, 3pins Input.

Maybe an additional output pin so the Tang Nano can pull down the Ready pin if it needs time to set up between a reset line going low and the 65C02 jumping to the reset vector.

That also reduces the amount of level shifting required ... a tri-state latch for the address lines with seperate input and output voltage might do it for the address line level shifting.

A Tang Nano (the smallest one that supports providing all of the support abilities), a 65C02, a 32 KB SRAM, and you are good to go.

It can't go 70MHz, but not everything needs to go 70MHz, and it should be able to run at 16Mhz.
enso1
Posts: 197
Joined: 30 Jul 2024

Re: Looking for recommended 65C02/65C816 SBC for learning

Post by enso1 »

Bruce, that is one way to do it. It would cost a lot more, require way more effort, and be somewhat inferior in every way I could think of, especially if the goal is to slowly modify it from a simple system to something like a hand-held game. You could do it, but you could also just keep the Nano board and not buy a 6502, memory, crystal, not design and manufacture a PC board a few times, etc, in addition to learning to program.

For a hybrid you can use the tiniest Tang Nano 1K, which I bought for $10 a while back... It has hardly anything on board -- not even a serial via USB -- so I gave up on it rather quickly, but it could easily boot a real 6502 and provide some basic services.

Sometimes it's possible to not use level shifters, using just inbuilt diodes and resistors. I am not sure if it would work here.

And yes, it is entirely up to each person how they want to implement their system. But if they ask specific questions, and there is an obvious solution -- at a fraction of the cost of everything else, and basically meeting the specifications laid out in half a dozen posts now -- complete with a path from a 'trainer' to the highly-specialized end-goal, all in one $30 package -- it makes you wonder what's up.

The difference is a working system tomorrow for $30, or a bunch of "how could I possibly do this really difficult task I am totally unequipped to do, but would like to, in the most complicated way imaginable, using the most inappropriate tools I've heard about somewhere. I also know nothing about any of it, don't know where to begin, but have very strong opinions. " -type questions.
BruceRMcF
Posts: 388
Joined: 21 Aug 2019

Re: Looking for recommended 65C02/65C816 SBC for learning

Post by BruceRMcF »

enso1 wrote:
Bruce, that is one way to do it. It would cost a lot more, require way more effort, and be somewhat inferior in every way I could think of ...
"Somewhat inferior in every way" you could think of, yet superior in the specific and precise way specified at the head of the example.

It is for each of use fairly easy to keep in mind the priorities we have, but it may be harder to bear in mind the priorities others have if we do not happen to share them.
Post Reply