Let's talk SNES HDMI (analog based)

The place for all discussion on gaming hardware
User avatar
RGB32E
Posts: 1400
Joined: Thu Nov 05, 2009 12:50 am

Re: Let's talk SNES HDMI (analog based)

Post by RGB32E »

Thanks!
Woozle wrote:I have it wired up to my snes mini. I tried removing the snes crystal and clocking it from the FPGA, it didn't work and the SNES never booted up. I'm not sure if it's a 3.3v -> 5v issue or something else. I put the original crystal back in the SNES and right now I'm getting the clock signal off of cart pin 1 as an input to the FPGA.
Hope you sort that out! Using the SNES clock is the default scenario you've been using thus far?
Woozle wrote:For some reason csync isn't working
...
I can sample analog video and all three color channels seem to work fine, but without csync I'm having trouble doing anything meaningful with the video data.
http://shmups.system11.org/viewtopic.ph ... 27#p865727

You could buffer the CSYNC signal from the S-CPUN using the one of the channels on the THS7374 before feeding it to the LMH1980.
Woozle
Posts: 232
Joined: Wed Jun 24, 2015 8:27 pm
Location: Florida

Re: Let's talk SNES HDMI (analog based)

Post by Woozle »

I got it from the chip. I didn't realize it was accessible from a nearby via. Thanks. I have the lmh1980 set for 75ohm sync input, I'm guessing that's incorrect for the SNES?

Non-amped csync looks great on my oscilloscope. I might try that next.
User avatar
bobrocks95
Posts: 3663
Joined: Mon Apr 30, 2012 2:27 am
Location: Kentucky

Re: Let's talk SNES HDMI (analog based)

Post by bobrocks95 »

Woozle wrote:I got it from the chip. I didn't realize it was accessible from a nearby via. Thanks. I have the lmh1980 set for 75ohm sync input, I'm guessing that's incorrect for the SNES?

Non-amped csync looks great on my oscilloscope. I might try that next.
If you're getting sync from the console, I'm pretty sure it's TTL sync, as cables have resistors to get it to 75 ohms.
PS1 Disc-Based Game ID BIOS patch for MemCard Pro and SD2PSX automatic VMC switching.
Jdurg
Posts: 47
Joined: Tue Dec 13, 2016 1:52 pm

Re: Let's talk SNES HDMI (analog based)

Post by Jdurg »

Will definitely be following this thread. I've got an SNES and right now that's the only console that doesn't have HDMI outputs to easily connect to my AV receiver. Makes it a pain to switch inputs on the TV and the receiver just to play my SNES. (NES will have HDMI mod installed, and N64 has the HDMI mod coming).

I'm just having trouble justifying spending all the money on a framemeister simply to have HDMI for my SNES. Would like a more simple solution that can give me good scaling, little lag, scanline options, and an HDMI connection. This seems like it might me the item for me.
Woozle
Posts: 232
Joined: Wed Jun 24, 2015 8:27 pm
Location: Florida

Re: Let's talk SNES HDMI (analog based)

Post by Woozle »

I have the board hooked up to my SNES https://imgur.com/a/sLS4o . I can get a full SNES frame showing, but it rolls through the screen diagonally which means the timing isn't synced up. There's also a TON of noise, but that is slowly going away as sampling issues get fixed. I will say, a line buffer design with HDMI is a lot trickier than a frame buffer design...props to those who have made line doublers.

-------------sync issues----------------------
I don't think it would be hard to solve the rolling frames if I had proper sync signals from the SNES. I think something may be wrong with my lmh1980 as the hsync output pin gives a garbage output and vsync gives a delayed hsync (if I try to sample line data on the lmh1980 vsync output, it works but the beginning of the line is missing). I'm taking csync from the via next to the RGB vias, I put a series 75ohm resistor on the csync line which feeds into the LMH1980 with a 75ohm resistor on input to ground. If anyone can give some insight that might help with my lmh1980 issues that would be great.
------------------------------------------------

-------------Clock issues----------------------
Since I have video working out of the line buffer (just needs to be synced) I figured I would work on sending a clock to the SNES from the FPGA. Direct 3.3v connection from FPGA didn't work (SNES wouldn't boot up), putting it through a 3.3-> 5v shifter didn't work either. Then I decided to measure the crystal on my other snes, it read 1.8v, should I try using that? I was able to take cart pin 1 from my unmodded snes and use it to clock the SNES without a crystal, the SNES then booted up great. This somewhat confirms that the SNES can work from a single-ended non crystal clock.

Do you think it's a voltage level issue or a termination issue with the clock coming from the FPGA?

Another thing I noticed, the SNES crystal/clock needs to be running when the SNES is powered on. Meaning the FPGA which provides the clock needs to be configured and ready before the SNES, if the clock starts after the SNES power is switched on then the SNES doesn't boot up (in my quick tests). If the clock is lost the SNES crashes. This is much different than the GBA which can run clockless after boot-up and the GBA doesn't mind dropped clocks at all. I think basic power sequencing will be needed in the final design to ensure the FPGA is powered up and configured before the SNES.
----------------------------------------------------

-------------------Future plans-------------------
Assuming I can solve the above issues...My general plan of attack is to clock the SNES with a ~21Mhz clock from the FPGA, then use that clock inside the FPGA to generate the frame/line timing info that the SNES uses, so I have a timing reference for writing/reading from the line buffer.
----------------------------------------------------

