Author Topic: Donkey Kong Direct Feed How-To  (Read 35685 times)

0 Members and 1 Guest are viewing this topic.

Offline YesAffinity

  • Spring Jumper
  • *
  • Posts: 578
    • Awards
Donkey Kong Direct Feed How-To
« on: September 07, 2015, 10:47:06 am »
Okay, so here's an attempt to fully detail the process of getting a direct video and audio feed from the unused edge connector on a DK PCB.  I have double checked and triple checked the schematic, but if you see something that doesn't seem to make sense, call me out on it.  Note, this only applies to 2-board DK sets, which have an unused edge connector.  Would also apply to any other Nintendo board set that has an unused edge connector.  WILL NOT work for DK 4-board sets, due to lack of that edge connector.

This is piggy-backing off my previous thread working through the development, which I won't fully recount here but may add some additional insights to hopefully help others avoid some of the pitfalls I ran into:

https://donkeykongforum.net/index.php?topic=1315.0

Please also see Xelnia's thread on minimum requirements for submitting direct feed scores:

https://donkeykongforum.net/index.php?topic=1411.0

Attached here is a schematic of how everything wires together.  All leads from the inverter/amp board, encoder and synce cleaner, at the 44-pin Edge Connector have to be soldered.  The 44-pin Edge Connector then plugs onto the unused connector on your DK board.  All connections at the inverter/amp board, encoder and sync cleaner are pre-fabbed connectors that come with their respective device.  Make sure you test voltages on the power connectors, at the non-PCB end of the connectors, before plugging them into the inverter/amp board, encoder and sync cleaner.  Double check all your video signal, audio signal, syncs and grounds on the signal connectors.  If you reverse blue and green or some such, it's not the end of the world.  If you put 12V into a 5V component, it could be the end of that component.  If you put 12V onto a video signal line, I'm not sure what would happen, but I can only imagine it wouldn't be good.

The basic components are:

Mike's Arcade 44-pin Edge Connector w/ Solder Eyelets: https://www.mikesarcade.com/cgi-bin/store.pl?sku=CEC44

Mike's Arcade Nintendo Inverter Board and Sound Amp: https://www.mikesarcade.com/cgi-bin/store.pl?sku=NININVAMP
I strongly recommend getting the 7P SOU power connector, when order the inverter board.  This connector allows you to get power for the inverter board directly from the unused 7P SOU connector on the cabinet power supply.  Note, this is only true for stand-up cabinets.  Cocktail cabinets use the 7P SOU connector on the power supply.

Jrok v4.1 Encoder: http://www.jrok.com/hardware/RGB.html
There are a handful of resellers of these online.  Search the interwebs, and you will find the 2 or 3 retailers that stock them.

Jrok Sync Cleaner: http://www.gatorcade.com/rgbconverter.html
Gatorcade offers both the encoder and the Sync Cleaner, as you can see.

Other things needed:
Solder iron and other soldering accessories, ~15W solder iron recommended
Wire strippers for 22-24 gauge wire
Crimpers for 22-24 gauge wire
Spare 22-24 gauge wire
Butt connectors for 22-24 gauge wire
Multimeter

Recommendation for Capture Device, to get encoder output to something that can stream to twitch:
This proved to be very tricky.  The output from the encoder works with multiple monitors and TVs that I own, but finding a PC capture device was another story.  I finally bought a Hauppauge WinTV PVR USB2 extenal PC capture device, which is supported in Windows 7* 32-bit (model number 29xxx is only supported in Win7 32-bit, model number 24xxx should work in 32-bit or 64-bit).  The WinTV I found online did not come with any cables or the power supply.  A USB cable is easy enough to get, and fortunately, Hauppauge still sells the power supplies.  Just contact Hauppauge support, and they will send you a link to purchase one.

*Not sure if these same statements are true for Windows 8 or 10.  Neither are noted as being supported on the Hauppauge driver download site.

JROK also recommended a Sabrent PCI video card (TV-PCIRC TV Tuner Video Capture Card), which I purchased but have yet to test.  This card only runs under Windows XP.  Windows 7 wouldn't even detect that it was installed.  One clue which Jrok offered, which might help anybody trying to get this final piece of the puzzle working: "it has the Philips or NXP chipset and that's great for capture".

In order to stream to Twitch via OBS, I had to do the following:
1) Open WinTV PVR USB2 in VLC* (http://www.videolan.org/vlc/index.html)
2) Setup OBS to do a screen capture on my first monitor, with OBS open on a second monitor
3) Setup a webcam in OBS, and mess with the OBS display setting so the webcam shows in the corner and doesn't obstruct the screen capture; also adjust the latency in the OBS settings for the webcam, I had to set it to 600ms "delay" so the webcam and PCB feed are closely timed, the delay is due to the processing in the capture device and probably some processing within my PC too
4) Stream in OBS to Twitch
5) I also eventually disabled the webcam mic, because although I was able to delay the webcam video to closely match the direct feed video, the mic audio was not delayed so you would hear the non-feed audio and button smashes and such ahead of the direct feed audio and webcam video

