Previous 15994 Revisions Next

r6300 Thursday 5th November, 2009 at 02:58:54 UTC by Jonathan Gevaryahu
Fix a minor oversight in the last patch: R->OldNoise was not being reset on PRNG reset
[src/emu/sound]sn76496.c

src/emu/sound/sn76496.c
r6299r6300
8484   INT32 FeedbackInvert;   /* feedback invert flag (xor vs xnor) */
8585   INT32 Period[4];   /* Length of 1/2 of waveform */
8686   INT32 Count[4];      /* Position within the waveform */
87   INT32 OldNoise;      /* 1 bit output of the PREVIOUS noise output, buffered by the volume amp */
87   INT32 OldNoise;      /* 1 bit output of the PREVIOUS noise output */
8888   INT32 Output[4];   /* 1-bit output of each channel, pre-volume */
8989   INT32 CyclestoREADY;/* number of cycles until the READY line goes active */
9090};
r6299r6300
172172            R->Period[3] = ((n&3) == 3) ? 2 * R->Period[2] : (STEP << (5+(n&3)));
173173                 /* Reset noise shifter */
174174            R->RNG = R->FeedbackMask;
175            R->Output[3] = R->RNG & 1;
175            R->OldNoise = 0;
176            R->Output[3] = R->OldNoise;
177            R->OldNoise = R->RNG & 1;
176178         }
177179         break;
178180   }

Previous 15994 Revisions Next


© 1998-2018 The MESS Team