Shop OBEX P1 Docs P2 Docs Learn Events
composite video driver? — Parallax Forums

composite video driver?

Hey all been away from the P2 for a while now. I'm trying to do some simple composite video on one pin. I know I had done it before but I cannot find any of the old drivers like I used before. Like Johnny mac's jm_ntsc.spin2 driver. I've looked all over and cannot find one. Does anyone know of one that I can just draw lines and text from one output pin. I know the P2 can do it with a smart pin but there is no way I can start from scratch. Looks like all his old programs are no longer available.

Comments

  • PNut comes with an NTSC sample driver by Chip, but that only does bitmaps, you have to figure out the rest from there, but the code is rather simple. It also has severe problems with the video levels and therefore doesn't work on every TV properly.

    @rogloh has a nice multi-format video driver that can do text modes. Don't recall where the latest version for that one is, but if I annoy him with a mention he'll surely inform us. That one also had (far lesser) problems with the video levels / color matrix, but the version I keep copying between projects had that fixed, don't remember if he mainlined that.

    The video driver I made myself is sadly in a "if you know you know" kind of state where it doesn't exist as a generic library and I wouldn't recommend messing with it to beginners.

  • evanhevanh Posts: 16,813
    edited 2025-10-19 23:01

    Here's the doc for Roger's big-Smile driver. Latest version is 0.93 I think. Read the section on Initialisation.
    EDIT: The topic - https://forums.parallax.com/discussion/170676/p2-dvi-vga-driver/p1

  • roglohrogloh Posts: 6,090
    edited 2025-10-19 23:34

    Yeah a low level driver can be found in the first post of this thread. I am in the (seemingly endless) process of altering the driver to split off an HDMI variant (incomplete) and it would also get some more recent composite related colour improvements suggested by Ada which are still to go in but none of that stuff has made its way into the original(s).
    https://forums.parallax.com/discussion/170676/p2-dvi-vga-driver/p1

    Much of the PAL/NTSC stuff was done way back in the early days and probably lots of it (including any demos) got buried in the video driver thread(s). The more recent text driver could potentially work with NTSC/PAL but has been written for DVI/VGA and needs some alterations to suit that. It could be altered to do NTSC/PAL with some adjusted API parameters.

    I did find an older demo which was setup for SVIDEO that I patched for composite that could be helpful and you can mess with (included in the attached zip file). Supports composite NTSC or PAL graphics and text regions but the colours may be too saturated for NTSC. You can try to tweak the settings in the color space converter if you are game and know what you are doing (I probably didn't at the time). This demo comes with an older version of my p2 video driver and the APIs have been slightly extended since but you could probably take a later p2videodrv file and tweak the demo file to in order to update it if needed.

    I thought I had more legacy demos from which I could provide something else to you here but not much is working correctly here ATM and stuff probably depended on outdated driver versions as well. Also right now I seem to have a bad mains earth level between my monitors and a Mac-USB-PropPlug path causing major headaches in testing any video stuff or audio (severe hum) without crazy issues/corruption appearing. Trying to get to the bottom of that. Might have to crawl about and move some powerbricks around behind the desk.

Sign In or Register to comment.