P2 --> Arcade Monitor
Rayman
Posts: 14,754
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.
Comments
Think it's all good now. Here's the driver.
Nice work
Nice work Ray. We seem to have a run of arcade cabinets running. This is good for P2.
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.
Excellent Ray!
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.
You should be able to use the CSC for inverting the color channels.
@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...
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).
Yes. Just set the color transform to a negated identity matrix and off you go.
@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/
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...
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!
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.