summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author cam900 <dbtlrchl@naver.com>2018-04-13 23:22:00 +0900
committer cracyc <cracyc@users.noreply.github.com>2018-04-13 09:22:00 -0500
commit6e63cc41f3bb9f8db07b57500c5c9aa77cc74d11 (patch)
treeecb25188eec258a5e2afcc16c1a0376ecee022ef
parent3376e628e1aa115bbe28b1564f56ff1ec6018a32 (diff)
pc9801_86.cpp : Fix pcm timer rate, Add notes [cam900]
-rw-r--r--src/devices/bus/cbus/pc9801_86.cpp5
1 files 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)