I/O Board

https://github.com/MiSTer-devel/Main_MiSTer/wiki

Moderators: Mug UK, Zorro 2, Greenious, spiny, Sorgelig, Moderator Team

JamesF
Captain Atari
Captain Atari
Posts: 155
Joined: Sat Dec 15, 2018 6:46 am

Re: I/O Board

Postby JamesF » Sat Jan 05, 2019 11:00 am

Here is a few seconds of audio sample where you can clearly hear the difference between HDMI and SPDIF audio.
These audio sample where created by jft and confirm what I hear on my equipment.
https://cdn.discordapp.com/attachments/ ... c_Rings.7z

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5372
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: I/O Board

Postby Sorgelig » Sat Jan 05, 2019 2:02 pm

i hear the difference, but it's unclear if sound go through the same route or not. Maybe something outside of MiSTer distorts it.

jft
Atari nerd
Atari nerd
Posts: 48
Joined: Sun Oct 28, 2018 12:07 pm

Re: I/O Board

Postby jft » Sat Jan 05, 2019 2:30 pm

Sorgelig wrote:i hear the difference, but it's unclear if sound go through the same route or not. Maybe something outside of MiSTer distorts it.


These were recorded using the same device digitally - an M-Audio MT2496 which has a coaxial SPDIF input.
HDMI audio was captured using a device that breaks the digital audio out to an SPDIF coax (actually one of the cheap Scart to HDMI adapter, which happens to also have an HDMI input).
SPDIF was captured using right off the pin using crude Coax adapter (a voltage divider circuit to bring the 3.3v down to 1v / .05vpp)

I can hear the same artifacts when using the straight TOSLINK into my receiver (different device) so this is certainly straight out of the MiSTer.

JamesF
Captain Atari
Captain Atari
Posts: 155
Joined: Sat Dec 15, 2018 6:46 am

Re: I/O Board

Postby JamesF » Sat Jan 05, 2019 2:34 pm

SPDIF sounds distorted both for jft and me on four different devices, so it is probably the MiSTer.
I've tested with Focusrite PRO 24 DSP audio interface, and S/PDIF to RCA conversion box from ebay.

I can add that it clearly sounds like aliasing between sample rate conversions, since audible aliasing occurs only in high frequencies while lower frequencies are unaffected.

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5372
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: I/O Board

Postby Sorgelig » Sat Jan 05, 2019 3:40 pm

Genesis.zip

this version uses the same filter for SPDIF and HDMI. So basically the digital data should be the same.
It's also possible that ADV7513 (HDMI chip) do some re-sampling and adds additional filtering.
You do not have the required permissions to view the files attached to this post.

JamesF
Captain Atari
Captain Atari
Posts: 155
Joined: Sat Dec 15, 2018 6:46 am

Re: I/O Board

Postby JamesF » Sat Jan 05, 2019 4:09 pm

Much better, aliasing distortion is almost gone, but I can still hear very slight lower frequency harmonic that should not be there,, sounds like the cutoff frequency of the LPF is not low enough.

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5372
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: I/O Board

Postby Sorgelig » Sat Jan 05, 2019 4:31 pm

try this
Genesis2.zip
You do not have the required permissions to view the files attached to this post.

JamesF
Captain Atari
Captain Atari
Posts: 155
Joined: Sat Dec 15, 2018 6:46 am

Re: I/O Board

Postby JamesF » Sat Jan 05, 2019 4:39 pm

Sounds the same, still has some reflected lower harmonic content.

edit:
Anti-aliasing filter in audio is usually Sinc Filter which is very steep and removes all higher frequency content above the cutoff frequency.
If your filter allows for higher order, please try upping the order of the filter to recreate the steep slope of the Sinc filter.

edit2:
An audio spectrum analyzer shows that there is no anti-aliasing filter and SPDIF has all frequencies up to 96kHz sampling (48kHz "audible"), so it is no surprise that there is aliasing in the audible range of 20kHz.
I don't think it is the job of the equipment downstream to apply filtering to the SPDIF signal, it should income "ready" for reproduction, aa filtering already applied.
As you said, the HDMI chip probably has internal filtering so the 48kHz 16bit output is well filtered and aliasing free.

jft
Atari nerd
Atari nerd
Posts: 48
Joined: Sun Oct 28, 2018 12:07 pm

Re: I/O Board

Postby jft » Sun Jan 06, 2019 9:29 am