It may be possible to find a capture device that works with the encoder's output signal and opens and plays the direct feed in its own software, and that would probably eliminate some complexity of using VLC.

*I am not going to provide step-by-step for VLC setup.  There are tuts online, an opening a capture device isn't too difficult, but one thing I will offer: when you "open capture device" in VLC, there is an Advanced Options button at the bottom of the menu.  Click on that button, and within that menu, check "Device Properties" and "Tuner Properties".  This will cause configuration menus to open after you "Play" the device, and allow you to tweak whatever settings are available through the device driver.  This is particularly important because the capture device will likely be pulling tuner or composite video by default, and if you want s-video or something other than the default, you will have to change it in one of the options within these Device and Tuner Properties.

Some of the complications I ran into throughout the dev process:
-Jrok encoder wasn't working initially.  Jrok eventually replaced it.  This cost me at least a month of troubleshooting in spare time.
-Mike's arcade 7P SOU cable was mis-pinned, MA replaced it, but then wires on the replacement frayed where they enter the connector that plugs into power supply.  I ended up jimmy-rigging the first connector to power the inverter board.
-Various butt connections weren't getting good continuity.  I recommend testing all connections for continuity every step of the process, including "tugging" on butt connections while testing continuity to make sure there aren't some intermittent continuity issues once you start hooking things up in your cabinet.  Also, I recommend testing voltages at power connectors, with the cabinet powered on, but before plugging them into their respective devices (i.e. the inverter board, jrok encoder, sync cleaner), to ensure you are getting the correct voltage.  Remember, this is all DC voltage.
-Getting a PC to install Windows XP, in order to test the Sabrent card proved extremely challenging.  I have IT certs, so am pretty knowledgeable in this sort of thing.  Nonetheless, setting up a working XP PC was challenging and very time consuming.
-Reiterating that Windows XP is not supported by xsplit, OBS or any other streaming program that I found.  If the Sabrent card actually works, it will be necessary to open the card and stream a UDP stream in XP, using VLC, then capture the stream with Windows 7 VLC, then do a screen capture with OBS, and proceed with steps 2-4 above.
-General recommendation: test voltages at the unused PCB edge connector so you know what you need to solder to on the 44-pin edge connector, then label the edge connector with a Sharpie.  The pinout schematic for the edge connector is in the attached PDF, and a clean pinout (for TKG4 boards) can be found here: https://www.mikesarcade.com/cgi-bin/spies.cgi?action=url&type=pinout&page=Nintendo_Classic.html

Lastly, it may be possible to reduce the parts needed by using the Mike's Arcade Nintendo to JAMMA adapter, effectively making the 44-pin edge connector and the inverter/audio board one piece: https://www.mikesarcade.com/cgi-bin/store.pl?sku=NIN2JAMMA..  I was going to go this route initially, but MA was backordered on power connectors for this guy when I was starting to put all my parts together, and frankly, I was impatient.

If I've forgotten any details that anybody wants to know, let me know.  I'm sure I'll think of some other things, and will post when I do.
« Last Edit: December 13, 2016, 06:49:39 pm by YesAffinity »
Matthew 21:22

DK Arcade PB (verified): 970,200 KS
DK Start PB (verified): 126,600
DK L1-1 PB (verified): 11,400
DK PB 1st Man: 622,000

Donkey Kong Direct Feed How-To - http://donkeykongforum.net/index.php?topic=1413.0
^Now outdated, see instead: http://donkeykongforum.net/index.php?topic=2471.0
Member for 9 Years DK Killscreener Blogger Twitch Streamer

Offline YesAffinity

  • Spring Jumper
  • *
  • Posts: 578
    • Awards
Re: Donkey Kong Direct Feed How-To
« Reply #1 on: September 07, 2015, 12:18:16 pm »
:update: I tested the Sabrent PCI capture card, and it works.  As described above, the setup is as follows:

1) XP machine with Sabrent PCI card, capturing direct feed from DK cab
2) Using VLC to capture on XP machine
3) Using VLC to send a UDP stream to Windows 7 machine
4) Using VLC on Windows 7 machine to intercept UDP stream from XP machine

The Sabrent card appears to only offer 320x240 capture (I only tested s-video).  I was also not getting audio in the stream.  I messed around with settings on the "send" side of the stream, but could not get audio working.  I did not connect speakers to the XP machine, however, so its possible there an issue with the capture card itself.

