Bitmap VGA driver that can do Palette or HAM modes?
tonyp12
Posts: 1,951
There is not really a limit how good the gfx could look on the propeller,
if you simple had more onboard ram.
But let's limit ourself to a 24kb bitmap and what possible video mode can be done?
280x180 4bit with a color pallate lookup table?
Thousands of colors·done with·Hold and Modify mode?
http://en.wikipedia.org/wiki/Hold_And_Modify
·
if you simple had more onboard ram.
But let's limit ourself to a 24kb bitmap and what possible video mode can be done?
280x180 4bit with a color pallate lookup table?
Thousands of colors·done with·Hold and Modify mode?
http://en.wikipedia.org/wiki/Hold_And_Modify
·
Comments
I'm willing to give it a shot.
HAM was what made the Amiga the most "colorful" computer around when it was released in 1985.
a 24kb bitmap could have max resolution of 210x160
(210x160/8*6)
I wounder if it would be better NOT to store the bimap the same way Amiga did it in Bit Planes?
but 6bit data put in 32bit longwords does not add up either.
And where can you find a Windows Program that can save to·raw ham6 mode?
A good HAM picture would need some smart analyzing for the base 16color palette.
Here is a simulated 24kb ham picture.
Post Edited (tonyp12) : 4/14/2009 4:56:41 PM GMT
In order to get more VGA colors out of the Prop, you're going to need to have wider DACs, i.e. more than the current 2R2G2B. Also, the video generator is only capable of 8 bits per pixel, so if you are doing more than 8bpp you will need to run two cogs in parallel. You might be able to get some additional "bits" via high frequency dithering; although I don't know whether that is truely feasible.
One easy change would be to use the two pins normally tasked to H & V sync to R & G instead and generate H & V sync outside of the video generator. That would bump up the number of colors to 256 shades 3R3G2B.
But as already mentioned we need a DAC. Digital outputs with resistors are not suited for 6 bits per channel and VGA pixel frequency. I just had a look at ti.com. DACs that are fast enough are only available in single channel. The TLC7524 is available for less than four dollars at DigiKey.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Airspace V - international hangar flying!
www.airspace-v.com/ggadgets for tools & toys
What other realtime de-compression for 6bit graphics would be suitable?
4bit HAM would only save 33%.
Some type of delta compression?
12 pixels in a 32bit longword would save 65%
http://www.youtube.com/watch?v=knZyPXcelYM
I'm pretty sure·they use some type of compression, that is not to heavy on the cpu.
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·
* Actually, you can get slightly more out of it - but 16bpp is the easiest way of putting it :P
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·
Could a VGA driver be created that draws VGA images in realtime from DX1 data?
http://cache-www.intel.com/cd/00/00/32/43/324337_324337.pdf
I'm trying to avoid having one cog decompressing to a buffer
and when the vga cog to work displaying it.
I understand that DX compression takes 4x4 pixels (16 pixels in a block) and gives it a color space number and direction.
As we only have 64 colors, wonder if something similar could be created by using a lookup table?
Create a·table of 256 different color pattern, and then use the one with closest match.
Post Edited (tonyp12) : 4/14/2009 10:03:26 PM GMT
Code removed
Smile! I forgot to divide each of the colour components individually...
-- Addition:
DXT1 takes a 4x4 grid of pixels. From those, it selects two colours, c0 and c1. c2 is 2/3*c0 + 1/3*c1 and c3 is 1/3*c0 + 2/3*c1. Since it uses 16-bit colour, thats the first 32 bits consumed. (I'm ignoring alpha masking for now)
The second 32 bits is a lookup table. Each 16 pixels divided by 32 bits means colour gets 2 bits. This, as you may guess, looks up from c0 through c3.
Hmm... You could implement DXT1 for 8bpp by just packing all 4 colour components into the first 32 bits.
Which I've just modified my code to do, removing the need to fix it to unpack and repack the RGB components [noparse]:)[/noparse]
Post Edited (OwenS) : 4/14/2009 8:54:14 PM GMT
Why not drive 2 COGs pararell on 2x8 pins that give You 4R4G4B pixel.
That must be doable.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nothing is impossible, there are only different degrees of difficulty.
For every stupid question there is at least one intelligent answer.
Don't guess - ask instead.
If you don't ask you won't know.
If your gonna construct something, make it·as simple as·possible yet as versatile as posible.
Sapieha
- TI has THS8133/4/5 triple DAC at 80 MSPS. Should be good enough for VGA.
- Analog Devices offers ADV7172/3 NTSC/PAL video DAC.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔Airspace V - international hangar flying!
www.airspace-v.com/ggadgets for tools & toys