Re: [hatari-devel] Use correct white noise

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

The YM2149 uses a 17 bit LFSR pseudo-random noise generator
with taps on bits 17 and 14 !!!

Using the python code supplied in a previous post:
$ python bma.py
The input sequence is (0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0).
Its characteristic polynomial is (x^17 + x^3 + 1), and linear span is 17.

I got the noise from a you-tube video:
http://www.youtube.com/watch?v=bbTZQ5kNF-c
The noise is near the end of the video.

I went looking for usable YM2149 noise on you-tube,
converted the .flv file to a .wav file with ffmpeg,
played the .wav with xine, took a screen shot of
the data, then manually inspected the waveform to
determine 1's and 0's. The data is inverted, so
that the top of the digital waveform is a 0-level
and the bottom is a 1-level. The wide plateau in the
center of the waveform is five consecutive 0-levels.
(compare the input sequence to the screen shot)

The data was sampled at 44.1 KHZ and the noise was
divided down by the YM2148 frequency register to an
unknown frequency that is less than the maximum.
The fact that the characteristic polynomial was not
affected by the division shows that the LFSR is
clocked at a lower frequency. This agrees with the
YM2149 emulation methods I've seen (Hatari included).

David

Attachment: ay-1.png
Description: PNG image



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/