summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Patrick Mackinlay <pmackinlay@hotmail.com>2021-10-08 16:15:00 +0700
committer Patrick Mackinlay <pmackinlay@hotmail.com>2021-10-08 16:15:00 +0700
commit16fc6c6e296fd3cc15a8e3142a0fc76c4468256a (patch)
tree928c3e056b6386c27b1392d6f517182fc1f68a76 /src
parentcab3d85d4f44a9db353f5a9221c52eb5b98472ce (diff)
luna_68k: add am9513 gate1 clock
Diffstat (limited to 'src')
-rw-r--r--src/mame/drivers/luna_68k.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/mame/drivers/luna_68k.cpp b/src/mame/drivers/luna_68k.cpp
index 98d4db218ba..7b54396ccd2 100644
--- a/src/mame/drivers/luna_68k.cpp
+++ b/src/mame/drivers/luna_68k.cpp
@@ -22,7 +22,6 @@
* DPU8 video/framebuffer, Bt458 @ 108MHz
* CMC communications (GPIB, Ethernet, serial), 68020 @ 12.5MHz?
*
- * gets stuck at 0x40003880 when testing the am5913 status, expects output 3 active
*/
#include "emu.h"
@@ -35,7 +34,6 @@
#include "machine/mc146818.h"
#include "machine/z80sio.h"
#include "machine/am9513.h"
-#include "machine/timer.h"
// busses and connectors
#include "bus/rs232/rs232.h"
@@ -77,6 +75,13 @@ protected:
void common(machine_config &config);
private:
+ // HACK: this timer drives the am9513 gate1 line
+ void timer(void *ptr, s32 param)
+ {
+ m_stc->gate1_w(1);
+ m_stc->gate1_w(0);
+ }
+
// devices
required_device<m68030_device> m_cpu;
required_device<ram_device> m_ram;
@@ -84,14 +89,19 @@ private:
required_device<upd7201_device> m_sio;
required_device<am9513_device> m_stc;
required_device_array<rs232_port_device, 2> m_serial;
+
+ emu_timer *m_timer;
};
void luna_68k_state::init()
{
+ m_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(luna_68k_state::timer), this));
}
void luna_68k_state::machine_start()
{
+ // HACK: arbitrary/unknown cycle time
+ m_timer->adjust(attotime::from_hz(1'000'000), 0, attotime::from_hz(1'000'000));
}
void luna_68k_state::machine_reset()