mirror of
https://github.com/holub/mame
synced 2025-06-09 14:22:41 +03:00
k005289: fix off by 1 error
This commit is contained in:
parent
8518da9e35
commit
eada43fdd4
@ -37,10 +37,6 @@
|
|||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "k005289.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
|
// device type definition
|
||||||
DEFINE_DEVICE_TYPE(K005289, k005289_device, "k005289", "K005289 SCC")
|
DEFINE_DEVICE_TYPE(K005289, k005289_device, "k005289", "K005289 SCC")
|
||||||
|
|
||||||
@ -97,7 +93,7 @@ void k005289_device::sound_stream_update(sound_stream &stream, std::vector<read_
|
|||||||
for (int i = 0; i < 2; i++)
|
for (int i = 0; i < 2; i++)
|
||||||
{
|
{
|
||||||
voice_t &v = m_voice[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.waveform = (v.waveform & ~0x1f) | ((v.waveform + 1) & 0x1f);
|
||||||
v.counter = v.frequency;
|
v.counter = v.frequency;
|
||||||
|
Loading…
Reference in New Issue
Block a user