The ultimate outcome, which is preventing me from spending more time on the Sabrent card, is the video is no better than what I'm capturing with the Hauppauge WinTV PVR, on my Windows 7 32-bit machine.   There exists in the output from either device some glitchiness in the video and audio, as can be seen on my first posted capture stream (http://www.twitch.tv/yesaffinity/v/14322891), and recently posted L1-1 PB score (http://www.twitch.tv/yesaffinity/v/14787741).  The L1-1 PB posting was actually worse in terms of audio glitchiness due to a setting that I found in VLC for "link related streams" which I have since been disabling for slightly better results.  The added complexity of streaming from one computer to another AND THEN streaming with OBS to Twitch offers no benefit.

I may screw around with the Sabrent card and try again to get it working on the Windows 7 machine, but I think that's for another day.
Matthew 21:22

DK Arcade PB (verified): 970,200 KS
DK Start PB (verified): 126,600
DK L1-1 PB (verified): 11,400
DK PB 1st Man: 622,000

Donkey Kong Direct Feed How-To - http://donkeykongforum.net/index.php?topic=1413.0
^Now outdated, see instead: http://donkeykongforum.net/index.php?topic=2471.0
Member for 9 Years DK Killscreener Blogger Twitch Streamer

Offline YesAffinity

  • Spring Jumper
  • *
  • Posts: 578
    • Awards
Re: Donkey Kong Direct Feed How-To
« Reply #2 on: October 01, 2015, 05:21:24 am »
Another quick update, as I've found a useful piece of video capture software.  In my continual search for an improved direct feed capture setup, I came across Blue Iris capture software.  Among its many features, there are three that have made the $30 purchase worthwhile: forcing 640x480 capture, video delay and interlacing.  The video is now cleaner than it ever has been, and the video and both audio feeds are relatively synced (audio from direct feed and audio from web cam).  I will not be satisfied until I find a good solution that is capturing from the component video, but this will hold me over for a bit while I continue that search.

http://www.twitch.tv/yesaffinity/v/18616390

It seems odd that the audio was playing before the video, but it was necessary to do so in order to get things syncing.  The final delay settings are:

Direct feed video (Sabrent PCI capture card, via Blue Iris software): 300ms
Direct feed audio (line in at Audigy FX PCI-E sound card): 200ms
Webcam video: 150ms
Webcam audio: -200ms

Conclusions: Direct feed audio lags more than the direct feed video.  I wouldn't have thought this, given the processing that has to go on at the Sabrent card, and considering PCI vs PCI-E.  I'm not even sure how it's possible to have negative delay, but possibly setting webcam audio to a -200ms delay is countering some native delay that OBS has "built in", in an perceived effort to sync a/v.
Matthew 21:22

DK Arcade PB (verified): 970,200 KS
DK Start PB (verified): 126,600
DK L1-1 PB (verified): 11,400
DK PB 1st Man: 622,000

Donkey Kong Direct Feed How-To - http://donkeykongforum.net/index.php?topic=1413.0
^Now outdated, see instead: http://donkeykongforum.net/index.php?topic=2471.0
Member for 9 Years DK Killscreener Blogger Twitch Streamer

Offline YesAffinity

  • Spring Jumper
  • *
  • Posts: 578
    • Awards
Re: Donkey Kong Direct Feed How-To
« Reply #3 on: November 03, 2015, 08:06:01 pm »
This has been a while on the to-do list, and I finally got the courage to do it, with great results.  I splurged on a Anchor Bay Iscan DVDO VP30 video processor, to get a better picture and audio out of the direct feed setup.  These are commonly for sale on ebay, but the prices can be all over the board.  Finally some came up for sale that are a decent price AND include the power supply.  For the record, navigating the front panel menu us super simple, and is only necessary if the monitor you are outputting to doesn't immediately display the output from the VP30 (which mine didn't, cuz it's a funky Chinese HDTV).

Anyhoo, the output from the jrok encoder is successfully being scaled to 1080i-60 and 1080p-60, along with analog audio from the cabinet, all via HDMI. 
« Last Edit: November 03, 2015, 08:07:53 pm by YesAffinity »
Matthew 21:22

DK Arcade PB (verified): 970,200 KS
DK Start PB (verified): 126,600
DK L1-1 PB (verified): 11,400
DK PB 1st Man: 622,000

Donkey Kong Direct Feed How-To - http://donkeykongforum.net/index.php?topic=1413.0
^Now outdated, see instead: http://donkeykongforum.net/index.php?topic=2471.0
Member for 9 Years DK Killscreener Blogger Twitch Streamer

Offline YesAffinity

  • Spring Jumper
  • *
  • Posts: 578
    • Awards
Re: Donkey Kong Direct Feed How-To
« Reply #4 on: November 03, 2015, 08:06:45 pm »
...and, the VP30 itself.

