26 Replies Latest reply on May 4, 2020 2:00 AM by atlantisweb

    6502 Video Out

      Hello,

      I've been working on a 6502 SBC recently, and I wanted it to output to a composite video signal. I looked around the internet and didn't find much of anything. Anyone know a way I can do this?

        • Re: 6502 Video Out
          shabaz

          Hi Nick,

           

          Generally the 6502 can't do that, it cannot generate a 6MHz signal on its own with the right timings and content (there may be some hacks I'm sure that might obtain a low-res image onto a display however, through clever coding in assembler etc). Usually the old home computers used separate ICs and sometimes custom logic for that, but of course they are not manufactured nowadays. You could look at old home computer schematics and hope to find the parts on e-bay. Or you could use slightly more modern parts to create a video encoder (Analog Devices has some parts) but you still need a way of getting data from memory to the encoder, and that entails using a CPLD or FPGA usually.

          Basically times have moved on, and if you just want to display very simple information to a screen then you might want to consider (say) LCD displays with in-built memory and a simplified interface. If you're trying to recreate a vintage computer then you may need to consider programmable logic.

          5 of 5 people found this helpful
          • Re: 6502 Video Out
            clem57

            Might check out http://www.6502.org/homebuilt Bet someone has way to output.

            Clem

            1 of 1 people found this helpful
            • Re: 6502 Video Out
              clem57

              Saw this Retro Computing – Page 6502 – About small SBC systems which reminded me of the KIM-1. We never output to video, but did write data to a serial teletype. They were only 4K memory of which 1/2 was dedicated to a simple OS.

              Clem

              3 of 3 people found this helpful
              • Re: 6502 Video Out
                DAB

                Hi Nick,

                 

                As I recall, the Commodore PET that I have used a batch of memory to hold the video data.

                All you need is a couple of counter chips to run through the addresses of the RAM chips.

                You take the digital output and run it into a transistor with a couple of capacitors and resisters to create the analog out, synchronize the Horizontal and vertical sync waveforms and you have video output.

                 

                Back in the OLD days we used this approach for all types of microprocessors.

                Later, people came out with digital to video out chips.

                 

                Plus you always have the option of hacking an old PC video card.  Most of them allowed you to load digital information into the onboard ram and the card took care of the sync.

                 

                DAB

                6 of 6 people found this helpful
                • Re: 6502 Video Out
                  michaelkellett

                  If you want to remain "classic" you would need to use a video controller MC6845 or perhaps 6569:

                   

                   

                  MOS 6569R3 C64 VIC-II PAL chip, Mutant Caterpillar Games Ltd Retro Store

                   

                  Google for the 6845 data sheet which is useful for understanding how these things work. You'll probably end up with a lot of glue logic as well.

                   

                  What's the point/aim ?

                   

                  You can replicate all this stuff in an FPGA (including the 6502) and it will crank at 10x the original speed as well - if you want to run old software this may be better route.

                   

                  MK

                  4 of 4 people found this helpful
                  • Re: 6502 Video Out
                    dougw

                    I interfaced an MC6847 to a 6502 way back in the day. I think I still have the wire-wrapped display card I built for my AIM65.

                    This was one of the simplest ways to implement a video display back then, probably still is.

                    These chips are still available on the net.

                    1 of 1 people found this helpful
                    • Re: 6502 Video Out
                      texadactyl

                      nick123 Which product are you working with? What are you building?

                       

                      A resource for 65xx development: Western Design Center (WDC) Home of 65xx Microprocessor Technology

                       

                      As with the question from michaelkellett  I am also curious why you are going with such an old chip (brought back a lot of old memories).  My old company (Datapoint of San Antonio TX USA) in the 1970s abandoned the 6502 for the Zilog Z80 which was a leap over both the 6502 & 8080 in many ways back then - but all 3 limited to 64K RAM back then without mapping tricks.

                      1 of 1 people found this helpful
                      • Re: 6502 Video Out
                        technos

                        Even though this has been answered, I wanted to add a better answer that will lead the parent (or others) in the right direction.

                         

                        The definitive must read books on how to generate a composite video out from a 6502 (or any microprocessor from that era or since) are "The TV Typewriter cookbook", "The Cheap Video Cookbook", and "The Son of Cheap Video Cookbook".

                        They are all written by the hacker emeritus before there were hackers Don Lancaster. I am sure by understanding the methods there that they can be transposed to modern day designs (if you search for implementing a composite video output).

                         

                        Where other posters in this thread have said "it can't be done" "because timings" the fact is that Don Lancaster showed that it could indeed be done with a few amazing and simple hacks.

                        1 of 1 people found this helpful
                          • Re: 6502 Video Out
                            dougw

                            Good point Phil - I am sure I still have "The Cheap Video Cookbook".....somewhere.

                            1 of 1 people found this helpful
                            • Re: 6502 Video Out
                              jameslhorn

                              I also recommend Lancaster's books. They will give you a good understanding on how video output was created in the '70s and '80s. I used his "cheap video" on a KIM-1 before moving on to a SSM (Solid State Music) S-100 board for simple alphanumeric display, then later, a Hal Chamberlain 32k graphics S-100 board for the then-boosted KIM-1 (48k RAM, text and graphics video, a dozen S-100 slots, 400+ watt power supply, etc.).

                              Be aware that Lancaster's Cheap Video uses CPU timing to generate the video, which means that while doing so, the CPU doesn't have any cycles to run other software. The Sinclair ZX80 used the same trick. The result was a display that would flicker when typing and blank momentarily when running a program, but would reappear once the program paused or finished. All of which allowed video generation with only a few cheap DIP ICs. Not bad at all!


                              2 of 2 people found this helpful
                                • Re: 6502 Video Out
                                  gdstew

                                  Actually there is time to do processing during vertical blanking, around 2.86 milliseconds at the end of each 30 millisecond frame for 525 line NTSC video.

                                  You might be able to squeeze in a few cycles during horizontal blanking also but there are only about 10 microseconds at the end of each of the 525 lines

                                  for two 30 milisecond frames. NTSC is interlaced so it takes two 30 millisecond frames for 525 lines.

                                   

                                  Don Lancaster was one of the greats in early hobbyist electronics. I was a big fan of his during late 60's and 70's when he wrote many articles for

                                  Radio Electronics and Popular Electronics magazines.

                                  2 of 2 people found this helpful
                                    • Re: 6502 Video Out
                                      shabaz

                                      I'd not heard much of Don Lancaster in the UK unfortunately, the magazines available here were more locally produced, but I remember seeing his Guru's Lair website at uni and finding it intriguing! I didn't really understand it at the time though. Perhaps it was amongst the first electronics sites on the WWW, at least it was the only one that stood out with substantial content when 'surfing the net'.

                                      1 of 1 people found this helpful
                                • Re: 6502 Video Out
                                  dougw

                                  I built a composite video display for my 6502 (AIM 65) based on an MC6847.

                                  I think I still have it.

                                  These chips still seem to be available for less than $10.

                                  1 of 1 people found this helpful