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

All times are UTC




Post new topic Reply to topic  [ 33 posts ]  Go to page 1, 2, 3  Next
Author Message
PostPosted: Thu Apr 09, 2020 11:33 pm 
Offline

Joined: Thu Apr 09, 2020 11:21 pm
Posts: 16
Location: Australia
Hi everyone,
I am in the research stage of an ambitious 6502 project I want to try. I am hoping to create a practical home computer that will run BASIC, similar to Grappendorf's 6502 computer but hopefully with working video output. I plan to use an FPGA board for video output. I was also planning to eventually make it battery powered and maybe even make a laptop-style enclosure similar to the TRS-80 Model 200. Withe such an ambitious project, I am really wondering where to start - I'm still in high school, although I have plenty of time at home because of the coronavirus outbreak. So if anyone has any tips on where to start and perhaps some advice on FPGA video development then please reply.

Thanks everyone.


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 10, 2020 12:05 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8546
Location: Southern California
Welcome.

This topic is 16+ years old, but has some good considerations you can start with: "Survey: A 65C02-based PC"

_________________
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: Fri Apr 10, 2020 12:30 am 
Offline

Joined: Thu Apr 09, 2020 11:21 pm
Posts: 16
Location: Australia
GARTHWILSON wrote:
Welcome.

This topic is 16+ years old, but has some good considerations you can start with: "Survey: A 65C02-based PC"

Thanks for the link. I had a look and this is more or less what I am hoping to implement. I want to have BASIC in ROM, but I also want to try other languages like Forth.


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 10, 2020 4:20 am 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
Welcome, dagenius :) Nice to hear you're putting the unexpected extra free time to good use!

Allow me to suggest you begin by building a video-less computer, or at least one where video is an option that can be perfected later. Instead, I suggest you include a UART (or other link) that talks to a host PC acting as a terminal. Compared to video, the UART is quite a lot easier to get working, and you'll have plenty of other challenges to keep you busy. Then you can use the UART to help debug the video.

Just a suggestion. Cheers!

Jeff

_________________
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  
PostPosted: Fri Apr 10, 2020 4:28 am 
Offline

Joined: Thu Apr 09, 2020 11:21 pm
Posts: 16
Location: Australia
Dr Jefyll wrote:
Welcome, dagenius :) Nice to hear you're putting the unexpected extra free time to good use!

Allow me to suggest you begin by building a video-less computer, or at least one where video is an option that can be perfected later. Instead, I suggest you include a UART (or other link) that talks to a host PC acting as a terminal. Compared to video, the UART is quite a lot easier to get working, and you'll have plenty of other challenges to keep you busy. Then later you can use the UART to help debug the video.

Just a suggestion. Cheers!

Jeff

Thanks for the tip. Iwas thinking of doing this to make sure all the other components (RAM, ROM, etc.) are working. Only problem is my laptop doesn't have RS-232, but apparently adapters can solve that.


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 10, 2020 5:07 am 
Offline
User avatar

Joined: Fri Dec 12, 2008 10:40 pm
Posts: 1007
Location: Canada
dagenius wrote:
Thanks for the tip. Iwas thinking of doing this to make sure all the other components (RAM, ROM, etc.) are working. Only problem is my laptop doesn't have RS-232, but apparently adapters can solve that.

Easily enough done with readily available USB to TTL cables sold by many eBay vendors.

I agree with the sentiment of getting the fundamentals working before adding the embellishments - it has the benefit of putting you on firm ground. Actually, most folk stop there. Designing your new system to interact through USB to your PC allows you to maintain a virtually limitless library of software and development tools on your PC without having to develop a file system (both hardware and software) for your project.

Keep asking questions - the folks around here are very experienced, full of nuggets of wisdom and more than willing to share.

BTW, welcome!

Edit: corrected fat-finger errors that were aggravated by auto-correction, or at least I'm sticking to that story .....

_________________
Bill


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 10, 2020 7:08 am 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1488
Location: Scotland
Hello and welcome!

