From 8c217d0deb5006af21475c29f022c37019a70633 Mon Sep 17 00:00:00 2001 From: angelosa Date: Wed, 27 Dec 2023 00:11:30 +0100 Subject: amiga/amiga_m.cpp: move CIA A TOD writes to vblank end, make Logica CIA Alarm test to work reliably --- src/devices/machine/mos6526.cpp | 5 ----- src/mame/amiga/amiga_m.cpp | 7 +++---- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/devices/machine/mos6526.cpp b/src/devices/machine/mos6526.cpp index f94c180ad4a..fae0b8618bc 100644 --- a/src/devices/machine/mos6526.cpp +++ b/src/devices/machine/mos6526.cpp @@ -1174,11 +1174,6 @@ void mos6526_device::tod_w(int state) if (m_tod == m_alarm) { m_icr |= ICR_ALARM; - if (IMR_ALARM) - { - m_write_irq(ASSERT_LINE); - m_irq = true; - } } } } diff --git a/src/mame/amiga/amiga_m.cpp b/src/mame/amiga/amiga_m.cpp index 93adb100ba6..222da2c62c7 100644 --- a/src/mame/amiga/amiga_m.cpp +++ b/src/mame/amiga/amiga_m.cpp @@ -237,7 +237,7 @@ void amiga_state::vblank() { } -// todo: cia a clock can be connected to either a fixed 50/60hz signal from the power supply, or the vblank +// TODO: CIA A clock can be connected to either a fixed 50/60hz signal from the power supply, or the vblank TIMER_CALLBACK_MEMBER( amiga_state::scanline_callback ) { int scanline = param; @@ -248,9 +248,6 @@ TIMER_CALLBACK_MEMBER( amiga_state::scanline_callback ) // signal vblank irq set_interrupt(INTENA_SETCLR | INTENA_VERTB); - // clock tod - m_cia_0->tod_w(1); - // additional bookkeeping by drivers vblank(); } @@ -258,6 +255,8 @@ TIMER_CALLBACK_MEMBER( amiga_state::scanline_callback ) // vblank end if (scanline == m_screen->visible_area().top()) { + // clock tod + m_cia_0->tod_w(1); m_cia_0->tod_w(0); } -- cgit v1.2.3