Shop OBEX P1 Docs P2 Docs Learn Events
New To VGA. [Help Greatly Needed] — Parallax Forums

New To VGA. [Help Greatly Needed]

Matt32493Matt32493 Posts: 23
edited 2011-06-20 16:04 in Propeller 1
I am just starting to work with VGA on the Propeller chip and i need help... :/
I need just a basic library in which i will be able to set the output and (R,G,B) value of a given (X,Y) pixel.
Could someone please refer me to such a library.
Working Resolution of 1024x768 OR 800x600
Thanks
~Matt

Comments

  • localrogerlocalroger Posts: 3,452
    edited 2011-06-20 13:33
    VGA on the propeller is more complicated than that. The graphics libraries are tile based where each tile (typically 16 x 16 pixels) can have a 4-color pallette, and each pixel within the tile can be one of 2 or 4 colors. There are also timing limitations that make high resolution graphics difficult. Also, individually mapping rgb colors for every pixel at even 800x600 would take ten times the memory the Propeller has for the bitmap.

    So the question is, what sort of display do you want to build and can you build it within the limitations of any of the existing drivers, or one that might be reasonable to build?
  • tonyp12tonyp12 Posts: 1,951
    edited 2011-06-20 13:43
    Due to memory limitations, you will not able to set up a bitmap of that size.
    So unless you come up with a realtime scan routine of the x-y data to be displayed.

    You will have to settle for 320x200 in one color.
  • Matt32493Matt32493 Posts: 23
    edited 2011-06-20 13:49
    Ok, so my options are limited xD

    I am making a simple robotics field where there will be an LCD screen setup to show the score, whole thing run by Propeller chips. I need to be able to show in the upper half two large scores, Numbers between 0 and 9, and in the lower half of the screen show various system information, battery charging rates, voltages, etc.. of the robots on the field. is this at all possible? If not the large numbers are the priority. Thanks.
    Matt!

    p.s. Pixilation is ok xD
  • RaymanRayman Posts: 14,876
    edited 2011-06-20 15:59
    Somebody else asked a similar question today...
    You can use "Graphics.spin" to set pixels in a bitmap area of the screen.
    But, you can't cover the whole screen with these special graphics tiles.
    It sounds like maybe you only need graphics on a portion of the screen.
    So my answer to the earlier question may help you too:
    There is an example for XGA (1024x768) in OBEX.
    It has a small graphics area.

    Also, at the bottom of this page:
    http://www.rayslogic.com/propeller/P...rogramming.htm

    I've made some notes on how to move and resize that graphics area...

    Going from XGA to SXGA is fairly straightforward although there is a diffence (as I recall) on how the tile area is encoded.
    In one case the color bits are on the right side and in the other case the color bits are on the left side...
  • localrogerlocalroger Posts: 3,452
    edited 2011-06-20 16:04
    You can get large characters from the vga_text object by altering vx and hx (and rows and cols) to scale the text. This is very memory efficient because it uses the ROM font and a text buffer. Each character can have its own foreground and background color. Mixing text sizes is a bit trickier, but not un-doable; the easiest thing would be to change vx and hx on the fly half-way down the screen to increase the resolution. As long as you don't need to mix big and small on the same horizontal lines, you could get quite creative with this. If you think this would be usable someone here might be willing to do the mods to the code. I might even get a break to look into it tomorrow. Could be a useful trick.
Sign In or Register to comment.