Shop OBEX P1 Docs P2 Docs Learn Events
PAL/NTSC/Interlaced/Non-interlaced Composite/Component driver — Parallax Forums

PAL/NTSC/Interlaced/Non-interlaced Composite/Component driver

BaggersBaggers Posts: 3,019
edited 2013-05-04 03:06 in Propeller 2
Hi all,

You're only allowed 10 attachments to a post, so I couldn't put this on my drivers thread's first post.

So here is my latest driver :)

PAL, NTSC, Interlaced or Non-interlaced Composite driver.
It's 8bit at the moment, but I shall work on a 24bit SDRAM version next.
You can set the bitmap size to any, and up to the full 720x576 for PAL, and 720x480 for NTSC.

Let me know if you find this useful :D

PAL_NTSC.zip

In the zip is a batch file r.bat, which uses P2Load.exe to load a bitmap to $8000 and palette to $7c00 then the run the P2_PAL_NTSC.obj
It is displayed on Composite from DAC0 ( Pin0 )

Here's the SDRAM SlideShow demo ;) including source.

http://www.jimbagley.co.uk/P2_SDRAM_SLIDESHOW.zip

Here's the updated PAL/NTSC timings, and also has component option ;)
P2_SDRAM_TV_Driver.spin

Enjoy!
«1

