Ben G. Han - 2015-01-03

Problematic

It's not a bug with the music itself. It's a tricky situation with the simulator itself. In this music channels A & B are almost always playing the same thing. At some point both channels enter in an exact opposite phase cancelling each other. This is a very unlikely event, but it becomes more likely because of 2 factors: 1. all YM access happen at the same cycles but more importantly 2. the way the pulse counters are reset ( if count > per then count = 0 ) synchronize both channels as soon as a lower period is written (both channels counters get zeroed at the same time synchronizing both signals on either the same phase or an opposite phase, depending on the internal toggle).

Solution

I'm testing a possible solution for the pulse engine only at the moment.

  1. I introduce a bias in the counters of each channel at chip reset.
  2. Instead of setting the counter to 0 when it reach the threshold I keep the residual value.

I hope this change (2.) does not affect negatively other musics. I have always wondered how this really works with the actual chip.

 

Last edit: Ben G. Han 2015-01-03