Using the YM 2151 for Noise Generation

— by

tumblr_m9uuf0wzKx1rsz87f

Hi there FPGA lovers! Here we have another release of our series of YM2151 posts.

To recreate the YM 2151 in FPGA using VHDL, every aspect of the YM 2151 needs to be mapped on to the recreation platform. However an interesting aspect regarding the YM 2151 is that it uses random values for generation of noise (in Spanish) sound outputs like shocks, explosions and other disruptive sounds. While a general range of the signals used to generate this noise can be sampled, the YM 2151 has close to 18 bits for random signal generation which leads to a total of 218 signals.

The YM 2151 however uses a Linear Feedback Shift Register for this random sequence generation, and this considerably narrows down the possibility from more than a hundred thousand samples to a very narrow range. The output noise sequence can be predicted because of the feedback element, as every feedback signal can only have one selected output.

The MAME Source code for the emulator consists of a code for generating noise. This code has been used by the author to share a set of 256 samples. Though the samples appear to be seemingly random at first, a definitive pattern can be decoded from the samples depending upon the feedback given.

The Berlekamp- Massey Algorithm was used by the author to conclude that a definite relationship exists between the feedback and generated sequence for all bits except 0 and 4, contrary to the assumed 0 and 8 in the beginning. However the fact that the outputs after 0 and 4 cannot be predicted leads to the fact that there might be more than 218 samples. Thus from a set of more than hundred thousand random signals to generate noise in the YM 2151, the author has narrowed down the  possibility to a handful of feedback signals which can be used to create the clone of YM 2151 in Verilog for FPGA.

 

By Jotego

,

Newsletter

Our latest updates in your e-mail.


Leave a Reply