Comments

  • cgraceycgracey Posts: 14,151
    edited 2013-04-25 11:58
    Fantastic! I just downloaded the zip, unzipped it into a directory, clicked on the batch file, and it started running on my DE2-115 board. Looks like you are there, with full NTSC/PAL picture quality! This is good to see.

    Good job on that loader, David! How did you get it to compile to only 80K? I thought all app's for Windows were somehow doomed to bloat up to at least 10x that.

    I take it from the file size that this image is NOT interlaced, Baggers? If not, what could it look like with interlacing, or would it flicker too much?
  • BaggersBaggers Posts: 3,019
    edited 2013-04-25 12:02
    Thanks Chip, yeah, PAL and NTSC is pretty much all taken care of, now that we have interlace also :D

    I couldn't have done it without P2Load! P2Load rocks!! Thanks David :)
  • jazzedjazzed Posts: 11,803
    edited 2013-04-25 12:09
    Command line C and C++ programs can be quite small if you understand how to craft them.
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-25 12:11
    Hi Baggers.

    Changed PAL CON.

    And it function correct on my PAL LCD TV

    Baggers wrote: »
    Hi all,

    You're only allowed 10 attachments to a post, so I couldn't put this on my drivers thread's first post.

    So here is my latest driver :)

    PAL, NTSC, Interlaced or Non-interlaced Composite driver.
    It's 8bit at the moment, but I shall work on a 24bit SDRAM version next.
    You can set the bitmap size to any, and up to the full 720x576 for PAL, and 720x480 for NTSC.

    Let me know if you find this useful :D

    PAL_NTSC.zip

    In the zip is a batch file r.bat, which uses P2Load.exe to load a bitmap to $8000 and palette to $7c00 then the run the P2_PAL_NTSC.obj
    It is displayed on Composite from DAC0 ( Pin0 )
  • BaggersBaggers Posts: 3,019
    edited 2013-04-25 12:33
    Excellent Sapieha :)

    I too am in PAL territory so I knew it worked, but I'm glad it worked on your TV :)

    Chip, If you load the spin program into PNut and set the interlace to 1 you will see the same image ( albeit in half the screen size :D ) It doesn't flicker on my TV
  • cgraceycgracey Posts: 14,151
    edited 2013-04-25 12:51
    I changed it to interlaced mode and it does flicker quite a bit on my TV, particularly where the word "SOFTWARE" is in white, on a black background. That's just how interlaced NTSC looks, though. I think progressive scan is the way to go.
  • BaggersBaggers Posts: 3,019
    edited 2013-04-25 13:04
    Yeah, my TV is more a monitor TV and stores the image and shows it flicker free, looks how it will look in progressive :)
  • pedwardpedward Posts: 1,642
    edited 2013-04-25 13:04
    When anyone says "NTSC" and "interlaced" I immediately think of the Commodore 1084s being driven by an Amiga.
  • BaggersBaggers Posts: 3,019
    edited 2013-04-25 13:20
    What a great monitor the 1084s are :)
  • ColeyColey Posts: 1,110
    edited 2013-04-25 13:25
    I used to have one of those too, they go for quite a bit on Ebay these days ;-)

    Excellent work Jim once again....
  • BaggersBaggers Posts: 3,019
    edited 2013-04-25 13:38
    Cheers matey!
  • evanhevanh Posts: 15,912
    edited 2013-04-25 15:43
    Baggers wrote: »
    Yeah, my TV is more a monitor TV and stores the image and shows it flicker free, looks how it will look in progressive :)

    Next test is try scrolling that. You have the ideal conditions for creating unwanted artefacting - With high contrast edges, low scan rate and the ability to do full 50Hz frame rate. Do a scroller (vertically too) and see how well your deinterlacer handles that. It should display a smoothly moving full resolution text with no separation effect.
  • Cluso99Cluso99 Posts: 18,069
    edited 2013-04-25 17:10
    Nice job Jim! This will come in very handy when I get to the video.
  • BaggersBaggers Posts: 3,019
    edited 2013-04-26 01:04
    I will do evanh :)

    Thanks Ray, enjoy!
  • RaymanRayman Posts: 14,633
    edited 2013-04-26 07:26
    Tried it on my DE0, but I think maybe I don't have enough memory :(

    De0_doom.JPG
    640 x 480 - 137K
  • BaggersBaggers Posts: 3,019
    edited 2013-04-26 08:51
    Rayman, it's DE2 only mate, for big screens, you can do a smaller res one, and it'll work, you will also have to change the memory buffers etc ;)
  • BaggersBaggers Posts: 3,019
    edited 2013-04-26 16:33
    This is what is capable when you have the SDRAM working with this driver :)

    720x576 24bit full pal display :) and having 32MB of ram means lots of room for pictures lol
  • KyeKye Posts: 2,200
    edited 2013-04-26 16:53
    Wow, that look really good!
  • Cluso99Cluso99 Posts: 18,069
    edited 2013-04-26 22:13
    Absolutely superb!!!
  • cgraceycgracey Posts: 14,151
    edited 2013-04-26 22:34
    That looks great, Baggers! It's a far cry from Prop1.
  • User NameUser Name Posts: 1,451
    edited 2013-04-26 22:45
    Seriously. The combination of the Prop2's data acquisition, compute, and display capabilities opens up all sorts of fascinating new ground! I haven't been this excited for the release of a new product in a long time.
  • BaggersBaggers Posts: 3,019
    edited 2013-04-27 00:09
    Thanks Kye, Ray, Chip, and User Name.

    Chip, it certainly is a far cry from Prop1, not that Prop1 was bad, Prop1 was excellent, but this completely blows minds it's awesome, and I keep having to remind myself, this is only a fraction of it's power! :)

    This demo was only two cogs!
  • BaggersBaggers Posts: 3,019
    edited 2013-04-27 02:55
    Added source zip to the P2_SDRAM_SLIDESHOW demo in top post. ;)

    Enjoy!
  • potatoheadpotatohead Posts: 10,261
    edited 2013-04-27 18:43
    Excellent! I just got back into town. Couldn't wait to run this one!

    Coupla things I noticed:

    -P2Prep no longer runs as an XP application. I moved to my win7 machine and all was good. Not sure how many are using XP...

    -For NTSC non-interlaced displays, it's best if the number of scan lines is odd to avoid color fringing and artifacting. I made this change:
    NTSC_AF         = (NTSC_FULL/2)-FRAME_YSIZE-NTSC_BF+1
    

    and attached a few pictures. This proved to be hard to capture on camera. To the eye, it's obvious, but getting a good exposure time ended up kind of tough. Hopefully, this difference can be seen easily... The amber pictures are taken from a high bandwidth CRT. ~800 lines or so horizontal.

    The slideshow is pure awesome, and I'm gonna add component to this driver when I can tomorrow. :)

    There is some slight image alignment problem at the very top of some of the images in the slideshow. Not sure why this is yet, and I need to check a few displays. Are you guys seeing this, and are you using analog or digital displays? So far, I've used analog.

    Man, the images are sweet to see!
  • BaggersBaggers Posts: 3,019
    edited 2013-04-27 19:29
    Thanks for that update Doug, glad you like it :D

    I'll have to commandeer my daughter's analogue TV tomorrow to test it ;) as I don't have one in my room.

    Look forward to seeing it composite also :)
  • potatoheadpotatohead Posts: 10,261
    edited 2013-04-28 16:42
    My digital display renders this just fine, as do my capture devices.

    IMHO, the tearing is graphics being in the first few scan lines. I see a few at the bottom of the frame. Might be good to move the image down, say three or four scan lines.
  • potatoheadpotatohead Posts: 10,261
    edited 2013-04-28 19:02
    Here is the component modification for the base driver code. (see post below this one)
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-28 19:19
    Hi potatohead.

    Function on my real PAL LCD TV

    potatohead wrote: »
    Here is the component modification for the base driver code. It's the one for the DOOM picture. I'll get the slideshow one done in a bit. (just got sent on one of "those errands...") :) I really want to see the slideshow pictures on component too...

    I would really appreciate somebody testing this on a PAL capable display. I don't have one. Looks like it works, but... it might not.

    Just rename the existing one, drop this in, run Pnut to build the obj, then run the bat file. This one just adds component option to the existing PAL / NTSC / interlace options, no other changes. (and it's very cool that we have a combined driver that works everywhere now)
  • potatoheadpotatohead Posts: 10,261
    edited 2013-04-28 20:06
    Nice. Thank you.
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-28 20:08
    Ho potatohead.

    No problem.

    My PAL LCD TV -- don't accept anything that are NOT 100% PAL compatible
    potatohead wrote: »
    Nice. Thank you.



    Ps.

    Correct 100% timed NTSC shows as Gray shades
Sign In or Register to comment.