Shop OBEX P1 Docs P2 Docs Learn Events
Converting component/VGA & audio to HDMI on P2 — Parallax Forums

Converting component/VGA & audio to HDMI on P2

roglohrogloh Posts: 6,140
edited 2025-11-13 13:46 in Propeller 2

@cgracey I heard from @Tubular that there was some discussion today in the live forum about doing a component to HDMI board using a MacroSilicon product. It turns out that I've recently worked on exactly this. It was buried in the Logicon thread a couple of pages back from now but I have used a MacroSilicon chip to do the conversion and created a 40x20mm sized P2 breakout board that converts from VGA or component to HDMI (with audio). I now have this board working with audio, and here are some more details.

The MS9288A chip datasheet was unavailable online so I first used a Simplecom CM201 to figure out the general connection requirements and also later discovered more information online linked below regarding the connections to the device. I then created a schematic from following all of that and constructed a breakout board using it. The CM201 had a position for an EDID chip which has not been included due to pin limits of the 8 bit breakout, although if you used component video or SoG or Composite Sync it would free 2 more pins which could be used for I2C. IMO it would ideally read this information from the attached device not just from a local EDID chip.
https://github.com/Nold360/LibreHDMI
https://circuit-board.de/forum/index.php/Thread/32541-Analog2HDMI-vs-Wii2HDMI-MS9288A/?pageNo=1

According to the pin connections there also may be some potential to run external firmware probably from some I2C flash/eeprom but I didn't use that as I don't know anything about it, so it just runs the internal firmware which already does the conversion by default so this chip appears to operate automatically without requiring access to registers etc. Whether it has any useful registers accessible via I2C and what exactly they can do I'm not sure. The block diagram does mention system/register configuration so there may be some control over its functionality, and/or a pass through to the DDC of the target monitor attached to HDMI. But all that is a TBD.

My P2 IO interface is currently:

  • HSYNC, Blue, Green, Red, VSYNC (5 pins)
  • HDMI CEC (1 pin)
  • L&R audio (2 pins)

If I2C was found to very useful I think a possible alternative 8 IO pin P2 interface could be:

  • HDMI CEC (1 pin), or Composite Sync for VGA instead of CEC - best if (solder) jumper selectable?
  • RGB or YUV (3 pins using SoG)
  • I2C SDA/SCL (2 pins)
  • L&R audio (2 pins)

Here is the schematic I used:

Here is the board render/layout:

Here is the first PCB I received being populated & cooked, checked, tested:







The connections were thankfully okay and it worked fine first go including audio which I tested on a small LCD screen with HDMI and headphone jack output. I ran @Wuerfel_21 's Spin Hexagon game with it outputting to small speakers initially. I've not yet tried component or SoG, although in theory it can do that too. I've tried various typical resolutions and they all worked with my Dell monitor specifically including:

  • VGA
  • SVGA
  • XGA
  • SXGA
  • 1080p

How dependent on standard video timing this chip is vs how much the blanking and pixel clocks can be varied, I'm still not sure as I've not been looking at that aspect. I've also not yet attached it to my plasmaTV which we know is rather fussy with its audio source format etc. I've got to try to do that soon as well.

Also somewhat related to this and as probably mentioned somewhere in the Logicon thread I'm planning on making a separate board also using the MS9288A that takes VGA via my home-grown USB-C "Alternate mode" cable and converts it to HDMI and outputs to a display device with audio. I've already layed out a small board that does this, and it also carries regular USB to the handheld device for programming/downloads etc. Here's a render of what that looks like right now. The source VGA is still passed through from USB-C to DE-15 (via a triple video buffer device) as well as the converted HDMI.

Comments

  • roglohrogloh Posts: 6,140
    edited 2025-11-13 13:53

    Just tried out feeding this chip some RGBS video (instead of RGBHV) and nothing was being displayed on my LCD HDMI monitor so it doesn't seem to support that and it apparently requires both H&V sync to be present, however the 3 pin Sync-on-green option worked with my driver. The colours seemed a little different with SoG (I need to check more) so it may require further work getting the right colourspace converter settings to setup the levels that balance the colour the same as RGBHV....TBD.

    Given RGBS doesn't work, it may make sense to create a breakout board like this - this would allow either I2C access with SoG/component video only or full RGBHV video with no I2C. RGBHV drivers are a little more standard to implement than fiddling with the green levels (and so it's more compatible with existing P2 video drivers) although the P2 HW can of course output either type. Green channel's dynamic DAC range may get compressed with SoG and this could be why the colours are being messed up a bit.

    8 P2 signals -

    • SDA or HSYNC (jumper)
    • RGB (3 pins)
    • SCL or VSYNC (jumper)
    • CEC
    • Left DAC
    • Right DAC
  • Can you try with the Sync-On-Green settings I have in my driver?
    Last I checked those worked properly. There should be no dynamic range compression, because the DAC range is 1Vpp and the RGB video range is 0.7Vpp (as usual with VGA) - the remaining 0.3V becomes the sync pedestal. You may need to put the other channels on the same pedestal if the converter chip is bung.

  • RaymanRayman Posts: 15,821

    @rogloh So it works? That is nice.

  • roglohrogloh Posts: 6,140
    edited 2025-11-13 23:34

    @Rayman said:
    @rogloh So it works? That is nice.

    It appears to work, yep :smile: Still testing a few more things like audio -> Pioneer HDTV and more pixel clocks, plus true component, but the chip is spec'd for taking component or RGB so it should be fine.

    @Wuerfel_21 said:
    Can you try with the Sync-On-Green settings I have in my driver?
    Last I checked those worked properly. There should be no dynamic range compression, because the DAC range is 1Vpp and the RGB video range is 0.7Vpp (as usual with VGA) - the remaining 0.3V becomes the sync pedestal. You may need to put the other channels on the same pedestal if the converter chip is bung.

    I'll try later today when I get a chance. If your driver still uses really tight timing it may have issues, but if it uses regular VGA for example it should be good.

    I also want to retest RGBS again but with sync at logic level instead of 0.7Vpp in case that mattered for the device.

    Also I noticed in my schematic that audio coupling cap seems mighty low at 1nF. I would not normally have selected something that small, I think it was 1uF in reality, but now I'm worried about what was actually loaded into my board??? In general I'm not 100% sure on the audio levels with this circuit, and the resistors and caps there might need tweaking for optimal sound. EDIT: Just checked and it looks like I loaded 1nF by blindly following my schematic with that error. I'll have to swap those out I suspect.

  • Wuerfel_21Wuerfel_21 Posts: 5,705
    edited 2025-11-13 23:41

    @rogloh said:
    I'll try later today when I get a chance. If your driver still uses really tight timing it may have issues, but if it uses regular VGA for example it should be good.

    I also want to retest RGBS again but with sync at logic level instead of 0.7Vpp in case that mattered for the device.

    Emulator/VNG's VGA/Soggy Line2x timing should be to VGA spec. Can do RGBHV(VGA), RGBS (CSync), Sync-On-Green RGB and YPbPr (in Rec. 601 and Rec. 709 flavours). Though some games really want 512 horizontal samples instead of 640. (Trials of Mana on MisoYume is a good test because it uses hires fonts, I think I talked about that before). I'd be interested in how it deals with that. A lot of ADCs deal poorly with this and the pixels become ugly. Also try Line3x mode (-> 720p-ish). I used to have Line4x and Line5x in the older drivers, but I got lazy and never ported them to the new VNG driver. But maybe that'll be important with a setup like this.

Sign In or Register to comment.