Shop OBEX P1 Docs P2 Docs Learn Events
P2 --> Arcade Monitor — Parallax Forums

P2 --> Arcade Monitor

RaymanRayman Posts: 14,754
edited 2021-10-24 21:40 in Propeller 2

Almost have it! Turning the simple VGA driver into a simple Arcade monitor driver.

Some differences:
1. Super low resolution, starting with 288x240 (15 kHz horizontal refresh, 5.533 MHz pixel clock)
2. Composite and inverted Sync (both HSync and VSync on same pin and normally high)
3. Inverted video (This old Nintendo monitor has inverted video for some reason)
4. 5V signal level. (This turns out not to be an issue so far, works at 3.3 V)

The 5V signal level was no problem for sync. Did take some work for video though as had to change DAC to 3.3V range and disable the level scaling to get black at 3.3 V.

ToDo: Fix the video during sync to be black to get rid of white borders.

756 x 1008 - 188K
756 x 1008 - 88K

Comments

  • Nice work

  • PublisonPublison Posts: 12,366
    edited 2021-10-25 16:56

    Nice work Ray. We seem to have a run of arcade cabinets running. This is good for P2.

  • RaymanRayman Posts: 14,754

    Think I have a better understanding of how the VGA driver actually works now after getting into this...
    The color is black during sync now.

    756 x 1008 - 72K
    756 x 1008 - 116K
  • ColeyColey Posts: 1,110

    Excellent Ray!

  • RaymanRayman Posts: 14,754

    This is already useful as a test pattern generator, but thinking about what else I can do with P2 for the arcade monitor...

    Could make a P2 Jamma board that could play games with. @Baggers has the space invaders type games going, so adding those games doesn't look too hard.
    But, I already have Mame working with it via a PC.
    Maybe better as a way to create our own games, or adapt games from Github.

    The test pattern has shown me that my video inverter board isn't working perfectly. Adds a leading highlight and a trailing shadow...
    If can't fix that, could use P2 to capture the input video with ADCs and then output inverted with this driver.
    That's probably overkill though. The existing board is just six transistors and some passives, should be able to fix it.

  • Wuerfel_21Wuerfel_21 Posts: 5,106
    edited 2021-10-25 20:06

    The test pattern has shown me that my video inverter board isn't working perfectly. Adds a leading highlight and a trailing shadow...
    If can't fix that, could use P2 to capture the input video with ADCs and then output inverted with this driver.
    That's probably overkill though. The existing board is just six transistors and some passives, should be able to fix it.

    You should be able to use the CSC for inverting the color channels.

  • RaymanRayman Posts: 14,754

    @Wuerfel_21 Do you mean the Color Space Converter? That'd be neat if it does that. I've only seen it used to vary intensity with VGA.

    That would definitely make it easier to switch between inverted and non-inverted video.
    Would have also made the driver easier to do...

  • RaymanRayman Posts: 14,754

    The P2 seems like it should be a good fit for making a JAMMA game PCB.
    With this low resolution, should be able to work in 24-bit color (or at least 16-bit color).

  • @Rayman said:
    @Wuerfel_21 Do you mean the Color Space Converter? That'd be neat if it does that. I've only seen it used to vary intensity with VGA.

    That would definitely make it easier to switch between inverted and non-inverted video.
    Would have also made the driver easier to do...

    Yes. Just set the color transform to a negated identity matrix and off you go.

  • RaymanRayman Posts: 14,754

    @Wuerfel_21 I just peeked at the docs and didn't immediately see how to do that.... Any tips?

    I found an Eagle layout from somebody who did something similar:
    https://basementhobbies.wordpress.com/uzebox-jamma/

  • Wuerfel_21Wuerfel_21 Posts: 5,106
    edited 2021-10-25 21:33

    @Rayman said:
    @Wuerfel_21 I just peeked at the docs and didn't immediately see how to do that.... Any tips?

    • set CSC up like this: (I think)
    setcmod #%01_1_111_0
    setcy ##$000080FF
    setci ##$008000FF
    setcq ##$800000FF
    
    • the way the sync channel works is different from raw mode (only bit 0 is used)
  • RaymanRayman Posts: 14,754
    edited 2021-10-30 19:37

    Just tried the above color converter settings and does appear to work.
    Did have to invert sync constants and change them from 8 bit to 1 bit.

    @Wuerfel_21 Is there a set of color converter settings that would change this inverted video back to regular video?

    It would be nice to be able to invert the video by just changing things in the color converter settings instead of both in the palette and the sync constants...

  • RaymanRayman Posts: 14,754
    edited 2021-10-30 22:02

    Tried connecting that inverted video (via color converters from @Wuerfel_21) directly to Sanyo EZ20 monitor.
    Sorta worked, but did something strange with the colors...

    Blue turned red, red turned blue, green and white boxes are missing.
    Very strange!

  • RaymanRayman Posts: 14,754

    Here's code for non-inverted video that gets connected to the Nintendo video inverter board before going to the Sanyo arcade monitor.
    Seems to work fine. The inverter also has pots on it which seem to be correcting for the 3.3 V signal level when adjusted.

Sign In or Register to comment.