If you do go down the FPGA for video route then I'm sure there are people here who may be interested in a good modern/retro solution for the 6502. I'm sure you've been doing your research, but the issues that I sort of agonised over when making my little system were mostly to go with memory - if you use RAM that the 6502 can directly access then you have timing constraints and screen resolution constraints. And don't get carried away with making a 640x480 (or more) VGA type output because that just needs too much RAM and accessing it from the 6502 will be slower - so there is a compromise. It's probably a good thing that the TV resolutions we had back then fitted into the memory required for graphics - so with 1KB of RAM you can have text and nice colour characters and simple (2x3) block graphics (I'm thinking UK Teletext modes here - although getting the character generator chips may be quite hard now) then it's just a matter of throwing RAM for resolution and colour at the problem. The BBC Micro (UK, c1981) used about 20KB of RAM for it's highest resolution mode but that was just monochrome - 640 x 256. Or the same RAM for a 16 colour display but with just 160x256 resolution.

Other solutions like the TI99/4a used separate video RAM and controller chip, so rather than poking pixels directly into the RAM, you sent commands to it and the chip then poked pixels. The new Commander X16 works like this - they have an FPGA for their VGA video signal with a few bytes of IO for the 6502 to send commands over.

On the serial line front - this is what I use on my system - which doesn't stop me having graphics - I send graphics commands over it to a dedicated terminal program running on my desktop PC. Think of this as a serial version of that FPGA solution above. The BBC Micro did all its graphics this way - the BASIC (or other application) ROM didn't poke pixels, but sent commands to the Operating system either directly via an API or via a high speed parallel interface (The Tube) for 2nd processors.

Good luck - the 6502 is seeing a nice surge of popularity which is no bad thing for a CPU that's almost 45 years old now!

Cheers,

-Gordon

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


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 10, 2020 7:20 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8546
Location: Southern California
Be sure to go through the 6502 primer, about building your own 6502 computer, indexed at http://wilsonminesco.com/6502primer/ . One of the pages is on displays. Note that there are various display options that have their own display memory and produce the VGA signals and all. There are also graphic LCDs with their own display memory and of course they, too, handle their own scanning.

_________________
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: Fri Apr 10, 2020 7:22 am 
Offline

Joined: Thu Apr 09, 2020 11:21 pm
Posts: 16
Location: Australia
drogon wrote:
Hello and welcome!
Other solutions like the TI99/4a used separate video RAM and controller chip, so rather than poking pixels directly into the RAM, you sent commands to it and the chip then poked pixels. The new Commander X16 works like this - they have an FPGA for their VGA video signal with a few bytes of IO for the 6502 to send commands over.


Thanks Gordon. I have been following the Commander X16 project and I am planing to use separate video RAM, likely whatever is built-in on the FPGA.
drogon wrote:
On the serial line front - this is what I use on my system - which doesn't stop me having graphics - I send graphics commands over it to a dedicated terminal program running on my desktop PC. Think of this as a serial version of that FPGA solution above. The BBC Micro did all its graphics this way - the BASIC (or other application) ROM didn't poke pixels, but sent commands to the Operating system either directly via an API or via a high speed parallel interface (The Tube) for 2nd processors.

I have also considered a serial terminal as was suggested by Dr Jefyll, except I decided that if I did this then I might use something like the vt-100 compatible ASCII terminal at http://geoffg.net/terminal.html (thanks GARTHWILSON), which means I could have an independent setup for the computer and not rely on a PC for interfacing.


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 10, 2020 7:43 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8546
Location: Southern California
GARTHWILSON wrote:
Be sure to go through the 6502 primer, about building your own 6502 computer, indexed at http://wilsonminesco.com/6502primer/ . One of the pages is on displays. Note that there are various display options that have their own display memory and produce the VGA signals and all. There are also graphic LCDs with their own display memory and of course they, too, handle their own scanning.

I just went through and made sure all the links in the displays page were good. I had to update a few that had changed. There are lots of links to display products, and several to video tutorials, plus a lot to video topics on this forum.

_________________
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: Fri Apr 10, 2020 11:26 am 
Offline

Joined: Thu Apr 09, 2020 11:21 pm
Posts: 16
Location: Australia
GARTHWILSON wrote:
GARTHWILSON wrote:
Be sure to go through the 6502 primer, about building your own 6502 computer, indexed at http://wilsonminesco.com/6502primer/ . One of the pages is on displays. Note that there are various display options that have their own display memory and produce the VGA signals and all. There are also graphic LCDs with their own display memory and of course they, too, handle their own scanning.

I just went through and made sure all the links in the displays page were good. I had to update a few that had changed. There are lots of links to display products, and several to video tutorials, plus a lot to video topics on this forum.

That was really helpful, thanks. The microvga system looks really good, except for the high price tag, but it has plenty of graphics and sound functionality. I want the computer to potentially be a game machine, so this could be the solution for video.


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 10, 2020 12:24 pm 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1385
I'll add my welcome also, and my $0.02.

