Skip to content

Commit

Permalink
k005289: fix off by 1 error
Browse files Browse the repository at this point in the history
  • Loading branch information
happppp committed Jul 5, 2023
1 parent 8518da9 commit eada43f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/devices/sound/k005289.cpp
Expand Up @@ -37,10 +37,6 @@
#include "emu.h"
#include "k005289.h"

// is this an actual hardware limit? or just an arbitrary divider
// to bring the output frequency down to a reasonable value for MAME?
#define CLOCK_DIVIDER 32

// device type definition
DEFINE_DEVICE_TYPE(K005289, k005289_device, "k005289", "K005289 SCC")

Expand Down Expand Up @@ -97,7 +93,7 @@ void k005289_device::sound_stream_update(sound_stream &stream, std::vector<read_
for (int i = 0; i < 2; i++)
{
voice_t &v = m_voice[i];
if ((v.counter--) < 0)
if ((v.counter--) <= 0)
{
v.waveform = (v.waveform & ~0x1f) | ((v.waveform + 1) & 0x1f);
v.counter = v.frequency;
Expand Down

0 comments on commit eada43f

Please sign in to comment.