------------------Current pics--------------------
Anyway here's some not-very-exciting pics of current progress. http://imgur.com/a/0jc6N You can see the noise and misalignment issues (due to rollin frame) I was talking about. The 2nd black and white picture is the composite output of the SNES clocked from FPGA, usually it doesn't boot...but if I connect the unused crystal pin with a series capacitor to ground then it boots and I get this lovely garbage. The HDMI output has normal colors in this instance, just composite gets destroyed. Still trying to figure it all out.
paulb_nl
Posts: 341
Joined: Sat Feb 20, 2016 5:05 pm

Re: Let's talk SNES HDMI (analog based)

Post by paulb_nl »

Woozle wrote:I'm taking csync from the via next to the RGB vias, I put a series 75ohm resistor on the csync line which feeds into the LMH1980 with a 75ohm resistor on input to ground. If anyone can give some insight that might help with my lmh1980 issues that would be great.
The signal from the via is not amped so won't the signal be too weak with those resistors? Try to connect composite video from the multiav out directly to the LMH1980. You can also try luma from the encoder chip with 220uf capacitor and 75 ohm resistor.
Woozle
Posts: 232
Joined: Wed Jun 24, 2015 8:27 pm
Location: Florida

Re: Let's talk SNES HDMI (analog based)

Post by Woozle »

paulb_nl wrote:
Woozle wrote:I'm taking csync from the via next to the RGB vias, I put a series 75ohm resistor on the csync line which feeds into the LMH1980 with a 75ohm resistor on input to ground. If anyone can give some insight that might help with my lmh1980 issues that would be great.
The signal from the via is not amped so won't the signal be too weak with those resistors? Try to connect composite video from the multiav out directly to the LMH1980. You can also try luma from the encoder chip with 220uf capacitor and 75 ohm resistor.
Do you know which pin I can get composite from on the multi-out? If I connect from the multi-out, do I need a 75ohm series resistor on composite?

On my oscilloscope I'm reading 5v for csync from the via, I thought the resistor would be needed to bring the voltage down...but even that voltage seems to high for the lmh1980. Hopefully I can get it working without a sync buffer, but in the next revision I think I'm going to buffer the sync through the ths7374.

edit: I think I'm just going to take csync from the encoder, I soldered to the wrong encoder pin when I tried it before...
paulb_nl
Posts: 341
Joined: Sat Feb 20, 2016 5:05 pm

Re: Let's talk SNES HDMI (analog based)

Post by paulb_nl »

Woozle wrote:Do you know which pin I can get composite from on the multi-out? If I connect from the multi-out, do I need a 75ohm series resistor on composite?

On my oscilloscope I'm reading 5v for csync from the via, I thought the resistor would be needed to bring the voltage down...but even that voltage seems to high for the lmh1980. Hopefully I can get it working without a sync buffer, but in the next revision I think I'm going to buffer the sync through the ths7374.

edit: I think I'm just going to take csync from the encoder, I soldered to the wrong encoder pin when I tried it before...

Composite video from the multiout already has the series resistor. Look here for the multiout pins: http://gamesx.com/wiki/doku.php?id=av:nintendomultiav

To bring down csync to video level you need 330ohm in series instead of the 75ohm. http://shmups.system11.org/viewtopic.ph ... 3#p1153623
Woozle
Posts: 232
Joined: Wed Jun 24, 2015 8:27 pm
Location: Florida

Re: Let's talk SNES HDMI (analog based)

Post by Woozle »

paulb_nl wrote:
To bring down csync to video level you need 330ohm in series instead of the 75ohm. http://shmups.system11.org/viewtopic.ph ... 3#p1153623
Does that apply to both the buffered and un-buffered csync on the SNES?
Jdurg
Posts: 47
Joined: Tue Dec 13, 2016 1:52 pm

Re: Let's talk SNES HDMI (analog based)

Post by Jdurg »

Hey Woozle, any updates? I'm keeping my eye on this project as the SNES is the only system I have which doesn't have an HDMI mod available for it, so I'm using a simple SCART to HDMI upscaler. Would like to have options to properly upscale it, add scanlines, maintain proper 4:3 aspect ratio, etc. (The cheap scaler will always output a stretched 16:9 image no matter what. Yes, I can just click a few buttons to force my TV to show it as 4:3, but any way to avoid that would be great).
Woozle
Posts: 232
Joined: Wed Jun 24, 2015 8:27 pm
Location: Florida

Re: Let's talk SNES HDMI (analog based)

Post by Woozle »

No real updates for now, school and work have been taking up most of my time.

In the free time I do have, I've been working on the GBA to HDMI project. I've almost finished a design for a board which will be able to do 1080p video with audio over HDMI (thanks to an HDMI transmitter IC and stereo audio ADC). I'm hoping to eventually add those chips on the SNES HDMI board. Planning to work on the SNES project this weekend if I get time.
Solidcore
Posts: 1
Joined: Thu Nov 30, 2017 1:19 pm

Re: Let's talk SNES HDMI (analog based)

Post by Solidcore »

Hi mate great project

Firstly I apologise for bringing this back up from the past but I enjoyed reading the project .

I am using an adc08100 myself on rgb analog signals however I've bend unable to isolate why the vertical signal rolls and can't be synced with the v sync for my 640x480 output at 60hz however I've speculated the ADC has a delay before the data is actually new and therefor I'm behind reading it at the h sync pulses .

Can you be so kind to elaborate or share a portion of code which takes care of this delay ?
Post Reply