In addition to everything else that's been said, I'll 4th or 5th the initial serial connection route. I've been using the FTDI UART-USB adapters for many years. I prefer these as they have drivers for OSX, Windoze and Linux. Many folks have done the same and also opted to power their creation via USB. I've opted not to use USB for power. My reason is simple, I prefer a separate power supply as I can easily disconnect the SBC from the USB port on my laptop and let it continue running. It's also nice in case you have an accidental connection issue. Here's once I've been using, albeit on the pricey side (it's a DB9 housing):

https://www.mouser.com/ProductDetail/FT ... yVDNan4%3D

Parts selection and sourcing becomes another area I would make stronger recommendations in. We've (forum in general) had numerous folks that have already sourced 6502 related parts from sketchy sources before finding 6502.org, only to realize that the might have gotten a counterfeit part or one that wasn't exactly what they thought it was. So my personal recommendation is to source a new WDC W65C02S CPU and buy new memory and logic chips from a current supplier like Mouser. Many folks out here have their "go to" sources for many different parts, but if you're new to this hardware area, stick with current new production parts and save yourself a lot of time and hassle.

For a UART, the current WDC W65C51N has a bug, so I wouldn't recommend using it. The current view is to use one of the NXP UARTs or DUARTs which are readily available and easily interfaced to a 65C02. I've used the SCC2691 in my recent SBC and BDD has written a nice document on getting the newer NXP DUARTs to work, so that's worth reading as well.

Lastly (for now), I would recommend looking at some others' existing projects. This will give you some perspective on hardware design and also some software to make them work. I'd also consider a small PLD (like a 22V10 GAL) for a single glue logic, albeit perhaps wait for a second breadboard version. I'd also recommend getting a breadboard machine running first... then once you're happy with it, consider making a PCB for it.

In all cases... focus on having fun while doing this!

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


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 10, 2020 3:40 pm 
Offline
User avatar

Joined: Sun Oct 13, 2013 2:58 pm
Posts: 491
Location: Switzerland
I don't know your background, but in case this is your first PC you are building I would recommend that you use an existing design. Grant Searle has a very nice collection of basic 8-bit PCs with various processors http://www.searle.wales. When I say basic, it just refers to the minimal required hardware. But there is also software available, in case of the 6502 project there is BASIC and for the Z80 there is even CP/M available.

As for the serial interface, Proxy started to build a 6502 system as well and he is using a FT240X. This is a very nice alternative to a serial interface and avoids the bug of the WD65C51.

However if you are really in FPGAs you could as well build your 6502 system using just the FPGA, then again Grant has it as well.

Peter


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 10, 2020 3:42 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8513
Location: Midwestern USA
6502 PC - where to start? :)

That's easily answered. Start simple. My advice to anyone starting out in the 6502 homebrew hobby is to learn how to fly a Piper Cub before stepping into the cockpit of a 747.

As others have advised, you should scale back your aspirations and build a basic machine with a TIA-232 link to a PC acting as a terminal. Such a design will be much easier to debug, as serial I/O is relatively straightforward. Video generation, on the other hand, is fraught with timing "gotchas" and other things that can trip up the beginner. If hardware flaws in your machine prevent it from displaying a picture and/or accepting keyboard input, you are going to have an extremely rough time debugging.

There are a number of good reference designs you should examine and perhaps implement. The first stop I'd recommend is at Garth's 6502 primer, in which he elucidates on the nuts-and-bolts of a functioning 6502 system. Working from his presentation, you will gain some understanding of the 6502's bus cycle, how to clock the thing, how to attach peripherals, etc. This would be the equivalent of learning to fly a Piper Cub.

After you've built a functional basic unit you can start to explore a more complex design and eventually take off in that 747. Meanwhile, enjoy yourself and welcome to 6502-land.

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


Last edited by BigDumbDinosaur on Fri Apr 10, 2020 3:54 pm, edited 2 times in total.

Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 10, 2020 3:47 pm 
Offline
User avatar

Joined: Fri Dec 12, 2008 10:40 pm
Posts: 1007
Location: Canada
dagenius wrote:
... which means I could have an independent setup for the computer and not rely on a PC for interfacing.


Then there will be the issue of having to provide some sort of storage for programs, or be forced to type them in each time. Using a PC as the terminal allows you to store programs on the PC. Just a thought.

_________________
Bill


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: No registered users and 21 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: