From 6e63cc41f3bb9f8db07b57500c5c9aa77cc74d11 Mon Sep 17 00:00:00 2001 From: cam900 Date: Fri, 13 Apr 2018 23:22:00 +0900 Subject: pc9801_86.cpp : Fix pcm timer rate, Add notes [cam900] --- src/devices/bus/cbus/pc9801_86.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/devices/bus/cbus/pc9801_86.cpp b/src/devices/bus/cbus/pc9801_86.cpp index 2fee59012cf..2b08d158669 100644 --- a/src/devices/bus/cbus/pc9801_86.cpp +++ b/src/devices/bus/cbus/pc9801_86.cpp @@ -252,7 +252,8 @@ READ8_MEMBER(pc9801_86_device::pcm_r) WRITE8_MEMBER(pc9801_86_device::pcm_w) { - const int rates[] = {44100, 33075, 22050, 16538, 11025, 8268, 5513, 4134}; + const int rate = 44100*3; // TODO : unknown clock / divider + const int divs[8] = {3, 4, 6, 8, 12, 16, 24, 32}; if((offset & 1) == 0) { switch(offset >> 1) @@ -263,7 +264,7 @@ WRITE8_MEMBER(pc9801_86_device::pcm_w) case 2: m_pcm_ctrl = data & ~0x10; if(data & 0x80) - m_dac_timer->adjust(attotime::from_hz(rates[data & 7]), 0, attotime::from_hz(rates[data & 7])); + m_dac_timer->adjust(attotime::from_ticks(divs[data & 7], rate), 0, attotime::from_ticks(divs[data & 7], rate)); else m_dac_timer->adjust(attotime::never); if(data & 8) -- cgit v1.2.3