nukeykt / Nuked-OPM

Cycle accurate Yamaha YM2151 emulator
GNU Lesser General Public License v2.1
73 stars 5 forks source link

The noise channel does not use the full envelope #5

Open jotego opened 3 years ago

jotego commented 3 years ago

It looks like the envelope gets serial data starts showing at chip cycle 5, but the noise channel is latched at cycle 12. After cycle 12, the EG serial bit keeps showing activity for the last two bits of the envelope.

I find this a bit suspicious. Is the synthesizer really throwing away the two LSBs of the envelope?

Here are time waveforms obtained directly from your code illustrating this:

imagen

nukeykt commented 3 years ago

I think it is correct. Any timing issue in noise channel code would affect noise channel volume. Maybe worth testing this behavior on hardware tests though. Do you have ability to digitally capture noise channel output using real YM2151 chip?

jotego commented 3 years ago

I used to have that setup several years ago. I took hundreds of measurements but for some reason, I couldn't get the noise to work (phase and envelope measurements ran well).