Shop OBEX P1 Docs P2 Docs Learn Events
Displaying an image on a XGA monitor. Please point me in the right direction — Parallax Forums

Displaying an image on a XGA monitor. Please point me in the right direction

Brian CarpenterBrian Carpenter Posts: 728
edited 2010-03-03 13:54 in Propeller 1
I have purchased a 7" vga input LCD screen. it says that it displays 800x600. I have a logo that i want to display in static on the screen. I can size the logo to any size in photoshop and i know that Rayman has an app for the PSB screen to convert the logo to a 2-bit .dat file. The question is, where to go from there? can anyone help point me in the nest direction?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


It's Only A Stupid Question If You Have Not Googled It First!!

Comments

  • Ken GraceyKen Gracey Posts: 7,401
    edited 2010-03-03 05:29
    Brian,

    Do you have a copy of Andre's book? I'll get one off to you on Wednesday.

    I've also preferred VGA monitors for their display quality and brightness, but I haven't attempted to display any graphics yet. So far I've been using special characters to make bargraphs and lines.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Ken Gracey
    Parallax Inc.

    Follow me at http://twitter.com/ParallaxKen for some insider news.
  • Brian CarpenterBrian Carpenter Posts: 728
    edited 2010-03-03 05:37
    I do not have it. I am puzzled at why this is such a mystery to me. I just can not grasp how to display the graphic. i understand the text and have done that on several occasions.

    What resolution are you using for the VGA?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    It's Only A Stupid Question If You Have Not Googled It First!!
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2010-03-03 05:40
    Brian, isn't XGA just IBM's way of saying super VGA. The VGA objects usually allow you to change the resolution but the default is 640x480. 800x600 is simply the next resolution up. I know in VGA High-Res Text driver that you can simply uncomment the timing section that you want. Why not use that for testing at least.

    BTW, just looking at the 512x384 bitmap driver that signals in 1024x768, you should be able to drop that back to 400x300 bitmap or even keep the same bitmap but change the timing to 800x600 with a bit of a fiddle.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    *Peter*

    Post Edited (Peter Jakacki) : 3/3/2010 5:47:49 AM GMT
  • Brian CarpenterBrian Carpenter Posts: 728
    edited 2010-03-03 05:42
    Peter,
    I have done the text. i just dont understand how to do the graphics. i want to display this

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    It's Only A Stupid Question If You Have Not Googled It First!!

    Post Edited (Brian Carpenter) : 3/3/2010 5:47:35 AM GMT
    1115 x 201 - 35K
    ATS.jpg 35.1K
  • Ken GraceyKen Gracey Posts: 7,401
    edited 2010-03-03 05:42
    I've been using Chip's VGA Text demo (cols = 32 and rows = 15). I'm not sure what resolution it display at to be honest.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Ken Gracey
    Parallax Inc.

    Follow me at http://twitter.com/ParallaxKen for some insider news.
  • Brian CarpenterBrian Carpenter Posts: 728
    edited 2010-03-03 05:47
    great to hear from you by the way Peter.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    It's Only A Stupid Question If You Have Not Googled It First!!
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2010-03-03 05:48
    Sorry, I added a bit to my last post but here it is again.

    BTW, just looking at the 512x384 bitmap driver that signals in 1024x768, you should be able to drop that back to 400x300 bitmap or even keep the same bitmap but change the timing to 800x600 with a bit of a fiddle.

    This is not saying how to do it but the object is a very good start. Just off the top of my head I'd say look at the timings used in the hires text and try them in the bitmap driver. You may have to change a few other lines to skip the extra pixels (hint: adjust pixel_ptr).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    *Peter*
  • Brian CarpenterBrian Carpenter Posts: 728
    edited 2010-03-03 05:49
    Peter,
    Ok, so if i use that driver, and i use Rayman's converter to make a .dat file. now what. how do i call it to display from the file and get the colors right

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    It's Only A Stupid Question If You Have Not Googled It First!!
  • Brian CarpenterBrian Carpenter Posts: 728
    edited 2010-03-03 05:49
    Thanks peter.
    We must be typing at the same time

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    It's Only A Stupid Question If You Have Not Googled It First!!
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2010-03-03 05:58
    Yes Brian, maybe we should press that "interactive chat" button, that's IRC IIRC smile.gif

    I'm not sure about Rayman's dat file though, maybe you should ask the guru himself. Admittedly the bitmap demo does not have individual color for each pixel. How many pixels and lines would be sufficient do you think for your application? The main thing is to fit it in the Prop's limited memory

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    *Peter*
  • Brian CarpenterBrian Carpenter Posts: 728
    edited 2010-03-03 06:01
    it is a white background with a yellow and black.
    so 2 colors?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    It's Only A Stupid Question If You Have Not Googled It First!!
  • Brian CarpenterBrian Carpenter Posts: 728
    edited 2010-03-03 06:04
    yellow - $FFFF00 and
    black - $000000

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    It's Only A Stupid Question If You Have Not Googled It First!!
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2010-03-03 06:04
    What sort of visible resolution though? I don't mean the 800x600 timing although we would work to some sub-multiple of that, say 200x150x2 = 7.5K for instance. Depends what else you want to do with the screen or is it a simple overlay?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    *Peter*
  • Brian CarpenterBrian Carpenter Posts: 728
    edited 2010-03-03 06:09
    that is a good question. I would like the best i can get. It will be seen by many people everyday. it is the primary screen for a conference room plaque that will be out side over 30 conference rooms in my company. Like a screen saver. Then, depending on what is going on, it will display other things besides the logo.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    It's Only A Stupid Question If You Have Not Googled It First!!
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2010-03-03 06:17
    If that's the application then don't try to minimize, what about Alberto's nice little graphics card, plenty of resolution and colors!
    http://forums.parallax.com/showthread.php?p=881238

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    *Peter*
  • Brian CarpenterBrian Carpenter Posts: 728
    edited 2010-03-03 06:23
    Yes, i have been following the thead. he is not currently selling the board. it is a great demo

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    It's Only A Stupid Question If You Have Not Googled It First!!
  • VIRANDVIRAND Posts: 656
    edited 2010-03-03 06:34
    You're trying to display a logo as static?
    If you can hide the complete logo out of sight then you copy it to the screen using PASM and a simple
    pseudorandom number generator in the loop and between the RDLONG and WRLONG instructions
    use AND register,prandom_num. to make the color 1 be broken up by static.

    You have to figure out where, probably best on the screen buffer, the hidden (by having same foreground
    and background color in that area) and also the address of where the staticized logo will appear after
    being copied and staticized.

    The Spin LFSR in "?" doesn't look staticcy enough to me, so maybe use a different LFSR, but maybe something
    hacked up in a hurry like this will appear staticcy:
    LOOP  RDLONG 32pixls,darklogo_pointr           'get 32 pixels fom logo
               ADDC prandreg1,#any_ugly_number_like_$BAD1DEA5    'make makeshift static
               XOR   prandreg2,prandreg1
               ADDC prandreg3,prandreg2
               AND   32pixls,prandreg3                        'mask logo and static, OR may work also
               WRLONG 32pixls,statlogo_ptr                'put whats left of 32 pixels on screen
               ADD   darklogo_ptr,#4                          'move logo pointers to next longs 
               ADD   statlogo_ptr,#4
               DJNZ  logolongs,#LOOP                        'finish copying staticcylogo
               DJNZ  looprepeats,#LOOP                    'finish repeating making animated staticcylogos 
    '           ------  'whatever;s next
    prandreg1 long $1F878903                             'made up probably useful digital noise math
    prandreg2 long $21393671
    prandreg3 long $84633393
    logolongs  long $1000                                     'rough guess size of logo
    looprepeats long $0100000                            'repeat making static logo frames how many times
    darklogo_ptr long $4000                                 'first long of unmodified logo (rough guess)
    statlogo_ptr long $6000                                  'first long of where static logo appears on screen (rough guess)
    32pixls          long 0                                          'temp storage for adding static while copying logo
    
    


    I haven't tested this code. Expect dumb mistakes. Just an example.
    It doesn't include the logo nor know where it will be stored nor displayed
    I am not familiar enough with timing counters to spontaneously program them so I used looping as cheap timing
    The ADDC instructions probably need flag-flags. The math is probably noisy enough or could be with other seeds.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I should be typing in Spin now.
    Coming soon. My open Propeller Project Pages and favorite links index.

    Post Edited (VIRAND) : 3/3/2010 7:18:23 AM GMT
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2010-03-03 06:40
    Well Alberto is a very helpful and humble person who achieves wonderful things. He is one of the nicest guys on the forum. Try dropping him a message and see if you can come to some arrangement. If you get one of his boards you won't have any problems at all.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    *Peter*
  • KyeKye Posts: 2,200
    edited 2010-03-03 06:54
    If your using only 4 colors for the whole screen... Then you could just use the flexible VGA 4 color bitmap driver in the OBEX. Should be one the first page of the downloads sections for VGA stuff.

    The trick would be fitting both the image and the screen buffer into main memory at the same time.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nyamekye,
  • RaymanRayman Posts: 14,877
    edited 2010-03-03 13:54
    800x600 is a resolution that I never got working...

    So, I normally use either XGA or VGA (and sometimes UXGA).

    I don't know what your trouble exactly is, but one thing to note is a major difference between XGA and VGA drivers...
    Both use a word for every tile, but one has the 6 color bits first and one has them last.
    But, there are plenty of examples of both varieties on my website.
    Note that the same .dat files can be used with either XGA or VGA variants...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm

    My Prop Products:· http://www.rayslogic.com/Propeller/Products/Products.htm
Sign In or Register to comment.