6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 11:31 am

All times are UTC




Post new topic Reply to topic  [ 15 posts ] 
Author Message
PostPosted: Mon Feb 15, 2021 3:29 am 
Offline

Joined: Mon Feb 15, 2021 2:11 am
Posts: 100
Hi, I'm Sean, and I plan to build a 65XX-based computer. I've been programming for decades but haven't done much hardware hacking, but I've been inspired by the Ben Eater videos, various retro-computing initiatives, and conversations with older friends about all the cool computers back in the 80's. I first programmed on a Commodore 64 at my first elementary school, did some more on the Apples in my second elementary school, a little bit with Macs and Unix-y systems. Most of my programming was on DOS, then Windows, though. I had a college course in x86 assembly, and learned the basics of C and Pascal in high school. I've programmed in a variety of modern procedural and OOP languages since.

I'm thinking my most likely project will be either W65C816 or W65C265 based. I've read here that the WDC single-board computer based on the W65C816 has had known issues (too-slow IC in the address latch, IIRC) and it only runs at 8 MHz anyway, whereas I aspire to have it run at maximum possible speed. Alas the SBC based on the W65C265 is even slower. The FPGA-based microcontroller SBC's look nice, but for some reason I want to run with "real" chips. I may start by buying and assembling the Ben Eater kit then start working things up from there, and move from breadboard to wire-wrapped perfboard or PCB's. My plans are still rather nebulous.

Anyhow, just introducing myself. Thanks to everybody who's been contributing to the discussions here. I've found the past couple weeks of reading here very educational. I've been taking lots of notes.


Top
 Profile  
Reply with quote  
PostPosted: Mon Feb 15, 2021 3:49 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8545
Location: Southern California
Welcome. Be sure to go through the 6502 primer at http://wilsonminesco.com/6502primer/ which is all about building your own 6502 computer. The '816 is the next step up of course, but most of the same material applies. Ben Eater apparently got his address-decoding scheme from the 6502 primer—not that it's impossible for someone to come up with the same thing without knowing of the primer's existence though. I've been using it since the early 1990's.

_________________
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  
PostPosted: Mon Feb 15, 2021 6:22 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8509
Location: Midwestern USA
Sean wrote:
Hi, I'm Sean, and I plan to build a 65XX-based computer.

Welcome!

A piece of advice I always offer to someone who is wanting to build their first 65xx contraption is to start out simple. The more features you add the greater the likelihood the unit will be DOA and thus the greater the likelihood you will become discouraged. The beauty of the 65xx architecture is it doesn't take a lot of hardware to make a functioning unit. A suitable clock source, basic logic gates, a UART and a 65C22, along with some RAM and ROM, will get you going. Also, consulting Garth's 6502 primer is invaluable in laying out your design and anticipating problem areas.

Quote:
I'm thinking my most likely project will be either W65C816 or W65C265 based.

My opinion is you should not consider the 65C265. While WDC's processors are excellent products, their microcontrollers leave something to be desired.

A 65C816 design can be made fairly simple if you elect as part of your first effort to forego use of extended RAM (i.e., RAM beyond 64KB). That way you don't have to worry about decoding the A16-A21 address bits, which reduces your design's glue logic complexity. My POC V1 units were built that way and work well—POC V1.2 runs at 20 MHz.

Naturally, you will need to write some code for your machine. There is a variety of editors and assemblers available, the choice depending on the operating environment you prefer. Although I am a UNIX knuckle-dragger from long ago (over 40 years), I do my 65C816 development in the Kowalski simulator, which runs on Billy-ware. Thanks to 8BIT's hard work, the simulator's assembler can assemble programs written specifically for the 65C816 running in native mode. Object code can be save as binary, Intel hex or Motorola S-records.

Anyhow, if you have questions don't be shy about asking. We're never shy about offering advice and opinions. :D

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


Top
 Profile  
