Shop OBEX P1 Docs P2 Docs Learn Events
Which display driver? — Parallax Forums

Which display driver?

jmspaggijmspaggi Posts: 629
edited 2010-07-31 21:15 in Propeller 1
Hi,

I just bought a screen like this one:

http://www.parallax.com/Store/Accessories/Displays/tabid/159/CategoryID/34/List/0/SortField/0/Level/a/ProductID/337/Default.aspx

And I'm wondering which screen driver has been used for what is displayed? I looked at Obex and found many objects. So not sure which one to take.

What I want to build is a graphical interface for a MP3 player. So I want to display mainly text, but also, if possible, scroll bars, etc.

Also, there is 115 200 pixel on this screen. How many colors for each? If it's 256, which mean 8 bits, I will never have enought memory on the propeller to store that. Should I had an external memory to handle that? Even with 16 colors, it's still 56K that I will need.

I took a look at the 1pin driver (http://forums.parallax.com/forums/default.aspx?f=25&m=366805) but I still have a lot to learn because I don't understand anything [noparse];)[/noparse]

Thanks,

JM

Comments

  • jazzedjazzed Posts: 11,803
    edited 2010-07-30 02:07
    Wow! That's a great deal for a 12V display and on sale today ... Nice find! I want one! Most TV drivers allow different colors, and some quality stuff can be displayed on TVs from Propeller, but you'll never* get full broadcast like color out of a propeller driver. At most you can have 64 colors on screen. Potatohead's potatotext can produce some great TV colors though. *Note: never say never because someone may come along and prove us all wrong. Try TV_Text.spin and GraphicsDemo.spin (that's what it's running) for good TV display examples.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Pages: Propeller JVM
  • jmspaggijmspaggi Posts: 629
    edited 2010-07-30 02:35
    I just found Potatohead's post for GraphicsDemo... Look like it will be a good start.

    Thanks,

    JM

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Linux? There is worst, but it's more expensive.
  • potatoheadpotatohead Posts: 10,261
    edited 2010-07-30 04:38
    You've got a great start. Deffo use a tile / text driver. You can keep the RAM to a few Kbytes that way.

    Potatotext is very good, but limited in that only two colors per 8x8 pixel cell. The upside is the characters are easily redefined, and text density on the screen is good. For that display, the 32 column or 40 column displays will provide plenty of text, and good resolution for widgets.

    The Parallax driver, that I commented, has a bit more coarse text capabilities, but the included graphics library is sweet.

    If you use the Parallax driver, consider drawing all the screen tiles and predrawing graphical elements, like scroll bars and such. You can use color palette changes to animate them, and avoid a double buffer display. This might all happen in as little as 8-12K.

    If you use potatotext, take a good look at the font table. There are 127 undefined characters in there. You can define the shape of those, then "print" them to the screen, using their character values, just like you would text strings. A few common shapes can be used all over the screen. This is how it was done on older 8 bit computers, and it can be pretty efficient. You could get down to a few K, maybe 5, if you write over the HUB memory locations used to start the drivers up.

    Have fun!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!
    8x8 color 80 Column NTSC Text Object
    Wondering how to set tile colors in the graphics_demo.spin?
    Safety Tip: Life is as good as YOU think it is!
  • potatoheadpotatohead Posts: 10,261
    edited 2010-07-30 04:39
    You can get about 120 colors on screen, BTW. That's about the max the Propeller will do without fancy tricks, or extra hardware added. Honestly, for a display of the kind you are thinking about, it's a good amount, as dithering, and very careful use and placement will yield a clear display.

    The parallax driver can place any 4 of them within a 16x16 tile. Potatotext can place any two of them, in a 8x8 tile.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!
    8x8 color 80 Column NTSC Text Object
    Wondering how to set tile colors in the graphics_demo.spin?
    Safety Tip: Life is as good as YOU think it is!
  • jmspaggijmspaggi Posts: 629
    edited 2010-07-30 12:39
    The first language I played with was Pascal about 15 years ago. Yes yes, the yellow and black one [noparse];)[/noparse]

    Then slowly but surely, I moved to Turbo Pascal where there was "Turbo Vision", you know? The API which provided ways to draw windows using text characteres made for that. From 176 to 223 in the old ascii table. So I think I should be ok to apply the same idea on the propeller. I will just have to define the 127 remaining characters with what I need. I order to save some memory, I will put my charactere tables in the SD.

    http://thomasjensen.com/software/buchfink/buchfink.gif

    Regarding the scroll bars, if I use characteres also, will I still need 8-12K? Because it's a bit to much for my application. I already need memory for OGG buffers, menus content, etc.

    Will the memory required be based on the driver I will use? Or the use I will do of the driver?

    Regarding the screen, it's 480x240px. Does it mean I can do 30x15 chars with 16 by 16 tiles (Parallax), and 60x30 chars with 8 by 8 (potatotext)?

    In a perfect world, I would like to have a 8x8 tiles with 3 colors [noparse];)[/noparse] Because 2 is a bit small. But maybe I can deal with that. Do you know why there is a 2 color limitation? Is it something realistic to add a 3rd one? Or there is some limitations like speed of memory?

    I will receive my screen today, so I will do some testing soon...

    Thanks,

    JM

    Message Edité (jmspaggi) : 7/30/2010 4:14:02 PM GMT
  • potatoheadpotatohead Posts: 10,261
    edited 2010-07-30 16:23
    Potatotext only draws 25 rows, the rest being border, and that's kind of fixed. It's two color because the two other colors are reserved for a roving mouse pointer graphic that can retain it's color no matter where it's at on the screen. I'm working on that right now, along with PAL.

    It's possible to do 4 color with the 8x8. It just hasn't been done. Modding that driver involves ripping out the font conversion code, stripping down the waitvid loop, VSCL frame timing adjustment, and font tweaks to render properly in 4 colors.

    Anyone feel free to rip into that. I can answer questions, but I've kind of got to stay on the course I'm on right now.

    Honestly, if you want more colors, I think I would use the Parallax driver. If you are creative with it, a whole lot can be done with the tiles and color capability it has. IMHO, that's probably easier than tearing into potatotext right now.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!
    8x8 color 80 Column NTSC Text Object
    Wondering how to set tile colors in the graphics_demo.spin?
    Safety Tip: Life is as good as YOU think it is!
  • jmspaggijmspaggi Posts: 629
    edited 2010-07-30 16:46
    Haha [noparse];)[/noparse]

    [noparse][[/noparse]quote]
    Modding that driver involves ripping out the font conversion code, stripping down the waitvid loop, VSCL frame timing adjustment, and font tweaks to render properly in 4 colors.


    The only word I understand here is "the" [noparse];)[/noparse] So I guess I'm better use something already done until I'm able to understand how it works.

    When you are talking about the Parallax driver, are you talking about TV_Text.spin? I looked into the code, and seems that it's for 40 cols, 13 rows. Can I "simply" change those values to have 30x15? Or I will also have to do thing I even don't understand the name? [noparse];)[/noparse]

    I also looked at the TV.spin, but it's all PASM and a bit to hard for me for now. I think I understand how to use it, how to put information in the screen, but I'm not able to find where it's taking the tiles definition. Is it on the Propeller ROM where we have the charactere table? But this one is 16x32, and I want to do 16x16...

    I will continue to dig the source, but if you can point me to the right direction, that will help.

    Thanks,

    JM

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Linux? There is worst, but it's more expensive.
  • jmspaggijmspaggi Posts: 629
    edited 2010-07-30 17:52
    I think I found there the characteres are... It's on line 110 that it reads it from the ROM. Like for a space (0x20), the value stored in screen is 0x220. When you shift it, you have 0x8800. Which is where you have the pair for " " and "!".

    Which mean it's using the 16x32 tiles so I will have to point it on my own tiles definitions.

    I will start to play with it, do some update and see the results.

    The more I read, the more I understand [noparse];)[/noparse] A chance [noparse];)[/noparse]

    JM

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Linux? There is worst, but it's more expensive.
  • jazzedjazzed Posts: 11,803
    edited 2010-07-30 18:28
    JM I was thinking it would be pretty easy to provide a TV text solution for PropellerJVM (GraphicsDemo would never fit though). It is not high on my priority list right now, but could be after a while. Something to be thinking about.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Pages: Propeller JVM
  • potatoheadpotatohead Posts: 10,261
    edited 2010-07-30 18:56
    Yes, I'm talking about the Parallax drivers that are associated with graphics_demo.spin. Rayman has combined that with TV_Text, for a nice alternative.

    You've got a wide variety of options. Take a look at the post in my signature, "having trouble with.,.." Colors, tiles and tile addresses are explained in the comments.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!
    8x8 color 80 Column NTSC Text Object
    Wondering how to set tile colors in the graphics_demo.spin?
    Safety Tip: Life is as good as YOU think it is!
  • Mike B.Mike B. Posts: 31
    edited 2010-07-31 21:15
    I just bought that same display plus the Propeller BackPack.· Still trying to figure out how to use the text terminal part.· Only complaint I have is the product description on the Parallax store says the display has built in speaker(s).· Not that I can see!·· scool.gif

    · Mike B.
Sign In or Register to comment.