Shop OBEX P1 Docs P2 Docs Learn Events
Color NTSC 160x192 16-colors — Parallax Forums

Color NTSC 160x192 16-colors

BeanBean Posts: 8,129
edited 2011-08-11 05:09 in Propeller 1
I was looking at my old SX stuff and ran across my design for a color video project.

I was thinking that it might be cool to try it on the Propeller. It is basically a fully bitmapped 160(h) x 192(v) 16-color display.

The original SX thread is here http://forums.parallax.com/showthread.php?p=603796

The screen takes a little under 16K of cog hub memory. That should leave a good bit for spin code.

I have posted the working code. I don't know if the graphics library could be modified to work·with this. I think it only works with 1 or 2 bits per pixels layouts.

Give it a try and let me know what you think.

[noparse][[/noparse]EDIT]

· I have modied the driver and the graphics.spin library to support 16 colors (4 bits per pixel). I think I have everything working EXCEPT the "FILL" command. If anyone can help to fix it I'd appreciate it.

Bean.

·

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
There is a fine line between arrogance and confidence. Make sure you don't cross it...



Post Edited (Bean (Hitt Consulting)) : 5/24/2009 2:04:37 AM GMT
«1

Comments

  • RaymanRayman Posts: 14,865
    edited 2009-05-14 23:21
    Very interesting. I think you mean 16K of HUB RAM, right? Does Hydra already have something like this?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
  • Ole Man EarlOle Man Earl Posts: 262
    edited 2009-05-15 00:43
    Bean,
    Looks really good !
    I would use it on my autopilot but I am running out of room !
  • BeanBean Posts: 8,129
    edited 2009-05-16 22:53
    I have posted the code for the Propeller in the orginal post (at the top of the thread).

    If anyone knows if the graphics library (used for the graphics demo) could be modified to work with a 4-bits/pixel memory layout let me know.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    There is a fine line between arrogance and confidence. Make sure you don't cross it...

    ·
  • mosquito56mosquito56 Posts: 387
    edited 2009-05-16 23:15
    Very Nice, I have it on an education board with a ucontroller t.v. card. Rock solid. Some veritcal lines at edges but not enough to worry about. Look forward to a demo with text, lines, circles etc.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·······

    ······· "What do you mean, it doesn't have any tubes?"
    ······· "No such thing as a dumb question" unless it's on the internet
    ········
  • BeanBean Posts: 8,129
    edited 2009-05-16 23:18
    Download it again. I adjusted some values after looking at it on my big TV.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    There is a fine line between arrogance and confidence. Make sure you don't cross it...

    ·
  • mosquito56mosquito56 Posts: 387
    edited 2009-05-16 23:26
    Yeah, Reds are a little better. Greens on left look the same and a little flicker in top right and 2nd row top right boxes.

    ·I am using a 7" T.v.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·······

    ······· "What do you mean, it doesn't have any tubes?"
    ······· "No such thing as a dumb question" unless it's on the internet
    ········
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-05-16 23:37
    PUB Init
      Start(@videoMemory)
      REPEAT y FROM 0 TO 191
        REPEAT x FROM 0 TO 159
          Plot(x, y, x)
    
    



    Interesting driver.. [noparse]:)[/noparse]

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Visit the: The Propeller Pages @ Warranty Void.
  • BeanBean Posts: 8,129
    edited 2009-05-16 23:51
    Yeah, it's real "old school" [noparse];)[/noparse]

    OK...OK... I updated it with the a high-tech "Line" routine.. Ohhhh.

    I'll have to look at the graphics object to see if I can make it work with this driver.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    There is a fine line between arrogance and confidence. Make sure you don't cross it...

    ·
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-05-17 00:59
    @Bean:

    After leaving this run for more than 45min I had to start fiddling with my V-hold
    to keep the image from rolling. Didn't matter if I reset the board.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Visit the: The Propeller Pages @ Warranty Void.
  • BeanBean Posts: 8,129
    edited 2009-05-17 01:34
    Hmmm... Okay, I'll try letting it run and see if I get the same thing.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    There is a fine line between arrogance and confidence. Make sure you don't cross it...

    ·
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2009-05-17 02:13
    The graphics driver you need will depend on your orientation of bitmap memory, is the orientation that same as the original TV driver? Is so, than change the old graphics routine may be a matter of adjusting masks and checking out any shifts or copy operations. You could create something simple in the mean time and build it up from there, that is what I did for an 8-bit per pixel driver for a uOLED-96 display.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter, E.I.
    www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
    www.tdswieter.com
  • BeanBean Posts: 8,129
    edited 2009-05-18 11:09
    Has anyone else seen the vertical hold problems that OBC is describing ?
    I've run it on three different screens and haven't seen it.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    There is a fine line between arrogance and confidence. Make sure you don't cross it...

    ·
  • BeanBean Posts: 8,129
    edited 2009-05-24 02:04
    After many hours of work, I have modifed the driver and the graphics.spin library to work with 16 colors (4 bits per pixel, no pallete).

    You may download the demo from the top of the thread. If I can get the "FILL" command working and everything else checks out, I'll put this in the OBEX. And write a version for the Hydra.

    Comment welcome.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    There is a fine line between arrogance and confidence. Make sure you don't cross it...

    ·
  • whickerwhicker Posts: 749
    edited 2009-05-24 18:12
    Looks good with no chroma crawl

    some notes:
    gray looks like a checkerboard, and has orange and blue fringes.

    theoretically would there be a way to change the palette, or is everything pretty much fixed?
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-05-24 18:37
    Wow.. seizure mode.. with everything running. very flickery here..

    I've remarked everything (including the bitmap clear) except the triangle drawing,
    and it looks pretty sweet. Gonna leave it running while I do some chores and see
    if it starts flipping again.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Visit the: The Propeller Pages @ Warranty Void.
  • MagIO2MagIO2 Posts: 2,243
    edited 2009-05-24 20:08
    Very nice Bean!

    I guess your driver is the top candidate for my project. I've seen another driver from Steven Messenger which was kind of impressing as it does not use double buffering but did not flicker. It only is a 4 color mode driver.
    When I played a little bit with your driver (removing the waitcnt;o) I thought the technique that Seven used would be interesting for your driver as well. He's doing all the graphics output in XOR-mode. You draw something once and it will be shown on the screen, you draw it again and it dissappears.

    What I am dreaming of is, having 320x200x16 graphic mode which is fast enough for showing some nice icons for a cute menu-system. Maybe with some smoth scrolling of submenus.

    But that has to wait until I'm done with my RAM interface CPLD.
  • BeanBean Posts: 8,129
    edited 2009-05-25 17:04
    OBC,
    Yeah the flickering is because there is not enough RAM to do double buffering.
    I think I will change it to 128x192x16 so that I CAN do double buffering.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    There is a fine line between arrogance and confidence. Make sure you don't cross it...

    ·
  • trodosstrodoss Posts: 577
    edited 2009-05-26 19:15
    Bean (Hitt Consulting) said...
    OBC,
    Yeah the flickering is because there is not enough RAM to do double buffering.
    I think I will change it to 128x192x16 so that I CAN do double buffering.

    Bean.

    Bean,

    Great work on the driver!· I ran the demo for about an hour on an old CRT display and did not see 'flipping'· I will try it on an LCD screen to see if I get the same results as OBC though.

    Re: Double buffered display: Would it be closer to 128x96x16, or are you planning on using more Hub RAM?·
  • BeanBean Posts: 8,129
    edited 2009-05-26 20:45
    Here is 160x160 resolution·WITH double buffering.

    I don't like the blank bands at the top and bottom.

    I'm thinking about making it 160x112 with double high pixels. This would make the pixels more square, fill the entire screen, and use even less memory.

    Bean.




    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    There is a fine line between arrogance and confidence. Make sure you don't cross it...



    Post Edited (Bean (Hitt Consulting)) : 5/27/2009 12:40:03 AM GMT
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2009-05-27 01:40
    Do you have a picture of a TV screen at the 160x160? Does it look more like "widescreen" format with the black bars on the top and bottom?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter, E.I.
    www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
    www.tdswieter.com
  • BeanBean Posts: 8,129
    edited 2009-05-27 01:52
    Timothy,
    I don't have a picture, but yeah that is what it looks like. I just have 16 extra blank lines at the top and bottom.
    BTW It looks great on your 3.0" color LCD screen.

    I'm working on the 160x112 mode now.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    There is a fine line between arrogance and confidence. Make sure you don't cross it...

    ·
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2009-05-27 08:47
    Thanks bean. My Prop Demo board is packed in a cargo container some where between Hong Kong and Singapore. Once I get unpacked I will fire up the display and check out the code. I can snap pictures then, but if someone beats me to it please do!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter, E.I.
    www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
    www.tdswieter.com
  • BeanBean Posts: 8,129
    edited 2009-05-27 20:03
    Here is the 160x112 16 color display running on the 3.0" LCD that Timothy sells.

    Of course the pictures don't do it justice.

    Bean.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    There is a fine line between arrogance and confidence. Make sure you don't cross it...
    768 x 576 - 163K
    768 x 576 - 196K
    768 x 576 - 191K
  • hover1hover1 Posts: 1,929
    edited 2009-05-27 23:27
    Bean (Hitt Consulting) said...

    Here is the 160x112 16 color display running on the 3.0" LCD that Timothy sells.

    Of course the pictures don't do it justice.

    Bean.



    You are right Bean about the quality of output. They look a heck of a lot better in person!

    I think Timothy's LCD's are just camera shytongue.gif

    The first pic is closeup of 160x160.

    I found if I backed up a little they came out a little better. Second shot 160x160. Third shot 160x112.
    1280 x 960 - 594K
    1280 x 960 - 1M
    1280 x 960 - 1M
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2009-05-27 23:34
    Way cool guys!! Thanks for the picture posting.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter, E.I.
    www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
    www.tdswieter.com
  • hover1hover1 Posts: 1,929
    edited 2009-05-27 23:43
    Timothy D. Swieter said...
    Way cool guys!! Thanks for the picture posting.

    Your Welcome!

    And I just happened to sneak in a pic of a way cool uOLED expander device that a guy in·Hong Kong·makes eyes.gif

    Sorry Bean for OT.

    Jim
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-08-10 05:45
    Hi Bean et al,

    I was wondering if I can please ask for some help getting the driver on post #1 working on some different pins.

    I'd like to get it working on pins 16,17,18 I think the changes therefore are:
    tvparams                long    0               'status
                            long    1               'enable
                            long    %010_0000      
                            long    %0000          
    

    But I'm not even getting a flicker on the screen. So deep inside the TV 160x192x16 I found this line which I think is set locally rather than via the main spin program:
    VideoDIRA                LONG %00000000_00000000_11110000_00000000 ' demoboard   
    

    and I changed that to LONG %00000000_00001111_00000000_00000000

    but still not a flicker on the TV. Are there any other variables hidden away in the code somewhere, or is it maybe a timing problem of some sort?

    Any help here would be most appreciated as this appears to be the 16 color driver with the most number of pixels.

    Attached is a working program with the pins setup for pins 16-18 - some of the code is rather similar to the code in this thread so if anyone can spot what I'm doing wrong I'd be very grateful.
  • BeanBean Posts: 8,129
    edited 2011-08-10 07:05
    Did you modify VideoVCFG ?

    Bean
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-08-10 17:52
    Ah, no I didn't.

    The current setting for this is VideoVCFG LONG %0_01_0_0_0_000_00000000000_001_0_11110000

    The code examples I have for pins 16-18 all are calculated in code rather than as a constant so it is a bit hard to work out what the value ends up as.

    what would this value be for pins 16-18? is it
    VideoVCFG LONG %0_01_0_0_0_000_00000000000_010_0_00001111 ' dracblade pins 16-18
  • BeanBean Posts: 8,129
    edited 2011-08-11 05:09
    Dr_Acula wrote: »
    what would this value be for pins 16-18? is it
    VideoVCFG LONG %0_01_0_0_0_000_00000000000_010_0_00001111 ' dracblade pins 16-18

    Yes, that looks right to me.

    Bean
Sign In or Register to comment.