JamesF wrote:I don't think it is the job of the equipment downstream to apply filtering to the SPDIF signal, it should income "ready" for reproduction, aa filtering already applied.


Agree with this statement fully.

Would it make sense to apply all filtering early enough in the signal chain (using an audio term here, probably not exactly appropriate for FPGA logic), so that you have a single perfect digital audio stream, which is then split out and presented into the different audio output options? (HDMI, SPDIF, Analog?). I think that would result in the most consistent experience (and maybe simplify the processing chain a bit? again, total guess here).
The only downside I can think of, is if the HDMI chip filtering applied as a second filter degrades the audio enough to be noticable. I think if it is just an AA filter, the difference wouldn't be noticeable (James - any feedback on that point?)
That, or I wonder if the filter in the HDMI chip can be disabled.

Note: I also did some tests to the SNES core, and there is similar aliasing there. So I imagine this issue applies to many cores.

JamesF
Captain Atari
Captain Atari
Posts: 155
Joined: Sat Dec 15, 2018 6:46 am

Re: I/O Board

Postby JamesF » Sun Jan 06, 2019 10:23 am

No, additional AA filtering will not harm the signal to the extent you can hear it.
For example an audio player on your computer will apply a high quality phase-preserving steep aa filtering at the nyquist frequency depending on the FILE sampling rate.
So for example you play 44.1kHz sampling rate CD audio file which the player will apply an antialiasing filter at 20kHz, but the playback equipment might be set to 48kHz or 96kHz sampling rate,, you will hear no aliasing since the audio is properly AA filtered.
Notice that 44.1kHz /2 = 22.05kHz, that is because the steep AA filter rolls down 100db from 20kHz to 22kHz, so the audible range is not affected.

Here is a standard 44.1kHz FLAC played with AIMP player, through 96kHz audio interface:
Image

Back to MiSTer;
If Sorgelig will be able to apply a quality AA filter to the audio data stream without taking much resources from the FPGA that would be absolutely ideal for sound.
The most common and high quality is Sinc filter with high number of taps (high order) to create a very steep roll off, but it might take a lot of resources if done in software, so a compromise is needed.
Using lower taps will bring the CPU usage down but the reflected frequencies will gradually be more audible,, so we need a good balance just enough to not hear any aliasing.

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5372
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: I/O Board

Postby Sorgelig » Sun Jan 06, 2019 1:39 pm

No problem guys, give me high quality filter HDL source and i will include it :)
FPGA is not CPU so higher complexity requires higher resources but there is no such thing as "more CPU load."

JamesF
Captain Atari
Captain Atari
Posts: 155
Joined: Sat Dec 15, 2018 6:46 am

Re: I/O Board

Postby JamesF » Sun Jan 06, 2019 4:55 pm

Googling "VHDL FIR filter" produces plenty results, but I do not want to 'guess' what's might be correct for MiSTer.

This is an example of 32-tap FIR filter in VHDL:
https://www.doulos.com/knowhow/vhdl_des ... ir_filter/

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5372
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: I/O Board

Postby Sorgelig » Sun Jan 06, 2019 8:20 pm

I'll leave it for those who know how to make a proper filtering.

Grabulosaure
Atari maniac
Atari maniac
Posts: 92
Joined: Tue Sep 05, 2017 9:35 pm
Contact:

Re: I/O Board

Postby Grabulosaure » Sun Jan 06, 2019 10:50 pm

JamesF wrote:Sounds the same, still has some reflected lower harmonic content.


Could you please test this version, is there any difference ?
http://temlib.org/pub/mister/Genesis_spdif.rbf

JamesF
Captain Atari
Captain Atari
Posts: 155
Joined: Sat Dec 15, 2018 6:46 am

Re: I/O Board

Postby JamesF » Mon Jan 07, 2019 4:58 am

Thank you.
Sounds worse than Sorgelig's test builds.

atatat
Atarian
Atarian
Posts: 4
Joined: Fri Jan 11, 2019 6:06 pm
Location: Russia

Re: I/O Board

Postby atatat » Sun Jan 13, 2019 6:29 pm

Sorgelig, what's the difference between IO Boards 5.5 and 5.5XL?
It's just longer with two more mounting holes?

paulofduarte
Atariator
Atariator
Posts: 17
Joined: Fri Jul 13, 2018 10:10 pm

Re: I/O Board