My next stop will be a HDMI capture device capable of 60fps capture.  I had plenty of hiccups with capturing video directly from the jrok board (as outlined earlier in this thread), but with the video cleanly processed via the VP30, any off-the-shelf HDMI capture device should have no issues with it.

More to come on that as my finances permit.  ;)
« Last Edit: November 03, 2015, 08:10:12 pm by YesAffinity »
Matthew 21:22

DK Arcade PB (verified): 970,200 KS
DK Start PB (verified): 126,600
DK L1-1 PB (verified): 11,400
DK PB 1st Man: 622,000

Donkey Kong Direct Feed How-To - http://donkeykongforum.net/index.php?topic=1413.0
^Now outdated, see instead: http://donkeykongforum.net/index.php?topic=2471.0
Member for 9 Years DK Killscreener Blogger Twitch Streamer

Offline YesAffinity

  • Spring Jumper
  • *
  • Posts: 578
    • Awards
Re: Donkey Kong Direct Feed How-To
« Reply #5 on: November 10, 2015, 08:48:33 pm »
The promised land has finally been reached.  Sending the direct feed signal from the TKG4 PCB, a Anchor Bay VP30 is processing the video output from the Mike's Arcade Inverter Board->Jrok Sync Cleaner->Jrok Encoder v4.1, and scaling it to 1080p60.  A Avermedia Game Broadcaster HD is capturing the VP30 output at 1080p30.  VLC is displaying the capture card output on a 1080p monitor, and OBS is monitor capturing, as well as audio capturing (line in at my Creative X-fi sound card) and webcam capturing, then streaming it all at 1080p60.

http://www.twitch.tv/yesaffinity/v/25174027
Matthew 21:22

DK Arcade PB (verified): 970,200 KS
DK Start PB (verified): 126,600
DK L1-1 PB (verified): 11,400
DK PB 1st Man: 622,000

Donkey Kong Direct Feed How-To - http://donkeykongforum.net/index.php?topic=1413.0
^Now outdated, see instead: http://donkeykongforum.net/index.php?topic=2471.0
Member for 9 Years DK Killscreener Blogger Twitch Streamer

Offline f_symbols

  • Spring Jumper
  • *
  • Posts: 835
  • wht u mean
    • Awards
Re: Donkey Kong Direct Feed How-To
« Reply #6 on: November 11, 2015, 07:25:54 am »
man this is so hot, would make a grown man cry  <Billy>

Thanks again for doing all of this R&D mate
Member for 11 Years IGBY 2016 DKF Team Member Winner of a community event Former DK Remix World Record Holder DK Remix Killscreener IGBY 2015 DKF Team Member DK 1M Point Scorer IGBY 2014 DKF Team Member Blogger DK Killscreener Twitch Streamer

Offline tilt

  • Global Moderator
  • Elite Member
  • *
  • Posts: 304
  • Repair man of DKF
    • Awards
Re: Donkey Kong Direct Feed How-To
« Reply #7 on: November 11, 2015, 07:53:47 am »
Wow!  Looks like we finally know how  <Billy> did it, love the HD upscaling Kreygasm
My stream is currently (http://www.twitch.tv/expandedidea/)
PB(s):
Donkey Kong: 1,116,400 (KS)
Donkey kong Hard roms(prev. world record): 914,200
Crazy Kong: 513,700 (KS)
Member for 10 Years DK 1.1M Point Scorer snek IGBY 2016 DKF Team Member DK 1M Point Scorer IGBY 2015 DKF Team Member CK Killscreener DK Killscreener IGBY 2014 DKF Team Member Blogger Twitch Streamer

Offline YesAffinity

  • Spring Jumper
  • *
  • Posts: 578
    • Awards
Re: Donkey Kong Direct Feed How-To
« Reply #8 on: November 11, 2015, 08:29:26 am »
man this is so hot, would make a grown man cry  <Billy>

Thanks again for doing all of this R&D mate

It's been a 6-month road, and not without some frustrations, but definitely fun overall.  Hope this helps any others that want to do the same, and anybody who is, please don't hesitate to post on this thread or PM me for any help needed along the way.

I have in my head that I'll provide a flow chart of the two "signal paths" I was able to prove, low def and high def, and maybe if others follow suit and prove other "post-cabinet" hardware like capture devices, that chart will expand with time.  :)
Matthew 21:22

DK Arcade PB (verified): 970,200 KS
DK Start PB (verified): 126,600
DK L1-1 PB (verified): 11,400
DK PB 1st Man: 622,000

Donkey Kong Direct Feed How-To - http://donkeykongforum.net/index.php?topic=1413.0
^Now outdated, see instead: http://donkeykongforum.net/index.php?topic=2471.0
Member for 9 Years DK Killscreener Blogger Twitch Streamer