# Composite/RGB Video from simple hardware

I'm designing a 68000-based VGM player, and I'd like it to output some sort of 'visualization' of the currently playing song to a TV through either RGB or Composite (video encoder probably for that.) I'm thinking of using this system to display video (and running the sync and RGB through a composite encoder instead of VGA) and then just taking the RAM onto my main CPU as needed, but that just seems horrid and from my calculations won't give me much more than 15-20 FPS.

So, I guess the question is this - is there an easy way I can get my 68k to somehow output RGB/composite video to a television? My requirements are relatively low as anything with the resolution of around 240x240 will work, but it needs to get me around 30FPS with my main CPU taking a considerable share of the time writing to the VRAM.

• wouldn't generating composite video be much easier? or using UHF be very cheap and simple. – Piotr Kula Nov 29 '11 at 9:39
• To generate Composite, I need to have my RGB, H and VSync in the first place and then feed it into a Composite Video encoder chip, which I could then feed into an RF transmitter... thingy. – Tristan Seifert Dec 2 '11 at 4:38
• You don't have to transmit UHF... you can just use the tv aerial cable and tune the tv to your signal. I never done this but read you can do it using some prebuilt UHF tuners. – Piotr Kula Dec 2 '11 at 10:40
• Well yes, that's what I meant, I just sorta forgot the word. It's essentially what many older game consoles do. (And make extremely crappy picture from all that encoding, too... oh, how I love 80's technology =P) – Tristan Seifert Dec 2 '11 at 14:53
• I suppose if you going to target tv's larger than 32" then UHF is not a good idea.. but yea.. you reminded me of mario bros. that werent to bad resolution.. i think hehe – Piotr Kula Dec 2 '11 at 16:02

Stop press: Added last. I just had a good look at the AVR hardware based VGA Generator that you posted. They start with a simple version and work up over 16 pages. If you used the 68000 as the processor it would take lot of resource. But, if you used an AVR dedicated to he task and added a simple serial link from the 68000 then this solution is potentially very good. 3 ICs to give flicker free update display on a VGA moniotr is respectable.

circuit diagram of final version here

You could follow the light side and try some of the ideas at the end under 'light side", BUT I suspect that finding some nice modern module with VGA capability and talking to it with serial coms of some sort will be MUCH less painful.

EXAMPLE ONLY - there will be many more such:

Sparkfun say $US55/1 for • Description: The µVGA-II(SGC) is a compact & cost effective drop in embedded graphics engine that will deliver stand-alone functionality to your project. The simple to use embedded commands not only control background color but can produce text in a variety of sizes as well as draw shapes in 256 colors while freeing up the host processor from processor hungry screen control functions. This means a simple micro-controller with a standard serial interface can drive the module with ease. Product page Datasheet • Features: • Intelligent and fully integrated VGA/SVGA Display Graphics Controller Tiny 28 pin module, powered by the 4D-Labs PICASO-SGC chip - a powerful DSP/Controller based multi purpose graphics engine 4.0V to 5.5V range operation • Supports RGB 65K true to life colours in QVGA, VGA, WVGA and Custom resolutions. • The µVGA-II(SGC) supports multiple resolutions within the same module. Resolutions are selectable during run time under host control. Resizeable viewing window allows partial/full screen control. 15 pin D-type standard VGA connector to interface to any external VGA monitor. • On-board micro-SD memory card adaptor for multimedia storage and data logging purposes. HC memory card support is also available for cards larger than 4Gb. Easy 5 pin interface to any host device: • VCC, TX, RX, GND, RESET. commands. • Asynchronous hardware serial port, TTL interface, with 300 baud to 256K baud. Powerful, easy to use and understand built in graphics functions allow drawing of lines, rectangles, circles, ellipses, text, images, icons, user defined bitmaps and much more • Future upgrades and enhancements are easily achieved by uploading PmmC (Personality module micro Code) files. PmmC files allow the PICASO chip to be uploaded with the latest micro-Code firmware. System designers can incorporate the µVGA-II(SGC) module directly into their application, saving space and cost. Reference designs enable the user to create a platform to incorporate the µVGA-II(SGC) easily LIGHT SIDE (some will disagree) In the Ye Olde good old days there was the fantastic 6845 and the not so fantastic but colour capable 6847. Verily much water has flowen under the bridge since those days, but a man using a 68000 may find them still of much use. There is no doubt that better and easier has since been created, and some others may as yet tell thereof, but one or other of the above pair between them will do what you want. From memory the 6847 was more set in its ways nad maneed som glue around i to compell it to do as you wish, but such has been done before now. Lo & behold, and with winder I find that my memory served well enough despite the passage of years, and Wikipedia - Motorola 6845 • The Motorola 6845 (commonly MC6845) is a video address generator first introduced by Motorola and used among others in the Videx VideoTerm display cards for the Apple II computers, the MDA and CGA video adapters for the IBM PC, in the Amstrad CPC and the BBC Micro. • Its functionality was duplicated and extended by custom circuits in the EGA and VGA PC video adapters. It is related to the later 6545 manufactured by MOS Technology (Commodore Semiconductor Group) and Rockwell (in two variations) and was cloned as the Hitachi 46505 (which was used in Videx's UltraTerm card). • It is also known as the 6845 CRTC or the CRTC6845, meaning "cathode ray tube controller". Although intended for designs based on the Motorola 6800 CPU and given a related part number, it was more commonly used alongside various other processors. MANY OTHERS + 6845 datasheet Motorola 6847 as above • The MC6847 is a video display generator (VDG) first introduced by Motorola and used in the TRS-80 Color Computer, Dragon 32/64, Laser 200 and Acorn Atom among others. It is a relatively simple display generator compared to other display chips of the time. It is capable of displaying text and graphics contained within a roughly square display matrix 256 pixels wide by 192 lines high. It is capable of displaying 9 colors: black, green, yellow, blue, red, buff (almost-but-not-quite white), cyan, magenta, and orange. The low display resolution is a necessity of using television sets as display monitors. Making the display wider risked cutting off characters due to overscan. Compressing more dots into the display window would easily exceed the resolution of the television and be useless. TI 9918 and friends - some serious power as I recall. • +1 for an extremely in-depth answer! Oh, the good 'ol TMS9918... fun thing is, I was programming a 68000 based console that used a derivative of it just a few days ago. I'll see what I can do, but for now, thanks for the answer! – Tristan Seifert Nov 29 '11 at 15:45 • The 6847, though called a video display generator, was not capable of generating its own addressing. Motorola's app notes suggested using it with the 6883 address generator chip. Certain modes of the 6883 were intended to service certain modes in the 6847, but of course people discovered you could cross-purpose these and get different modes. However, ALL the modes essentially boiled down to a 256x192 raster of pixels. OTOH, the 6845 is essentially just an address generator, and very capable compared to the 6847/6883 system. ALL the video timing in the 6845 is user programmable. – JustJeff Nov 30 '11 at 11:41 The Parallax Propeller CPU can generate either VGA or NTSC/PAL composite video directly without any additional components except some external resistors. The following circuit (adapted from one of their demo boards) shows all of the circuitry required for either VGA or composite video: The chip comes in either a 40-pin DIP or 44-pin QFN/QFP and costs$8 in single quantities.

Here are three demos of the video output:

• Thats easy peasy! and cheap :) – Piotr Kula Dec 2 '11 at 16:03
• Heh, true. There's enough free port pins to interface it directly to the 68k with an 8-bit bus, too. I've needed a good excuse to get into these Propeller chips for a LOOOONG time now. =P – Tristan Seifert Dec 3 '11 at 2:26