Multiple VGA
davidsaunders
Posts: 1,559
I am working on implementing a single Propeller UXGA VGA driver, that supports at least 12BPP, and hopefully 15BPP, using as few cogs as possible.
This thread began as a simple question, about parallel cogs working on the same video output as I have only been using the Propeller for about 5 to 6 weeks.
So far it looks like 12BPP will require 4 COGS in order to not be restricted by the palette. Any suggestions on how to get around this limit are welcome. This could be done in two COGS, but that would leave the pallet limit at 8 colors for each 16 pixals.
The code, and schematic will be released under a MIT license, once it is fully working and the HSync and VSync look clean on my scope (as some monitors have trouble with noise in the Sync). Maybe I should also scope the kitchen Sync to make sure it is clean .
This thread began as a simple question, about parallel cogs working on the same video output as I have only been using the Propeller for about 5 to 6 weeks.
So far it looks like 12BPP will require 4 COGS in order to not be restricted by the palette. Any suggestions on how to get around this limit are welcome. This could be done in two COGS, but that would leave the pallet limit at 8 colors for each 16 pixals.
The code, and schematic will be released under a MIT license, once it is fully working and the HSync and VSync look clean on my scope (as some monitors have trouble with noise in the Sync). Maybe I should also scope the kitchen Sync to make sure it is clean .
Comments
Here is a solution, and it turns out that using 'Gray code'
so only one bit is the differnence from old and new value completes the final stage.
http://www.linusakesson.net/programming/propeller/pllsync.php
I do still ask can I output the R,G,B components separately from different cogs on the same 8 pins?
It is possible to sync two or more cogs so several video generators work together. You can't do this with TV output because of the way the color subcarrier is produced, but VGA just involves shifting 8 bit values out
If you are a beginner to the prop, start with something simpler .
No one have really made a 9bit vga driver for the prop, though it propbably could be done.
Where are you gone store the larger bitmap?, the prop only have 32k of ram.
Most external ram solution is to slow to help you, or uses so many pins that you have not 11pins left over
for your vga driver as you would need to create your own triple D/A using 3pins for each color.
As for where to store the bitmap, What bitmap? This is for graphics created on the fly (using the remaining Cogs) from some simple GEM VDI style vector graphics.
Props are good at dynamically drawing things. Props are not so good at bit mashing. It's better to operate on data sizes that are easy for the COG, feed to a buffer, then have the signal COG, or COGS display that to the screen.
Using the render to scan line buffer approach, one cog should be able to do your signal, so long as the resolution isn't too high, with the remaining ones building data on the fly.
There are essentially NO restrictions on the video generators. They can output to different pins, the same pins, no pins! Whatever you want them to do. Just set them up, and then feed them pixel and color data. Or.. the same is basically true for the COGS as well, just doing writes to the pins, and using masks, cycle counting for the pixel clocks.
Depending on what you want to do, rendering to scan line buffers avoids the PLL sync issue, because only one COG will output.
Baggers first did something similar a few years ago, outputting 15 bit color, with a low resolution, drawing bitmaps from the HUB. Later on, he managed to get the thing to render WOLF3D, raycast style, with textures (8 bit color) on one prop! Packed all that into 32K as well, minus the baddies. Chip was fast enough, just no RAM left to contain them.
You could just simple use %%3210 for pixel data, to just use each the color once.
But at a lower horz res so waitvid can keep up.
You've got a few choices:
1. Use a 4 pixel frame. This allows all the colors to be output on any pixel. You get hardware support for 8 bits of color that way. "waitvid colors, #%%3210" Colors then becomes pixels, with the actual pixel argument used to just specify the order of output. In this mode, you can reverse the data for screen display in the video generator.
2. Output longer frames, but be limited to four 8 bit colors per frame. This data will need reversing prior to display, unless your dynamic graphics do that as part of their process.
3. Sync more than one COG, and output one of the above in tandem with a primary signal COG.
At higher resolution, it's going to be necessary to use multiple COGs to generate all the color data. 4 pixel frames gets you about 256 horizontal pixels, with the ability to fully use the color bits in the video generator at VGA style sweep frequencies. To do more than that resolution wise, either colors go off the table, or it will cost more COGs, as you've outlined.
You are not fixed in resolution either! It's entirely possible to run one COG at a low resolution, providing more color, and another COG running at a higher one, providing intensity too. They only really need the same sweep frequency to keep it all sane.
I've been wanting to do that with a component video driver, because the sweep frequency is nice and low. Haven't done it, because there just are not that many component displays that are small. Limited to higher end TV's.
*Heater's law, whereby something declared possible actually ends up done.
This currently uses 6 cogs for video + 1 to manage things. So at present it is not a practical solution for single Propeller designs.
I burned up the bread board do to a short between the LSB inputs to the Blue resister DAC that was directly connected to a line driver (bypassing the breadboard) that itself was directly connected to the Propeller pins (again bypassing the bread board). I had bypassed the breadboard because I wished to avoid any potential issues with the capacitance of the breadboards conductors (65Mhz is a bit fast for a breadboard). This short some how lit up my "Fire resistant" plastic breadboard.
Might be smarter to focus on packing what you can into one chip, with a CPLD, and then wait for Prop 2 ?
The chips are Propellers. As I said KISS. As such I am doing this with Propellers.
Also It can be done using 1 prop using the built in video generator (8 cogs), Though I will focus on a 12 bit version, that uses 6 cogs, and see if I can not reduce that, If so then I will see if I can not do this on one Prop.
I am working on implementing a single Propeller UXGA VGA driver, that supports at least 12BPP, and hopefully 15BPP, using as few cogs as possible.
This thread began as a simple question, about parallel cogs working on the same video output as I have only been using the Propeller for about 5 to 6 weeks.
So far it looks like 12BPP will require 4 COGS in order to not be restricted by the palette. Any suggestions on how to get around this limit are welcome. This could be done in two COGS, but that would leave the pallet limit at 8 colors for each 16 pixals.
The code, and schematic will be released under a MIT license, once it is fully working and the HSync and VSync look clean on my scope (as some monitors have trouble with noise in the Sync). Maybe I should also scope the kitchen Sync to make sure it is clean .