IanSB / RGBtoHDMI

Bare-metal Raspberry Pi project that provides pixel-perfect sampling of BBC Micro video and conversion to HDMI
GNU General Public License v3.0
129 stars 6 forks source link

Alpha 65 #29

Open IanSB opened 5 months ago

IanSB commented 5 months ago

Alpha 65A:

Add support for 2560x1600 & 2048x1536 resolutions Add Nascom 1 & Zenith Z110 profiles Fix Sam Coupe scaling issue Add Integer scaling preference setting with options Exact 4:3 / Enhanced 4:3 / Full Width Exact 4:3 means use the exact centre 4:3 portion of 16:9 so for 1080p that would be 1440x1080 Enhanced 4:3 means use a wider centre section of 16:9 so for 1080p that would be 1600x1080 (default for most) Full Width means use the full width of 16:9 so for 1080p that would be 1920x1080 (used by Sam Coupe) Add experimental 9 bit lumacode setting

Apha65A.zip removed

IanSB commented 4 months ago

Experimental HDMI audio output test

Alpha65D.zip removed

IanSB commented 4 months ago

Here is Alpha 65E with updated HDMI Audio test. It plays a WAV or test tone to test HDMI monitor compatibility. This uses an IEC958 format bitstream rather than raw PCM and might fix the no audio output problem on some monitors: This should work on Pi zero, 1, 2, & 3 but not on Pi 4

Alpha65E.zip removed

IanSB commented 4 months ago

Here is Alpha65F with further audio updates to fix compatibility issues: Alpha65F.zip removed

IanSB commented 4 months ago

Here is Alpha65G which fixes the random clicks and pops in audio plus adds menu options to play selected WAVs or all WAVs in a folder:

Alpha65G.zip

solarmon commented 4 months ago

@IanSB

Just tried with a Raspberry Pi Zero W V1.1 connected to an Iiyama 27" IPS display (PL2782Q). This is on my RGBtoHDMI CDTV V2 (SOIC) (based on c0pperdragon design)

Amazing! The quality isn't 100% good, but at least it works! There seems to be some crackles or white noise, and sometimes it blanks/skips? I assume these are all expected for now?

IanSB commented 4 months ago

@solarmon

There seems to be some crackles or white noise, and sometimes it blanks/skips? I assume these are all expected for now?

I think I have fixed most compatibiliy issues but very occasionally I can get glitches when the genlock is resyncing because it is adjusting the hdmi clock a little too quickly. Can you try turning the genlock off in the settings menu to see if that makes any difference? Set "Genlock Mode" to "Off (Unlocked)"

If you get audio disturbances after that, then that is unexpected as it is working on all 12 of my monitors/TVs and also on other testers monitors who initially reported problems with earlier releases. (You may have to save the above setting and reboot to fully test this)

solarmon commented 4 months ago

@IanSB

Unfortunately, if I turn Genlock off then the display immediately goes blank and the signal is lost.

IanSB commented 4 months ago

@solarmon

Unfortunately, if I turn Genlock off then the display immediately goes blank and the signal is lost.

I assume you are using a 50Hz Amiga because switching the genlock off allows the output to rise back to the more standard 60Hz which has a higher HDMI clock rate. It looks like your monitor is 2560x1440 and if it can't display that resolution at 60Hz, the most likely explanation is that your HDMI cabling can't handle the higher clock rate and that might also explain the poor quality results you are seeing at 50Hz.

Try setting the resolution to 1920x1080 which will have a much lower HDMI clock rate. If you still get audio glitches at that resolution, try switching the genlock off again.

For 2560x1440, try some other cabling, preferably a single cable without any adaptors or joiners and it's probably best to use a HDMI 2.0 cable if you have one. Also could you use the save log and edid option in the info menu and post the EDID.BIN file from the SD card.

venice1200 commented 3 months ago

Wow! The 65G works like a charm with my A500/Pi2 Zero/rgb2hdmi Board v1.1 from @solarmon. No strange noises, no blanks when I run the "Is_That_You_or_Are_You_You.wav" file. My Monitor is an Eizo FlexScan EV2795 at 2560x1440/50Hz. The Amiga Screen was upscaled 4:3.

