loop overflow happens on the real chip

This commit is contained in:
Michaël Banaan Ananas 2014-03-08 16:19:39 +00:00
parent f84af4b51f
commit 5f2d9482dc

View File

@ -267,8 +267,9 @@ void ymf278b_device::sound_stream_update(sound_stream &stream, stream_sample_t *
if (slot->stepptr >= slot->endaddr)
{
slot->stepptr = slot->stepptr - slot->endaddr + slot->loopaddr;
if (slot->stepptr >= slot->endaddr)
slot->stepptr = slot->loopaddr; // loop overflow
// NOTE: loop overflow is still possible here if (slot->stepptr >= slot->endaddr)
// This glitch may be (ab)used to your advantage to create pseudorandom noise.
}
switch (slot->bits)