Shop OBEX P1 Docs P2 Docs Learn Events
Please help me to choose in the VGA-driver-djungle — Parallax Forums

Please help me to choose in the VGA-driver-djungle

nohabnohab Posts: 96
edited 2012-07-06 18:02 in Propeller 1
Hi,

I have started to test some VGA drivers but there are just so many, all with different features and constraints and I'm not sure if any of them covers my needs.
(and I don't know how to calculate the Prop limitations)

What I would like is
7 colors at least (black, grey, white, blue, yellow, green, red), I guess a 8th color does not cost any more bit?!
320x240 resolution (or more)
every pixel should be possible to set to any of the 7 colors.

If there are functions for text that is even better, but no demand

Is this feasible?
Are there any suitable driver?

/Nick

Comments

  • pik33pik33 Posts: 2,397
    edited 2012-07-05 22:54
    Such driver is possible, but (1) hard to write - the Propeller has native 2 and 4 color modes and you need 8 colors - it is still possible but needs to use some tricks (2) the framebuffer for this needs 28800 bytes - Propeller's RAM is 32 kB, so you will have only 3k for your code.

    As far as I know, there is no such driver now.

    If you want such high resolution, you have to add some additional RAM to the Propeller. I want to try writing high res/high color driver using a 23k256 (I have 4 of them = 128k) as a framebuffer, but I have to connect them to the demo board, sharing its 0..7 pins with SD - I need some free time to do it.
  • TubularTubular Posts: 4,706
    edited 2012-07-05 23:50
    The other problem is achieving grey - 3 bits would typically give you black/white, the 4 colors you want, and cyan & magenta.

    To achieve grey in place of cyan & magenta may need a little external hardware, or at least the standard 8 pin prop VGA output resistor network.

    Alternatively you could "checkerboard" - alternate white & black on one line, black & white on the line below, to achieve a kind of 50% grey, or 50% of other colors for that matter
  • nohabnohab Posts: 96
    edited 2012-07-06 07:48
    3k for code sounds maybe too little....

    I don't know if it is possible but some kind of "letterbox format" could be a solution. I can reduce the vertical solution to a half (320x120) or a third (320x80), but I don't want rectangular pixels, rather just using a part of the screen with black bottom and top (as in some movies on an old TV)

    I will have standard 8 pin VGA output (on the protoboard).
    Checkerboard is unfortunatly not a solution for me.
    (What I'm trying to do is to draw a switchboard for a model railway station, and these tends to be rather long but not so high)
  • RaymanRayman Posts: 14,827
    edited 2012-07-06 07:58
    I think there may be a TV driver that can do this alread... I know I have a TV Bitmap viewer here somewhere...
    VGA is a lot harder because the pixel clock is much faster...

    Phil just posted a VGA picture and text viewer in Ken Gracey's Presenter thread... But, I don't think you can easily modify the screen in real time...

    You could always cheat and use our DVI Graphics Shield and then have 640x480 in 24-bit color...
  • maccamacca Posts: 826
    edited 2012-07-06 08:01
    What you want to do should be possible using a tile graphics engine so to divide the screen into tiles of 8x8 or 16x16 pixels (or whatever size best fits your needs) then build tile graphics so that elements can be reused. I think you have to write your own engine however, there are numerous examples of tile graphics, the Propeller Tool's VGA driver should work with tiles, but I don't think there is one that already supports one color per pixel graphics. The NTSC/PAL_Colorsbars driver supports this mode but it is for composite output, it should not be difficult to adapt the VGA driver to do the same, after all it is just a trick that outputs only 4 pixels per frame instead of 16 pixels.
  • RaymanRayman Posts: 14,827
    edited 2012-07-06 08:06
    Actually, doesn't Kye's VGA driver do what you want:

    http://obex.parallax.com/objects/686/
  • KyeKye Posts: 2,200
    edited 2012-07-06 18:02
    There's also this driver: http://obex.parallax.com/objects/535/

    It has the ability to adjust resolutions. So, it can do 320x240 in 2 bits per pixel mode. You can only have 4 colors for the whole screen. This will use up 19,200 bytes. It will give you square pixels.

    It will work for you if you can do your application with only 4 colors.

    Thanks,
Sign In or Register to comment.