summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/sound
diff options
context:
space:
mode:
author R. Belmont <rb6502@users.noreply.github.com>2013-02-02 21:42:08 +0000
committer R. Belmont <rb6502@users.noreply.github.com>2013-02-02 21:42:08 +0000
commit20ca1aaf5e4282abd03fcb373653e5f18a9cd57f (patch)
tree0fdb5fcb9bd94747075d24b719905e39c2ed06b1 /src/emu/sound
parentedf6aa3d8e2cafac5af8c52e0f3833c51e6a2658 (diff)
Konami PPC updates:
- Fixed sound clocking to match PCB readmes [RetroRepair] - Labeled inputs in GTI Club [RetroRepair] - RF5c400 envelope timing based on chip output rate instead of MAME output rate [R. Belmont]
Diffstat (limited to 'src/emu/sound')
-rw-r--r--src/emu/sound/k056800.c4
-rw-r--r--src/emu/sound/k056800.h4
-rw-r--r--src/emu/sound/rf5c400.c6
3 files changed, 8 insertions, 6 deletions
diff --git a/src/emu/sound/k056800.c b/src/emu/sound/k056800.c
index 3c6b40005fe..1d587d92c18 100644
--- a/src/emu/sound/k056800.c
+++ b/src/emu/sound/k056800.c
@@ -141,7 +141,7 @@ static DEVICE_START( k056800 )
{
k056800_state *k056800 = k056800_get_safe_token(device);
const k056800_interface *intf = k056800_get_interface(device);
- attotime timer_period = attotime::from_hz(44100) * 128; // roughly 2.9us
+ attotime timer_period = attotime::from_hz(device->clock()) * 14700 * 3;
k056800->irq_cb = intf->irq_cb;
@@ -198,3 +198,5 @@ void k056800_device::device_reset()
{
DEVICE_RESET_NAME( k056800 )(this);
}
+
+
diff --git a/src/emu/sound/k056800.h b/src/emu/sound/k056800.h
index fe08dce7bab..d1dfacecded 100644
--- a/src/emu/sound/k056800.h
+++ b/src/emu/sound/k056800.h
@@ -48,8 +48,8 @@ extern const device_type K056800;
DEVICE CONFIGURATION MACROS
***************************************************************************/
-#define MCFG_K056800_ADD(_tag, _interface) \
- MCFG_DEVICE_ADD(_tag, K056800, 0) \
+#define MCFG_K056800_ADD(_tag, _interface, _clock) \
+ MCFG_DEVICE_ADD(_tag, K056800, _clock) \
MCFG_DEVICE_CONFIG(_interface)
diff --git a/src/emu/sound/rf5c400.c b/src/emu/sound/rf5c400.c
index 5188c56aedf..d15fe196575 100644
--- a/src/emu/sound/rf5c400.c
+++ b/src/emu/sound/rf5c400.c
@@ -262,7 +262,7 @@ static void rf5c400_init_chip(device_t *device, rf5c400_state *info)
double r;
// attack
- r = 1.0 / (ENV_AR_SPEED * device->machine().sample_rate());
+ r = 1.0 / (ENV_AR_SPEED * (device->clock() / 384));
for (i = 0; i < ENV_MIN_AR; i++)
{
info->env_ar_table[i] = 1.0;
@@ -278,7 +278,7 @@ static void rf5c400_init_chip(device_t *device, rf5c400_state *info)
}
// decay
- r = -1.0 / (ENV_DR_SPEED * device->machine().sample_rate());
+ r = -5.0 / (ENV_DR_SPEED * (device->clock() / 384));
for (i = 0; i < ENV_MIN_DR; i++)
{
info->env_dr_table[i] = r;
@@ -294,7 +294,7 @@ static void rf5c400_init_chip(device_t *device, rf5c400_state *info)
}
// release
- r = -1.0 / (ENV_RR_SPEED * device->machine().sample_rate());
+ r = -5.0 / (ENV_RR_SPEED * (device->clock() / 384));
for (i = 0; i < ENV_MIN_RR; i++)
{
info->env_rr_table[i] = r;