solarmon commented 3 months ago

@IanSB

Yes, I'm using the Amiga 50Hz sub-profile.

I changed the display resolution to 1920x1080. With genlock on, I still get the same issue as before. With genlock turned off, it got even worse - more glitches and the screen kept going black.

The HDMI cable I using is the Amazon Basics one and this claims to be a 'High-Speed' one that supports HDMI 2.0.

https://www.amazon.co.uk/gp/product/B014I8SP4W/

I'll try to find a different HDMI cable to test with.

I've attached the EDID.bin file (renamed to EDID.txt so that it can be attached here).

EDID.txt

IanSB commented 3 months ago

@solarmon

OK thanks for the EDID. If it is behaving similarly in at 1080p it is much less likely to be a cabling issue, it's just that I had seen exactly that sort of issue previously with one of my 2560 monitors.

One thing I forgot to mention, you should stop the wav player before disabling and restart the wav player afterwards.

Also another thing to try is to set the resolution to 1920x1080 and the refresh to '50Hz (Not Auto res)' then try playing a wav

solarmon commented 3 months ago

@IanSB

I've tried those different things. It seems now whenever genlock is turned off then there is no sound at all.

IanSB commented 3 months ago

@solarmon

Can you reset the Pi, play audio for 30 secs or until you get some glitches then use the save log function and post log.txt

solarmon commented 3 months ago

@IanSB

Log.txt attached

Log.txt

IanSB commented 3 months ago

@solarmon Thanks, nothing unusual in those logs though.

What happens when you turn off the genlock when not playing audio? both at Auto resolution and 1920x1080? (reset first to start from a clean boot)

solarmon commented 3 months ago

@IanSB

At 1920x1080 resolution (Forced 50Hz-60Hz), when I turn off genlock, the screen keeps flicking off and on, about every 3 to 5 seconds for about a second or two.

At Auto resolution, when I turn genlock off, the screen goes and stays blank.

IanSB commented 3 months ago

@solarmon

At 1920x1080 resolution (Forced 50Hz-60Hz), when I turn off genlock, the screen keeps flicking off and on, about every 3 to 5 seconds for about a second or two. At Auto resolution, when I turn genlock off, the screen goes and stays blank

OK then this isn't anything to do with the audio as no audio setup occurs until you play the first wav. The only other significant difference between this version and the current stable release is updated raspberry Pi firmware Can you try repeating the above tests with the current stable release. If there is no difference with that then we are back to cable issues or some other Pi compatibility issue with your monitor.

solarmon commented 3 months ago

@IanSB

With 20240213_e630d36f release, I get the following behaviour:

So there is a difference with the 1920x1080 resolution behaviour.

IanSB commented 3 months ago

@solarmon

At Auto resolution (Forced 50Hz-60Hz) - with genlock turned off, the screen goes and stays blank. At 1920x1080 resolution (Forced 50Hz-60Hz) - with genlock turned off, the screen stays OK.

That is more what I would expect from a HDMI compatability or cabling issue and when audio is enabled there is more activity in the signal so maybe that is why the 1080p is a little worse then. I have a small 2048x1536 monitor (it was actually a kit from Ali Express to re-use an old iPad 3 screen) and that has issues with the Pi zero's HDMI output but it works if I force the Pi into DVI mode so perhaps you could try that although that will not support audio anyway:

Go to the settings menu and change HDMI Mode Detect to 'Manual' HDMI Manual Mode to 'DVI Compatible'

Change HDMI Mode Detect to 'Auto' to return to normal after testing.

Sometimes such issues can be fixed by putting a HDMI splitter or repeater in between the zero and the monitor so if you have one of those give it a try (A HDMI bidirectional switch probably won't help as it doesn't regenerate the hdmi signals)

solarmon commented 3 months ago

@IanSB,

(Still on the 20240213_e630d36f release)

I made those settings changes, and then disabled Genlock. The screen did initially seem to OK, but I do experience it blacking out for a second, after a random amount of time.

IanSB commented 3 months ago

@solarmon Still looks like a cable or signal quality issue so really you will have to try a different cable (preferably a mini HDMI to HDMI cable with no adapters or joiners) or a splitter or a repeater.