Shop OBEX P1 Docs P2 Docs Learn Events
graphics demo using vga — Parallax Forums

graphics demo using vga

nyznyz Posts: 6
edited 2007-07-13 13:41 in Propeller 1
Hi

In the thread : http://forums.parallax.com/forums/default.aspx?f=25&m=125858&p=1&ord=d

Posted 5/14/2006 12:02 PM (GMT -7)

Chip wrote :

Yes, graphics.spin is meant to be used not just for TV, but for VGA, custom LCDs, etc. If you are adventurous, you could adapt graphics_demo.spin to work with the vga.spin object instead of the tv.spin object. I will try to get something like this working by the end of the week.



Did the graphics demo running with the vga driver ever get published? I've looked high & low and cant find this anywhere. Any pointers helpful. I dont think I'm advanced enough to port this over myself.

cheers
Dave

Comments

  • deSilvadeSilva Posts: 2,967
    edited 2007-07-12 10:18
    Everybody can publish it within 20 minutes... It is probably not worth doing it... You see:
    GRAPHICS.SPIN is a very generic object, filling a bitmap according to certain conventions, which are:
    - screen width
    - screen height
    - color model (2 Bits/pixel)

    This is VERY compatible to TV.SPIN
    The Demo needs nearly the FULL 32K RAM as it uses double buffering to allow fast animation
    Within the same constraints you can use a variation of the VGA.SPIN driver rather than TV.SPIN to get a slightly sharper image.

    But if you intend to change size and/or color depth there is very little room. It helps to remove the double buffering and just produce a static image, or some reduced animation, when you synchronize to the refresh rate, but this leaves you only 10% of the time to produce a new image.

    So most those things will be kind of "fakes" rather than "demos"

    Post Edited (deSilva) : 7/12/2007 10:23:28 AM GMT
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-07-12 17:02
    deSilva is correct that at VGA resolutions, only a portion of the screen can be animated because of memory constraints. If you want an example of graphics animation in a VGA environment, take a look a Chip's attachment to his post on·4/6/2007 in this thread·http://forums.parallax.com/showthread.php?p=643397


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.

    Post Edited (Paul Baker (Parallax)) : 7/12/2007 6:08:50 PM GMT
  • El PaisaEl Paisa Posts: 375
    edited 2007-07-12 18:03
    Paul,

    the link you mention seems to be wrong.

    There is not Chip' attachement.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-07-12 18:07
    Thanks for pointing that out, the link is now fixed.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • Mike GreenMike Green Posts: 23,101
    edited 2007-07-12 18:14
    There's another VGA driver that uses the graphics library and mixes text with small graphics subwindows.
    It's at the very end of this thread:

    http://forums.parallax.com/showthread.php?p=615350
  • deSilvadeSilva Posts: 2,967
    edited 2007-07-13 08:37
    Or have a look at the Object Exchange:
    Propeller Life Propeller demo cellular automaton based on John Conway's Game of Life. Fun to watch! Click on the samples provided in the app, or roll your own. Works great on the Prop demo board, uses a VGA screen and mouse. Enjoy!
    Ken Pitts 15 K 05/03/2007 08:28
  • deSilvadeSilva Posts: 2,967
    edited 2007-07-13 08:54
    The main problem is "storage".. That is why I wished an aditional Video Memory for the Prop II (which would BTW also have been a nice work around memory addressing issues...)

    But when you are fast enough you can always "compute" the needed pixels "on the fly", you need not store them for a dump "I-need-the-pixels" display loop.

    This is what exactly happens in TV_TEXT, where you just store 8 Bits (well, 16 to be precise) to display 16x32 pixels.

    This can also be done (and is in many graphic systems) for graphics, especially for 3D. You store just "display lists" that are converted to pixels (more or less) "on-the-fly".

    Without MB of intermediate storage you can use tricks like "banding", invented for the need of early graphic printers in low memory PCs 25 years ago. But you have to be FAST to do this for video.

    I think this topic is being discussed from time to time, but I have not yet seen a "demo" using a striping technique for display lists... smile.gif
    Maybe we have to wait for Prop II ?

    ---
    Edited stupid typos..

    Post Edited (deSilva) : 7/15/2007 11:54:29 AM GMT
  • nyznyz Posts: 6
    edited 2007-07-13 13:41
    Thanks for the comments.

    In particular Mike's :

    >>> There's another VGA driver that uses the graphics library and mixes text with small graphics subwindows.
    It's at the very end of this thread:

    forums.parallax.com/forums/default.aspx?f=25&m=154758&p=1&ord=d

    ---
    This has proved the most useful so far, but I'm still a little new to the way the tiles / screen is set up. I'll keep at it.

    cheers
    Dave
Sign In or Register to comment.