Postby paulofduarte » Thu Jan 17, 2019 3:55 pm

atatat wrote:Sorgelig, what's the difference between IO Boards 5.5 and 5.5XL?
It's just longer with two more mounting holes?


Yes, the XL covers the whole size of the de10 nano and can be mounted using the 4 screws. As it's bigger than the maximum size the Chinese PCB manufactures gives discount for, it increases the cost considerably for DIY, should not affect much the price on big batches though.

crocky
Atari maniac
Atari maniac
Posts: 79
Joined: Fri Nov 23, 2018 2:01 pm

Re: I/O Board

Postby crocky » Sat Jan 26, 2019 9:14 am

My Disk and USER LEDs are flashing alternatively and MiSTer isnt booting - what does this mean?

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5372
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: I/O Board

Postby Sorgelig » Sat Jan 26, 2019 9:49 am

crocky wrote:My Disk and USER LEDs are flashing alternatively and MiSTer isnt booting - what does this mean?

it means Menu core is working and you at least should see the video on HDMI.

alexj212
Atarian
Atarian
Posts: 3
Joined: Sun Nov 18, 2018 12:54 am

Re: I/O Board

Postby alexj212 » Sat Jan 26, 2019 11:11 pm

I have a similar issue, where I would not see video on hdmi, then I plugged in the vga at the same time and the hdmi worked. My monitor has vga and hdmi inputs. VGA will work by itself, but hdmi only works when the vga is plugged in.

Campus
Atarian
Atarian
Posts: 7
Joined: Mon Jan 21, 2019 1:46 am

Re: I/O Board

Postby Campus » Sun Jan 27, 2019 12:03 am

Sorgelig wrote:
crocky wrote:My Disk and USER LEDs are flashing alternatively and MiSTer isnt booting - what does this mean?

it means Menu core is working and you at least should see the video on HDMI.


I had the same problem with my new board. Try a real TV or disable audio-over-hdmi with the MiSTer.ini. Disabling audio helped me to get a picture on an Eizo display.

ExplodingLemur
Atarian
Atarian
Posts: 1
Joined: Sun Dec 09, 2018 9:21 pm

Part #s for 2x20 female header?

Postby ExplodingLemur » Tue Jan 29, 2019 7:45 pm

I've been trying to find an 11mm tall 2x20 female header on Digikey, Mouser, and Arrow but have failed miserably. Can anyone point me to a US-domestic source for single quantities of that header? (AliExpress and LCSC are going to have even-more-extended shipping times due to Chinese New Year)
Thanks!

BeoWolff
Atarian
Atarian
Posts: 3
Joined: Tue Jan 22, 2019 11:15 pm

Re: I/O Board

Postby BeoWolff » Wed Feb 06, 2019 6:18 am

The YPbPr signal coming from my IO board has a few big problems.

1. The image is a bit bright and is washing out some light greys and making them look completely white. This is especially noticeable on the "Gray Ramp" test on 240p Test Suite on the NES. Setting the palette to "NES Classic" seems to help a tiny bit, but it's still a big problem.

2. The OSD main menu is very distorted for some reason.

3. The image is blurrier than it should be. Looks better than composite, but not nearly as sharp as YPbPr should be.

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5372
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: I/O Board

Postby Sorgelig » Wed Feb 06, 2019 11:09 am

BeoWolff wrote:The YPbPr signal coming from my IO board has a few big problems.

1. The image is a bit bright and is washing out some light greys and making them look completely white. This is especially noticeable on the "Gray Ramp" test on 240p Test Suite on the NES. Setting the palette to "NES Classic" seems to help a tiny bit, but it's still a big problem.

2. The OSD main menu is very distorted for some reason.

3. The image is blurrier than it should be. Looks better than composite, but not nearly as sharp as YPbPr should be.

These problems are related to your specific TV.
I don't have any of these problems.
May be something with signal agreements between MiSTer and your TV.

damopinn
Atariator
Atariator
Posts: 26
Joined: Tue Dec 04, 2018 3:24 pm

Re: I/O Board

Postby damopinn » Tue Mar 05, 2019 5:46 pm

Hi someone clear up a doubt of mine, about the connector P1.
On aliexpress it has a spacer and short pins but the lcsc link has long pins.
Does it need long pins or is the one with short pins Okay?


Return to “MiSTer”

Who is online

Users browsing this forum: No registered users and 4 guests