Shop OBEX P1 Docs P2 Docs Learn Events
useing libary graphics.spin on vga.spin — Parallax Forums

useing libary graphics.spin on vga.spin

yooyodyooyod Posts: 2
edited 2008-03-07 21:24 in Propeller 1
I·want example code useing libary graphics.spin on vga.spin yeah.gif

Comments

  • RaymanRayman Posts: 14,223
    edited 2008-03-04 13:41
    Graphics.spin is used in the XGA (1024x768) demo.· You can find it here:

    http://www.rayslogic.com/propeller/Users/3rdParty.htm

    It think it can be adapted to VGA, but I'm not sure I've actually seen it done...
  • deSilvadeSilva Posts: 2,967
    edited 2008-03-04 13:57
    It works EXACTLY as with TV. This is one of Chips's great achievements to have established the 2 bits per pixel bitmap as a standard!

    Of course you have to consider the different color model in tile colouring... But it is best to use four colors only anyhow smile.gif

    I did such a modification twice I think - one of it was for a customer however... Now thinking a little bit longer, it was not that trivial with a foreign program....
  • propelleruser999propelleruser999 Posts: 39
    edited 2008-03-05 18:34
    Rayman,

    under http://www.rayslogic.com/propeller/Users/3rdParty.htm link you posted, i can´t find any graphics.spin XGA (1024x768) demo topic.
    i'm looking for that , since so far i couldn't get graphics.spin with any vga driver running.
  • RaymanRayman Posts: 14,223
    edited 2008-03-05 20:18
    It's the first thing:

    Note:··The big difference between this XGA and the regular VGA driver is the way bitmap and color pointers are stored in the tile array.· In one case the bitmap pointer is in the MSBits and in the other case it's in the LSBits...

    ·[url=http://www.rayslogic.com/propeller/Users/VGA_Tile_Driver_Demo_-_Archive__[Date_2006.11.12__Time_03.56].zip]VGA 1024x768 tile driver[/url] by Chip Gracey
  • Shane De CataniaShane De Catania Posts: 67
    edited 2008-03-06 23:20
    check http://forums.parallax.com/showthread.php?p=606957

    VGA_512x384_Bitmap object with graphics as well... (but not the same graphics code mentioned previously in this post)

    Cheers,
    S
  • RinksCustomsRinksCustoms Posts: 531
    edited 2008-03-07 00:17
    If you are a nuub to programing or spin, the graphics demo should be as clear as mud as to what happens in the demo vs what your seeing on the screen. There is a VGA demo included with the propeller tool when you installed it. Hit CTRL key + E to bring up the explorer if you don't see it to the left. If your having a hard time finding the demos, click on Files menu, hover or click on Open from... and click on Propeller Library - Demos. The VGA version of the graphics demo should be in there. If not or you have a very first version of the IDE, just goto the OBEX (Object Exchange) on the propeller main page (not the forums).



    If your looking for info on how to make sense of the demo's, buying the HYDRA's book "Game programming for the prop powered hydra", yeah it's $40 + shipping, but it's worth every cent! I'm not interested in making games on the prop but the book covers ALOT on how the propeller uses the graphics driver, tv driver, how the color scheme (palette) works. I was frustrated at first cuz the demos didn't make any sense, now I'm writing similar demos to the ones that come with the prop IDE. The book is awesome! It answered SO many questions I had on generating graphics & animation on the prop.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    E3 = Thought

    http://folding.stanford.edu/·- Donating some CPU/GPU downtime just might lead to a cure for cancer! My team stats.
  • Shane De CataniaShane De Catania Posts: 67
    edited 2008-03-07 00:44
    I must be a blind nuub... which demo uses VGA and GRAPHICS?
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-03-07 01:04
    I have included the demo below (it can be found by searching the terms ESC and demo on http://search.parallax.com)

    Chip Gracey is the original author.

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

    Parallax, Inc.
  • RaymanRayman Posts: 14,223
    edited 2008-03-07 13:08
    Paul: That looks like a 1280x1024 (SVGA) example...

    But, it looks more adaptable to VGA.SPIN than the 1024x768 example because the address scheme is the same...
  • Shane De CataniaShane De Catania Posts: 67
    edited 2008-03-07 13:22
    Thanks to all who have contributed to this thread (on behalf of yooyod, who has probably been scared away temporarily wink.gif ... But I'm not sure the original question has been answered - please correct me if I'm wrong. Is there, or is there not, a demo that uses a VGA driver and GRAPHICS *full screen* apart from the one I linked to above? The one Paul posted and the VGA 1024x768 tile driver link from Rayman both only have graphics in a small area of the screen. I understand that lack of ram would prevent them from showing bitmap / tile graphics over the full screen unless you want to see the same thing repeated. Is there a low resolution "VGA" and graphics demo with similar details to the many TV demos?
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-03-07 21:24
    Shane De Catania said...
    Thanks to all who have contributed to this thread (on behalf of yooyod, who has probably been scared away temporarily wink.gif ... But I'm not sure the original question has been answered - please correct me if I'm wrong. Is there, or is there not, a demo that uses a VGA driver and GRAPHICS *full screen* apart from the one I linked to above? The one Paul posted and the VGA 1024x768 tile driver link from Rayman both only have graphics in a small area of the screen. I understand that lack of ram would prevent them from showing bitmap / tile graphics over the full screen unless you want to see the same thing repeated. Is there a low resolution "VGA" and graphics demo with similar details to the many TV demos?
    No there is no full bitmap VGA driver·(except the single color 512x384 driver, which is a single buffer driver, definitely not suitable for game systems). The Propeller has 32K RAM, if each pixel requires 2 bits, then there is a total of 131,072 pixels possible, halve this amount (since double buffering is required for displays which dont flicker, so 64K pixels). Displays are 4:3 aspect ratio, so the area is 12x2 (4x times 3x), therefore x = sqrt(65,536/12)=73.9 (73 rounded down). This corresponds to a maximum double buffered display size of 292x219, I'd give you the closest "standard size" but there really isn't one at this resolution (maybe 256x192 which is a resolution harkening to the days of Commodores and Tandy CoCos). There isn't an actual driver witten for this mode.·

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

    Parallax, Inc.

    Post Edited (Paul Baker (Parallax)) : 3/7/2008 9:36:25 PM GMT
Sign In or Register to comment.