Improving 1chipMSX sound quality.

By Edwin

Paragon (1182)

Edwin's picture

09-04-2008, 22:56

One thing that bugged me about the 1chipMSX is that the sound quality seems to be well below that of a real msx. I noticed this typically when I tried to MJTT on it. While the scc implementation doesn't have the bug that the real SCC chip has, the sound still was way off.

I suspect that the problem behind this is the 6 bit output. If you consider all the channels of PSG, SCC and MSX-MUSIC that are mixed together, then 6 bits seems rather few. Especially if you consider that a simple SCC has 11 bits output.

Since the DAC on the 1cM is a simple resistor array, it may be possible to improve the sound quality by not just setting the output pins high or low, but by using variable sized high frequency pulses. With the resistor array and capacitor, you should in theory be able to produce intermediate levels and improve the resolution. Of course, I completely lack the electronics knowledge to prove this. So I'm wondering of others with better knowledge could share their view on this.

Login or register to post comments

By caro

Champion (482)

caro's picture

10-04-2008, 05:09

Since the DAC on the 1cM is a simple resistor array, The current version of the code OCM:
1) A mono signal which is fed to both exit;
2) DAC output is not used, the signal is formed 13 - bit PWM module (esepwm.vhd).

By ARTRAG

Enlighted (6228)

ARTRAG's picture

10-04-2008, 09:32

13 bit Pulse-width modulation for the audio ?
What you mean exactly ?

You get audio analog signals from PWM by low pass filtering,
is this what OCM does ?
In this case why you say 13 bit ?

By HRA!

Master (149)

HRA!'s picture

10-04-2008, 15:32

My 1chipMSX[KAI] has improved tone quality.
However, it is not the same as the real thing 100%.
First of all, please test it.

http://www5d.biglobe.ne.jp/~hra/note/onechipmsx/files/emsx_top_20080408.zip

* About DAC of 1chipMSX

The output port has 6bit.
However, only "000000" or "111111" is output.

* About SCC on my 1chipMSX[KAI]

A wavy output is enhanced to 15bit.

* About ESEPWM

ESEPWM is not Pulse Wave Modulator.
It is delta sigma transfom that converts 14bit to 1bit.

* New improvement idea

When the delta sigma conversion is changed to 14bit to 6bit, it is likely to be
improved.

I am busy with addition of the V9958 interchangeability function now:P

By Edwin

Paragon (1182)

Edwin's picture

11-04-2008, 21:57

Hmmm, in that case I guess there's little to be gained by using all 6 bits then. Unless it's in size. It does make me wonder why the standard SCC sound was so crappy then.

If only there was enough time to investigate Smile

By ARTRAG

Enlighted (6228)

ARTRAG's picture

12-04-2008, 01:11

maybe only HARA's onechip has better performance

By caro

Champion (482)

caro's picture

12-04-2008, 06:32

maybe only HARA's onechip has better performanceIn OCM ported at Altera DE1 for output of sound I used Audio codec in mode 16-bit, 48 KHz Sampling Frequency.
Audio quality can be compared with the output ESEPWM, which is also used in DE1.

By HRA!

Master (149)

HRA!'s picture

12-04-2008, 10:26

It is 21MHz output though the output of OCM is 1bit. (1bit DAC)

Because it is one bit output, the quantization noise is recorded.
However, only the noise is modulated to the high frequency region by the delta
sigma modulation.
Noises gather near Nyquist frequency (11.5MHz).
The band in the vicinity of the frequency of the nyquist is cut with the capacitor
connected outside of FPGA.
The sound circuit of OCM is made expecting such a mechanism.

It is necessary to use the input signal of ESEPWM to reproduce with 16bit/48kHz.
However, do not connect directly with 16bit/48kHz Audio Codec.
Please connect the signal that passes the low-pass filter by cutting the
frequency that exceeds 24kHz.

Please pay attention the alias of the signal.

By HRA!

Master (149)

HRA!'s picture

27-05-2008, 16:19

Don't connect the voice mixer output of OCM with AudioCodec direct.
The modes of expression of the sign differ.

Fixed version:
http://www5d.biglobe.ne.jp/~hra/note/onechipmsx/files/emsx_top_dev_20080527.zip

http://www.msx.org/forumtopicl8494.html