Shop OBEX P1 Docs P2 Docs Learn Events
800x600 VGA (400x300) video driver — Parallax Forums

800x600 VGA (400x300) video driver

TheCbacTheCbac Posts: 9
edited 2013-12-07 14:38 in Propeller 1
I posted an early thread in propeller Gcc, but I think this is a better spot, now that I have spin2cpp running.

I need to be able to create 800x600 VGA @ 60Hz (rendered as 400x300 would be fine) and be able to bitmap the pixels. I've been looking at the work that Kuroneko did below in the scanline demo (waitvid400x300, see link below), but I'm not sure how to adapt this. If anyone could give me some pointers, on how to do this it would be greatly appreciated!

http://forums.parallax.com/showthread.php/135844-POC-most-useless-piece-of-code-ever-The

Comments

  • kuronekokuroneko Posts: 3,623
    edited 2013-12-05 14:59
    That's probably not the most appropriate driver(?) (being proof of concept only). There is a more refined 400x300 scanline driver but without knowing more about your requirements it's hard to say whether it's appropriate (I use this on a C3 with a Synapse board to display full colour). So if you could provide more details that would be useful. Note that for pixel based graphics bandwidth becomes an issue too. Below is a list of available drivers (just ignore anything which isn't 800x600 timing).

    attachment.php?attachmentid=105195&d=1385282767
  • TheCbacTheCbac Posts: 9
    edited 2013-12-05 17:03
    I'm working on a LCD screen that takes a VGA input, which has to be exactly 800x600 @60Hz. Ideally, I just what to create an array that has an element for each pixel, so that I can turn each pixel on and off individually by writing to the array.

    I looked around for any driver that was set up this way out of the box but I couldn't find one. Is any information that would be useful for clarification?
  • kuronekokuroneko Posts: 3,623
    edited 2013-12-05 17:15
    TheCbac wrote: »
    I'm working on a LCD screen that takes a VGA input, which has to be exactly 800x600 @60Hz. Ideally, I just what to create an array that has an element for each pixel, so that I can turn each pixel on and off individually by writing to the array.
    If you do the math 800x600 - even at two colours per pixel - costs you 60000 bytes which you don't have (without external memory). At 400x300 that comes down to 15000 bytes which fits but eats nearly half the hub RAM. I'm not aware of an existing monochrome driver that does that but it can be easily written. If you need more colours the resolution goes down further. Would two colours be acceptable?
  • TheCbacTheCbac Posts: 9
    edited 2013-12-05 17:24
    Yes, two colors would be great. The initial plan is to use 400x300, but then to switch to XMMC format with Propgcc using an SD card to get away from the memory constraints.
  • kuronekokuroneko Posts: 3,623
    edited 2013-12-05 18:27
    TheCbac wrote: »
    Yes, two colors would be great.
    Attached is a quick and dirty 400x300 monochrome driver. See if you can work with it.
  • TheCbacTheCbac Posts: 9
    edited 2013-12-05 19:25
    Quick turn around.

    Thanks so much!
  • TheCbacTheCbac Posts: 9
    edited 2013-12-06 09:03
    Update: I got the driver up and running successfully in Spin, then converted it to C using spin2cpp. I'm now booting in XMMC mode off a 2GB SD card. I have a bluetooth to UART dongle hooked up to the Prop, so when I type it plots pixels :-)

    With memory no longer being an issue, is the driver you supplied easily adaptable to accept an 800x600 array for full resolution, instead of 400x300?
  • kuronekokuroneko Posts: 3,623
    edited 2013-12-06 14:58
    The driver can (or rather its parent). Can your h/w setup deliver a byte every 16 system clocks (5MB/s)?
  • TheCbacTheCbac Posts: 9
    edited 2013-12-07 10:08
    kuroneko wrote: »
    Can your h/w setup deliver a byte every 16 system clocks (5MB/s)?

    I'm not sure. What would determine that? I'm using a Board of Education, and as I said earlier, booting off an SD card in XMMC mode.
  • jmgjmg Posts: 15,173
    edited 2013-12-07 14:38
    TheCbac wrote: »
    I'm not sure. What would determine that? I'm using a Board of Education, and as I said earlier, booting off an SD card in XMMC mode.

    See in #4 If you do the math 800x600 - even at two colours per pixel - costs you 60000 bytes which you don't have (without external memory).

    The problem with full pixel 800x600, is just not enough memory on chip.
    An external Memory design, needs to deliver one byte every 200ns, which starts to get complex.
    There are 8 pin QuadSPI SRAMS that can meet that, (using 2) but you need a set their mode and address, and somewhere find time to write the display data into them.
Sign In or Register to comment.