Text display for 6502 based projects.
Text display for 6502 based projects.
Hello everybody,
I'm a total newbie to the world of 6502 based computers, and I have a very simple question that you probably already received a lot, but I can't find a definitive answer.
I'm looking forward to starting a small project on the 6502. I know that is extremely soon to talk about display/graphics, since I've never even touched a 6502 yet, but I would like to understand what can be done and what I could achieve in time when it comes to text display on a screen for a homebrew computer.
Looking on the net and on this forum I think I've narrowed the problem of showing text with modern VGA screens to the fact that those monitors require high frequency signals, around 25MHz, to operate. I believe that the solutions I've found to overcome such problem are basically:
- using a sufficiently fast microcontroller to handle the video control part;
- using off the shelf serial-to-VGA adapters;
- using smaller "smart" LCDs, being limited to, I believe, around 4 lines of text.
I'm not looking for complex colour graphics, and I think I would be more than satisfied with a monocrome text-only solution. What really bugs me is the idea of building a homebrew 6502 computer, and then using a far more powerful microcontroller just to control the display.
Is there any alternative to that?
Thank you for your kind help.
Cheers,
Davide
I'm a total newbie to the world of 6502 based computers, and I have a very simple question that you probably already received a lot, but I can't find a definitive answer.
I'm looking forward to starting a small project on the 6502. I know that is extremely soon to talk about display/graphics, since I've never even touched a 6502 yet, but I would like to understand what can be done and what I could achieve in time when it comes to text display on a screen for a homebrew computer.
Looking on the net and on this forum I think I've narrowed the problem of showing text with modern VGA screens to the fact that those monitors require high frequency signals, around 25MHz, to operate. I believe that the solutions I've found to overcome such problem are basically:
- using a sufficiently fast microcontroller to handle the video control part;
- using off the shelf serial-to-VGA adapters;
- using smaller "smart" LCDs, being limited to, I believe, around 4 lines of text.
I'm not looking for complex colour graphics, and I think I would be more than satisfied with a monocrome text-only solution. What really bugs me is the idea of building a homebrew 6502 computer, and then using a far more powerful microcontroller just to control the display.
Is there any alternative to that?
Thank you for your kind help.
Cheers,
Davide
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: Text display for 6502 based projects.
The 6502 primer's chapter 15 is on displays:
http://wilsonminesco.com/6502primer/displays.html
(Do go through the whole primer though. It's organized in logical steps, so skipping around may not be very appropriate.)
http://wilsonminesco.com/6502primer/displays.html
(Do go through the whole primer though. It's organized in logical steps, so skipping around may not be very appropriate.)
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?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
Re: Text display for 6502 based projects.
Pax_1601 wrote:
What really bugs me is the idea of building a homebrew 6502 computer, and then using a far more powerful microcontroller just to control the display.
- TV Typewriter Cookbook
- the Cheap Video Cookbook, and
- Son of Cheap Video (!)
cheers,
Jeff
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
https://laughtonelectronics.com/Arcana/ ... mmary.html
Re: Text display for 6502 based projects.
GARTHWILSON wrote:
The 6502 primer's chapter 15 is on displays:
http://wilsonminesco.com/6502primer/displays.html
(Do go through the whole primer though. It's organized in logical steps, so skipping around may not be very appropriate.)
http://wilsonminesco.com/6502primer/displays.html
(Do go through the whole primer though. It's organized in logical steps, so skipping around may not be very appropriate.)
Dr Jefyll wrote:
Pax_1601 wrote:
What really bugs me is the idea of building a homebrew 6502 computer, and then using a far more powerful microcontroller just to control the display.
- TV Typewriter Cookbook
- the Cheap Video Cookbook, and
- Son of Cheap Video (!)
cheers,
Jeff
Thank you, and please pardon my ignorance
Davide
Re: Text display for 6502 based projects.
Pax_1601 wrote:
Just to be clear, since as I stated I'm a total newbie: your "Cheap Video" solution allows to produce a video output in the form of composite video signal? Is composite still viable on modern TVs?
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
https://laughtonelectronics.com/Arcana/ ... mmary.html
Re: Text display for 6502 based projects.
Dr Jefyll wrote:
Pax_1601 wrote:
Just to be clear, since as I stated I'm a total newbie: your "Cheap Video" solution allows to produce a video output in the form of composite video signal? Is composite still viable on modern TVs?
Davide
Re: Text display for 6502 based projects.
Quote:
Cheap Video could be reworked for use on a VGA display (CRT or LCD), although the books (written decades ago) don't cover this.
Re: Text display for 6502 based projects.
If you want to drive the pixels yourself, then I certainly second the previous recommendations on the Don Lancaster books. I own several of his books and I think I have all of the cheap video series.
I'd like to throw out a few more options too. Don't dismiss microcontrollers completely. There are many examples of using a PIC to generate video. That's how I did it the first time. Using a 20 MHz PIC is not completely out of line.
Another microcontroller to use would be the Propeller from Parallax. I use them all the time. They are pretty fast (80 MHz with 8 cores) but they are SIMPLE to use. And the amount of support hardware is very minimal. They can easily produce B/W NTSC or even 64 color VGA.
Finally, take a look at this project. The L-Star. I have one and it's awesome. It's a minimal 65C02 computer with B/W NTSC video and PS2 keyboard. It emulates the Apple 1 (and others) very well.
https://github.com/jacgoudsmit/L-Star
I'd like to throw out a few more options too. Don't dismiss microcontrollers completely. There are many examples of using a PIC to generate video. That's how I did it the first time. Using a 20 MHz PIC is not completely out of line.
Another microcontroller to use would be the Propeller from Parallax. I use them all the time. They are pretty fast (80 MHz with 8 cores) but they are SIMPLE to use. And the amount of support hardware is very minimal. They can easily produce B/W NTSC or even 64 color VGA.
Finally, take a look at this project. The L-Star. I have one and it's awesome. It's a minimal 65C02 computer with B/W NTSC video and PS2 keyboard. It emulates the Apple 1 (and others) very well.
https://github.com/jacgoudsmit/L-Star
Cat; the other white meat.
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: Text display for 6502 based projects.
You could also take a look at Geoff Graham's VT100 terminal on a microcontroller. The MCU can be integrated into your design to supply a "conversational" text display via VGA. The MCU includes an interface to a standard PC-AT keyboard.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: Text display for 6502 based projects.
Here's my two cents on simple video, having done it several ways myself.
Composite b/w text
Do the Don Lancaster "cheap video" method. It will work if you don't mind the extra board space.
Use a microcontroller - 1 or two chips and a few parts - here's the one I did -> http://sbc.rictor.org/vid2c.html
Composite Color graphics & text
I used the phase 1 DMA method to create a 320x200 x8bit color display using a CPLD to take care of the timing and addressing on my SBC-3 here -> http://sbc.rictor.org/info3.html
In my opinion, going much larger in resolution will require too much of the 6502 system to be really useful.
VGA
I tried one of those smart modules that provide a serial interface and all of the routines you need to be productive. For a small SBC, they would be great. I'm not sure of their current price range. The one I have is not made anymore. -> http://old.4dsystems.com.au/prod.php?id=213
There's a simple composite video to VGA converter out there - I have not tried it, but at $13, might be worth looking into.
https://www.amazon.com/Composite-S-Vide ... B003NUN7DG
HDMI
I have not actually put this into operation, but I played a little with the Raspberry Pi and it would be pretty easy to write a simple serial interface with command-driven operations similar to the VGA boards above, to drive an HDMI output in full color. At $25, the Pi is a worthy option (in my opinion).
Composite b/w text
Do the Don Lancaster "cheap video" method. It will work if you don't mind the extra board space.
Use a microcontroller - 1 or two chips and a few parts - here's the one I did -> http://sbc.rictor.org/vid2c.html
Composite Color graphics & text
I used the phase 1 DMA method to create a 320x200 x8bit color display using a CPLD to take care of the timing and addressing on my SBC-3 here -> http://sbc.rictor.org/info3.html
In my opinion, going much larger in resolution will require too much of the 6502 system to be really useful.
VGA
I tried one of those smart modules that provide a serial interface and all of the routines you need to be productive. For a small SBC, they would be great. I'm not sure of their current price range. The one I have is not made anymore. -> http://old.4dsystems.com.au/prod.php?id=213
There's a simple composite video to VGA converter out there - I have not tried it, but at $13, might be worth looking into.
https://www.amazon.com/Composite-S-Vide ... B003NUN7DG
HDMI
I have not actually put this into operation, but I played a little with the Raspberry Pi and it would be pretty easy to write a simple serial interface with command-driven operations similar to the VGA boards above, to drive an HDMI output in full color. At $25, the Pi is a worthy option (in my opinion).
Please visit my website -> https://sbc.rictor.org/
Re: Text display for 6502 based projects.
8BIT wrote:
Here's my two cents on simple video, having done it several ways myself.
Composite b/w text
Do the Don Lancaster "cheap video" method. It will work if you don't mind the extra board space.
Use a microcontroller - 1 or two chips and a few parts - here's the one I did -> http://sbc.rictor.org/vid2c.html
Composite b/w text
Do the Don Lancaster "cheap video" method. It will work if you don't mind the extra board space.
Use a microcontroller - 1 or two chips and a few parts - here's the one I did -> http://sbc.rictor.org/vid2c.html
Do you believe that the original, "microprocessor-less" approach by Don Lancaster, is possible too? I've found this link on the web for a TVT6 video typewriter: http://www.tinaja.com/glib/pop_elec/tvt ... 2_7_77.pdf
I perfectly understand that the resolution and sharpness of such circuit would be very low, but I'm not looking for performance in any case
Cheers,
Davide
Re: Text display for 6502 based projects.
cbmeeks wrote:
If you want to drive the pixels yourself, then I certainly second the previous recommendations on the Don Lancaster books. I own several of his books and I think I have all of the cheap video series.
I'd like to throw out a few more options too. Don't dismiss microcontrollers completely. There are many examples of using a PIC to generate video. That's how I did it the first time. Using a 20 MHz PIC is not completely out of line.
Another microcontroller to use would be the Propeller from Parallax. I use them all the time. They are pretty fast (80 MHz with 8 cores) but they are SIMPLE to use. And the amount of support hardware is very minimal. They can easily produce B/W NTSC or even 64 color VGA.
Finally, take a look at this project. The L-Star. I have one and it's awesome. It's a minimal 65C02 computer with B/W NTSC video and PS2 keyboard. It emulates the Apple 1 (and others) very well.
https://github.com/jacgoudsmit/L-Star
I'd like to throw out a few more options too. Don't dismiss microcontrollers completely. There are many examples of using a PIC to generate video. That's how I did it the first time. Using a 20 MHz PIC is not completely out of line.
Another microcontroller to use would be the Propeller from Parallax. I use them all the time. They are pretty fast (80 MHz with 8 cores) but they are SIMPLE to use. And the amount of support hardware is very minimal. They can easily produce B/W NTSC or even 64 color VGA.
Finally, take a look at this project. The L-Star. I have one and it's awesome. It's a minimal 65C02 computer with B/W NTSC video and PS2 keyboard. It emulates the Apple 1 (and others) very well.
https://github.com/jacgoudsmit/L-Star
BigDumbDinosaur wrote:
You could also take a look at Geoff Graham's VT100 terminal on a microcontroller. The MCU can be integrated into your design to supply a "conversational" text display via VGA. The MCU includes an interface to a standard PC-AT keyboard.
Cheers,
Davide
Re: Text display for 6502 based projects.
Pax_1601 wrote:
Do you believe that the original, "microprocessor-less" approach by Don Lancaster, is possible too? I've found this link on the web for a TVT6 video typewriter: http://www.tinaja.com/glib/pop_elec/tvt ... 2_7_77.pdf
I perfectly understand that the resolution and sharpness of such circuit would be very low, but I'm not looking for performance in any case
I've never been working on this kind of "old school" circuits and I would really like to try at least once. Then, if I see that the resolution is simply too low, I will switch to a better solution.
Cheers,
Davide
I perfectly understand that the resolution and sharpness of such circuit would be very low, but I'm not looking for performance in any case
Cheers,
Davide
If I were to do it, I'd want the video system to drive itself, similar to how the Apple ][ did, so 100% of the processor time is available. My SBC-3 was loosely based on that. I just chose to package the whole thing into a programmable logic chip vs. using 10-15 discrete 74 series chips. Since the 65 series chips do not use the first half cycle for memory access, that is the perfect way to multiplex your main RAM with your video system. You only have to use the right system clock and ensure your memory has a fast enough access time to support two half cycle accesses.
I hope that helped.
Daryl
Please visit my website -> https://sbc.rictor.org/
Re: Text display for 6502 based projects.
You might want to consider using a TMS9918a. During the 80's it was used in the TI 99/4a, the MSX computers, and the ColecoVision games console. So there are a ton available as new old stock and used system pulls on eBay. It requires its own RAM, and although it is designed to use dynamic RAM, some latches allow it to be used with static RAM. This is good because you can do bit mapped graphics without the frame buffer consuming the CPU's RAM. The Retrobrew computers wiki has some information on it's use, but I don't have the links right now.
I plan to use one for my next project, so I've been researching how to use it, and programatically they're simply to use. You memory map the TMS9918a into the 6502's address space. This gives the 6502 access to a register for the address bus of the TMS9918a's RAM. You can then write a byte to this address, and the address register auto-increments. for the next byte. If you don't want to use bit mapped graphics it supports text mode.
Given that they're late '70s technology they're designed with over-scan in mind, so the display is only 256x192 pixels in bit mapped mode. They can do 40x24 characters in character mode.
I plan to use one for my next project, so I've been researching how to use it, and programatically they're simply to use. You memory map the TMS9918a into the 6502's address space. This gives the 6502 access to a register for the address bus of the TMS9918a's RAM. You can then write a byte to this address, and the address register auto-increments. for the next byte. If you don't want to use bit mapped graphics it supports text mode.
Given that they're late '70s technology they're designed with over-scan in mind, so the display is only 256x192 pixels in bit mapped mode. They can do 40x24 characters in character mode.
Re: Text display for 6502 based projects.
Martin beat me to the punch.
I was also going to mention the TMS9918 as another option.
I was also going to mention the TMS9918 as another option.
Cat; the other white meat.