Reply with quote  
PostPosted: Mon Feb 15, 2021 7:38 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8545
Location: Southern California
BigDumbDinosaur wrote:
Although I am a UNIX knuckle-dragger from long ago (over 40 years), I do my 65C816 development in the Kowalski simulator, which runs on Billy-ware. Thanks to 8BIT's hard work, the simulator's assembler can assemble programs written specifically for the 65C816 running in native mode.

The link to get Daryl's latest (at the time of this writing) on the Kowalski assembler and simulator is viewtopic.php?p=81861#p81861 . (Read the entire topic if you like, but it's 11 pages long!)

I myself am using the Cross-32 (C32 for short), formerly from Universal Cross Assemblers, now sold by Data Sync Engineering, at http://www.datasynceng.com/c32doc.htm . It's also available from MPE, at http://www.mpeforth.com/cross32.htm. For $99, you get a great macro assembler that can be used for dozens of processors.

_________________
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  
PostPosted: Mon Feb 15, 2021 8:32 am 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1488
Location: Scotland
Sean wrote:
I'm thinking my most likely project will be either W65C816 or W65C265 based.


Hi Sean, welcome, etc.

You can make it as easy or as hard as you like - I built a 65816 system that runs at 16Mhz/256KB on a double sided PCB without taking any special precautions, BDD here has a 4-layer board that runs at 20Mhz, so it's up to you.

I'd suggest starting with a 65C02/64KB though - you can drop-in a 65c816 later if you like (one resistor change, or use a couple of jumpers to to it "properly") then you could start to use some of the '816 features.

This: https://projects.drogon.net/ruby-6502-b ... uby-65816/ was what I did to 'upgrade' my initial 6502 board.

Hope it goes well!

Cheers,

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
PostPosted: Mon Feb 15, 2021 3:19 pm 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1385
In addition to a welcome, etc., I'll just add my $0.02 on obtaining hardware. Granted, I've no issue with anyone turning a bit of this stuff into a business, and Ben has gotten some good exposure with his videos. Having said that, it seems that a lot of folks who buy his kit end up here asking questions, trying to solve issues they've encountered, etc. I'd also say the (6502) kit is limited in what you get and would recommend a different path. Also realize you still need a power supply and a way to program the EEPROM, so you still have to go shopping elsewhere.

I typically use Mouser... and for anyone getting started with a 65XX project, I too would recommend starting with the W65C02. In any case, for a bit more than the kit, you can purchase a decent breadboard, more chips, caps, etc., with a power supply and be able to build beyond the confines of the kit quickly and easily. Here's a basic list of things you should get:

Protoboard: $29.98

RAM: $2.54
ROM:$9.77
CPU: $6.95
VIA: $6.95

74HC00: $0.48
74HC04: $0.48
74HC30: $0.45
74HC138: $0.44
74HC139: $0.43

DS1813: $2.24

1MHz-Osc: $2.18

0.1uF caps: $0.20 each
68uF/16V caps: $0.70 each

3.3Kx8: $0.43
Tactil Switches: $0.15 each

5V/3A PS: $12.50

16x2 display: $8.75 and up

I'd use a resistor network as noted above... and even at $30, the Twin Industries TW-E41-1060 breadboard comes with some jumper wires... in any case, you'll have a larger and more flexible grouping of parts to get started with... and can add a UART to connect to a terminal with.

Again, nothing against the kit, but hanging around us old bunch will likely have you wanting to do a lot more and much sooner than you think. Good luck.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 16, 2021 4:56 am 
Offline

Joined: Mon Feb 15, 2021 2:11 am
Posts: 100
GARTHWILSON wrote:
Welcome. Be sure to go through the 6502 primer at http://wilsonminesco.com/6502primer/ which is all about building your own 6502 computer. The '816 is the next step up of course, but most of the same material applies. Ben Eater apparently got his address-decoding scheme from the 6502 primer—not that it's impossible for someone to come up with the same thing without knowing of the primer's existence though. I've been using it since the early 1990's.


Thanks. I've already been through your excellent primer at least once, but probably more like three times because searching the web keeps coming back to your primer. I did note the similarity in the decoding scheme.


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 16, 2021 8:08 am 
Offline
User avatar

Joined: Mon Feb 01, 2021 1:07 am
Posts: 44
Location: Sydney, Australia
Hi Sean,

Firstly welcome! I'm very much a newbie - only started reading up on 6502 "stuff" about a month ago!

Sean wrote:
Hi, I'm Sean, and I plan to build a 65XX-based computer. I've been programming for decades but haven't done much hardware hacking, but I've been inspired by the Ben Eater videos, various retro-computing initiatives, and conversations with older friends about all the cool computers back in the 80's. I first programmed on a Commodore 64 at my first elementary school, did some more on the Apples in my second elementary school, a little bit with Macs and Unix-y systems. Most of my programming was on DOS, then Windows, though. I had a college course in x86 assembly, and learned the basics of C and Pascal in high school. I've programmed in a variety of modern procedural and OOP languages since.
Ok, your description is almost identical to mine...C64, 80s, x86 asm in college, then Pascal, C... finally modern high-level languages since.


Sean wrote:
I'm thinking my most likely project will be either W65C816 or W65C265 based. I've read here that the WDC single-board computer based on the W65C816 has had known issues (too-slow IC in the address latch, IIRC) and it only runs at 8 MHz anyway, whereas I aspire to have it run at maximum possible speed. Alas the SBC based on the W65C265 is even slower. The FPGA-based microcontroller SBC's look nice, but for some reason I want to run with "real" chips. I may start by buying and assembling the Ben Eater kit then start working things up from there, and move from breadboard to wire-wrapped perfboard or PCB's. My plans are still rather nebulous.
I also initially wanted to go with the '816 chip, my motivation being that it's a faster and more modern chip. But after reading up (and whatever little I understood at the time) it has more complex architecture and something about timings and stuff being a bit awkward to program/work with. So I went with the 65C02. Much like you, I want to use "real chips", and moreover I've decided to use only components from the 80s era to keep it authentic - in the spirit of the era. But I am using all CMOS versions (65C02 not the NMOS 6502) of chips!

My first stop was to get out my old college book on the 6502 Microprocessors and Microcomputers 3rd Edition by Tocci & Laskowski. I've read it twice! (I can't believe I kept this book, I somehow knew it would come in handy one day). Anyway this gave me good fundamental knowledge. But I had a million questions on how to proceed and actually do a build. After speaking to a friend, he recommended this site. It didn't take long to find the 6502 Primer. An awesome read huh?!. This gave me knowledge on how to proceed, and saved me alot of time. With my very fragile and new found knowledge, I looked for SBC designs and went with Daryl's SBC-2 https://sbc.rictor.org/info2.html. The most difficult part of the schematic for me was understanding the address decoding section. So I tackled this section first and it took me some time to understand it. The remaining sections all fell into place. Soon afterwards I learnt about Programmable Logic Devices (PLDs), then decided to replace the 74 series chips.

Now I'm very close to finalising the schematic on paper - many pages. I haven't decided on which schematic software package to use, either Eagleor ExpressPCB. Anyone care to input here, for someone with no schematic experience? Thanks.

I'm keeping it simple! The only extension to the design I will do at this stage is to add an LCD, partly for diagnostic purposes and partly become it will look cool.

I also plan to run this SBC as fast as it is able. My strategy is to upgrade incrementally, first with a 1MHz osc, then 4MHz, 6MHz, 10Mhz. 14MHz. And at each increment, I will review and diagnose the circuit making the required speed-related changes appropriately. In anticipation of this, I'm buying 70ns memory chips (if I remember the speed correctly). I recognise it will take more than just fast components to run it at the top end speed. One step at a time :)

Sean wrote:
Anyhow, just introducing myself. Thanks to everybody who's been contributing to the discussions here. I've found the past couple weeks of reading here very educational. I've been taking lots of notes.
If it wasn't for this community, my SBC would only be a dream. Thanks all! So far I'm a month in, and it's taken over most of my spare time. Coffee helps, it's been a ride :)

_________________
Greetings Professor Falken.


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 16, 2021 8:27 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8545
Location: Southern California
Firefox6502 wrote:
I haven't decided on which schematic software package to use, either Eagleor ExpressPCB. Anyone care to input here, for someone with no schematic experience? Thanks.

The last I heard about ExpressPCB (which was a couple of years ago), they still were not taking industry-standard gerber files. They require that you use their own free CAD which does not produce the files other board houses accept. IOW, if you do a board with them, and then ever want to have a different board house make it, you have to lay it out again on another CAD, or pay for software that can make the conversion. If you end up having to use another CAD later anyway, I think it would be better to not have to learn two different ones. Proficiency keeps increasing with experience with one.

Wikipedia has a brief comparison of a long list of CADs, many of them free, at https://en.wikipedia.org/wiki/Compariso ... A_software. See also http://pcbshopper.com/cad/ for some info and reviews on free PCB CAD. (This is from chapter 13 of the 6502 primer.)

Quote:
I also plan to run this SBC as fast as it is able. My strategy is to upgrade incrementally, first with a 1MHz osc, then 4MHz, 6MHz, 10Mhz. 14MHz. And at each increment, I will review and diagnose the circuit making the required speed-related changes appropriately. In anticipation of this, I'm buying 70ns memory chips (if I remember the speed correctly). I recognise it will take more than just fast components to run it at the top end speed. One step at a time :)

70ns is pretty slow these days, and is definitely not suitable for 14MHz. This is addressed in chapter 5 of the 6502 primer. See Jeff's excellent animated to-scale timing diagrams which help visualize timing margins, at viewtopic.php?f=4&t=2909, and much more on his own website at https://laughtonelectronics.com/Arcana/ ... iming.html .

_________________
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  
PostPosted: Tue Feb 16, 2021 2:23 pm 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1385
ExpressPCB does offer Gerber Files. Can't remember when that started, but when you place an initial order, there's a check-box for getting the Gerber Files. So... you do need place your initial order for PCBs with them, but you'll get the Gerbers and can then use any PCB house for future boards. The last two PCBs I did with ExpressPCB I requested the Gerbers and they appear fine... loaded them to JLPCB and they rendered on-screen without issue.

Granted, that initial order is expensive... but their PCBs are high quality. I also have a pretty large collection of custom components I've created over the past 7 years, so that does tend to tie me in a bit... as I don't really want to re-create them in another software package.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 16, 2021 2:29 pm 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1488
Location: Scotland
Firefox6502 wrote:
oftware package to use, either Eagleor ExpressPCB. Anyone care to input here, for someone with no schematic experience? Thanks.


I use Fritzing.

I do not recommend you use it - it's old (now) and has had little development in recent years. It's also limited to double sided. If you want a free (open source) package that runs under several systems, then do look at KiCAD.

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 16, 2021 6:44 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8509
Location: Midwestern USA
floobydust wrote:
ExpressPCB does offer Gerber Files. Can't remember when that started, but when you place an initial order, there's a check-box for getting the Gerber Files. So... you do need place your initial order for PCBs with them, but you'll get the Gerbers and can then use any PCB house for future boards. The last two PCBs I did with ExpressPCB I requested the Gerbers and they appear fine... loaded them to JLPCB and they rendered on-screen without issue.

I have a standing offer to convert anyone's ExpressPCB board layout to Gerbers. Just contact me via PM with the EPCB board file attached to get it converted. I have not ordered anything through EPCB since 2014, which is when I gained the ability to convert EPCB layouts to Gerbers.

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


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 16, 2021 8:45 pm 
Offline

