summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu')
-rw-r--r--src/devices/cpu/h6280/h6280.cpp6
-rw-r--r--src/devices/cpu/h6280/h6280.h5
2 files changed, 8 insertions, 3 deletions
diff --git a/src/devices/cpu/h6280/h6280.cpp b/src/devices/cpu/h6280/h6280.cpp
index 32c7a0578fa..02450ff10d2 100644
--- a/src/devices/cpu/h6280/h6280.cpp
+++ b/src/devices/cpu/h6280/h6280.cpp
@@ -176,6 +176,7 @@ h6280_device::h6280_device(const machine_config &mconfig, const char *tag, devic
, m_port_in_cb(*this)
, m_port_out_cb(*this)
, m_psg(*this, "psg")
+ , m_timer_scale(1)
{
// build the opcode table
for (int op = 0; op < 256; op++)
@@ -344,7 +345,7 @@ void h6280_device::device_reset()
/* timer off by default */
m_timer_status = 0;
- m_timer_load = 128 * 1024;
+ m_timer_load = 128 * 1024 * m_timer_scale;
m_irq_pending = 0;
}
@@ -2571,9 +2572,8 @@ WRITE8_MEMBER( h6280_device::timer_w )
switch (offset & 1)
{
case 0: /* Counter preload */
- //m_timer_load = m_timer_value = ((data & 127) + 1) * 1024;
// matches HW behaviour, value is latched only with 0->1 counter enable transition
- m_timer_load = ((data & 127) + 1) * 1024;
+ m_timer_load = ((data & 127) + 1) * 1024 * m_timer_scale;
return;
case 1: /* Counter enable */
diff --git a/src/devices/cpu/h6280/h6280.h b/src/devices/cpu/h6280/h6280.h
index 5e45a0fe7b9..86483beca98 100644
--- a/src/devices/cpu/h6280/h6280.h
+++ b/src/devices/cpu/h6280/h6280.h
@@ -41,6 +41,9 @@ public:
auto port_in_cb() { return m_port_in_cb.bind(); } // K0-7 at Pinout
auto port_out_cb() { return m_port_out_cb.bind(); } // O0-7 at Pinout
+ // hack to fix music speed in some Data East games (core bug, external strapping, DE 45 customization or ???)
+ void set_timer_scale(int scale) { m_timer_scale = scale; }
+
/* functions for use by the PSG and joypad port only! */
uint8_t io_get_buffer();
void io_set_buffer(uint8_t);
@@ -374,6 +377,8 @@ protected:
// other internal states
int m_icount;
+ uint8_t m_timer_scale;
+
// address spaces
address_space *m_program;
address_space *m_io;