Joined: Mon Feb 15, 2021 2:11 am
Posts: 100
floobydust wrote:
In addition to a welcome, etc., I'll just add my $0.02 on obtaining hardware. Granted, I've no issue with anyone turning a bit of this stuff into a business, and Ben has gotten some good exposure with his videos. Having said that, it seems that a lot of folks who buy his kit end up here asking questions, trying to solve issues they've encountered, etc. I'd also say the (6502) kit is limited in what you get and would recommend a different path. Also realize you still need a power supply and a way to program the EEPROM, so you still have to go shopping elsewhere.


Buying the kit is as much a way of saying thanks as it is of getting the basic parts, and does make it easy to follow along with the videos as a very basic starting point. I know I could save a few bucks off the kit price buying the CPU, VIA, ROM, RAM, etc. separately online from a supplier like Mouser or Digi-Key.

Quote:
I typically use Mouser... and for anyone getting started with a 65XX project, I too would recommend starting with the W65C02. In any case, for a bit more than the kit, you can purchase a decent breadboard, more chips, caps, etc., with a power supply and be able to build beyond the confines of the kit quickly and easily. Here's a basic list of things you should get:


Thanks for the suggestions.


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 16, 2021 8:51 pm 
Offline

Joined: Mon Feb 15, 2021 2:11 am
Posts: 100
BigDumbDinosaur wrote:
Sean wrote:
Hi, I'm Sean, and I plan to build a 65XX-based computer.

Welcome!

A piece of advice I always offer to someone who is wanting to build their first 65xx contraption is to start out simple. The more features you add the greater the likelihood the unit will be DOA and thus the greater the likelihood you will become discouraged. The beauty of the 65xx architecture is it doesn't take a lot of hardware to make a functioning unit. A suitable clock source, basic logic gates, a UART and a 65C22, along with some RAM and ROM, will get you going. Also, consulting Garth's 6502 primer is invaluable in laying out your design and anticipating problem areas.



Thanks. I am planning to start of with a slow clock, on breadboard, with the absolute minimum of parts.

Quote:
My opinion is you should not consider the 65C265. While WDC's processors are excellent products, their microcontrollers leave something to be desired.


Thank you for the recommendation.

Quote:
A 65C816 design can be made fairly simple if you elect as part of your first effort to forego use of extended RAM (i.e., RAM beyond 64KB). That way you don't have to worry about decoding the A16-A21 address bits, which reduces your design's glue logic complexity. My POC V1 units were built that way and work well—POC V1.2 runs at 20 MHz.


I think I will avoid the full 16 MB address space at first, but I do aspire to access it eventually.

Quote:
Naturally, you will need to write some code for your machine. There is a variety of editors and assemblers available, the choice depending on the operating environment you prefer. Although I am a UNIX knuckle-dragger from long ago (over 40 years), I do my 65C816 development in the Kowalski simulator, which runs on Billy-ware. Thanks to 8BIT's hard work, the simulator's assembler can assemble programs written specifically for the 65C816 running in native mode. Object code can be save as binary, Intel hex or Motorola S-records.


When it comes time to write and test actual 65C816 code that sounds like it could be very useful.

Quote:
Anyhow, if you have questions don't be shy about asking. We're never shy about offering advice and opinions. :D


Thanks.


Top
 Profile  
Reply with quote  
PostPosted: Wed Feb 17, 2021 12:48 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8509
Location: Midwestern USA
Sean wrote:
BigDumbDinosaur wrote:
...I do my 65C816 development in the Kowalski simulator, which runs on Billy-ware...

When it comes time to write and test actual 65C816 code that sounds like it could be very useful.

It's also useful for writing and simulating 65C02 code, as the assembler and simulation environment natively support the Rockwell version of the 65C02. 8BIT's improvements added assembler support for the WDC 65C02. Although I develop for the 816, I do periodically simulate algorithms in 65C02 mode to verify my logic.

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

All times are UTC


Who is online

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