summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine')
-rw-r--r--src/devices/machine/68230pit.cpp4
-rw-r--r--src/devices/machine/8042kbdc.cpp2
-rw-r--r--src/devices/machine/8530scc.cpp6
-rw-r--r--src/devices/machine/aicartc.cpp2
-rw-r--r--src/devices/machine/am2910.cpp2
-rw-r--r--src/devices/machine/am79c90.cpp2
-rw-r--r--src/devices/machine/arm_iomd.cpp2
-rw-r--r--src/devices/machine/bq4847.cpp4
-rw-r--r--src/devices/machine/bq48x2.cpp8
-rw-r--r--src/devices/machine/busmouse.cpp2
-rw-r--r--src/devices/machine/cdp1879.cpp2
-rw-r--r--src/devices/machine/com8116.cpp2
-rw-r--r--src/devices/machine/dp8573.cpp2
-rw-r--r--src/devices/machine/ds1302.cpp2
-rw-r--r--src/devices/machine/ds1386.cpp2
-rw-r--r--src/devices/machine/ds1994.cpp2
-rw-r--r--src/devices/machine/ds2404.cpp2
-rw-r--r--src/devices/machine/e0516.cpp2
-rw-r--r--src/devices/machine/fga002.cpp36
-rw-r--r--src/devices/machine/generalplus_gpl16250soc.cpp2
-rw-r--r--src/devices/machine/hd63450.cpp12
-rw-r--r--src/devices/machine/hd64610.cpp2
-rw-r--r--src/devices/machine/i8279.cpp2
-rw-r--r--src/devices/machine/icm7170.cpp2
-rw-r--r--src/devices/machine/kb3600.cpp2
-rw-r--r--src/devices/machine/keyboard.ipp2
-rw-r--r--src/devices/machine/m3002.cpp2
-rw-r--r--src/devices/machine/mc14411.cpp4
-rw-r--r--src/devices/machine/mc68328.cpp2
-rw-r--r--src/devices/machine/mc68901.cpp13
-rw-r--r--src/devices/machine/mccs1850.cpp2
-rw-r--r--src/devices/machine/microtch.cpp2
-rw-r--r--src/devices/machine/mm5740.cpp2
-rw-r--r--src/devices/machine/mm58167.cpp2
-rw-r--r--src/devices/machine/mos6526.cpp2
-rw-r--r--src/devices/machine/msm5832.cpp2
-rw-r--r--src/devices/machine/msm58321.cpp2
-rw-r--r--src/devices/machine/pcf8573.cpp2
-rw-r--r--src/devices/machine/pcf8583.cpp2
-rw-r--r--src/devices/machine/pcf8593.cpp2
-rw-r--r--src/devices/machine/r10788.cpp2
-rw-r--r--src/devices/machine/ripple_counter.cpp2
-rw-r--r--src/devices/machine/rp5c01.cpp4
-rw-r--r--src/devices/machine/rp5c15.cpp14
-rw-r--r--src/devices/machine/rtc4543.cpp2
-rw-r--r--src/devices/machine/rtc65271.cpp2
-rw-r--r--src/devices/machine/rtc9701.cpp2
-rw-r--r--src/devices/machine/s3520cf.cpp2
-rw-r--r--src/devices/machine/s3c24xx.cpp5
-rw-r--r--src/devices/machine/s3c24xx.hxx6
-rw-r--r--src/devices/machine/s3c44b0.cpp8
-rw-r--r--src/devices/machine/s_smp.cpp4
-rw-r--r--src/devices/machine/sa1110.cpp10
-rw-r--r--src/devices/machine/sa1111.cpp10
-rw-r--r--src/devices/machine/scc68070.cpp4
-rw-r--r--src/devices/machine/scn_pci.cpp2
-rw-r--r--src/devices/machine/scnxx562.cpp6
-rw-r--r--src/devices/machine/smioc.cpp2
-rw-r--r--src/devices/machine/spg290_cdservo.cpp2
-rw-r--r--src/devices/machine/spg290_timer.cpp2
-rw-r--r--src/devices/machine/spg2xx_audio.cpp4
-rw-r--r--src/devices/machine/spg2xx_io.cpp24
-rw-r--r--src/devices/machine/timekpr.cpp2
-rw-r--r--src/devices/machine/tms9901.cpp2
-rw-r--r--src/devices/machine/upd1990a.cpp2
-rw-r--r--src/devices/machine/upd4991a.cpp2
-rw-r--r--src/devices/machine/upd4992.cpp2
-rw-r--r--src/devices/machine/v3021.cpp2
-rw-r--r--src/devices/machine/wozfdc.cpp2
-rw-r--r--src/devices/machine/ym2148.cpp2
-rw-r--r--src/devices/machine/ym3802.cpp6
-rw-r--r--src/devices/machine/z80ctc.cpp4
-rw-r--r--src/devices/machine/z80scc.cpp8
-rw-r--r--src/devices/machine/z80sti.cpp8
-rw-r--r--src/devices/machine/z8536.cpp2
75 files changed, 156 insertions, 158 deletions
diff --git a/src/devices/machine/68230pit.cpp b/src/devices/machine/68230pit.cpp
index 16b25955048..fe60cb1c07e 100644
--- a/src/devices/machine/68230pit.cpp
+++ b/src/devices/machine/68230pit.cpp
@@ -674,13 +674,13 @@ void pit68230_device::wr_pitreg_tcr(uint8_t data)
if (clk == 1)
{
int rate = clock() / (psc == 1 ? 32 : 1);
- pit_timer->adjust(attotime::from_hz(rate), TIMER_ID_PIT, attotime::from_hz(rate));
+ pit_timer->adjust_periodic(attotime::from_hz(rate), TIMER_ID_PIT);
LOG("PIT timer started @ rate: %d and CLK: %d,\n", rate, clock());
}
}
else
{
- pit_timer->adjust(attotime::never, TIMER_ID_PIT, attotime::never);
+ pit_timer->adjust(attotime::never, TIMER_ID_PIT);
}
}
diff --git a/src/devices/machine/8042kbdc.cpp b/src/devices/machine/8042kbdc.cpp
index 2789da21dfd..b0b7265486d 100644
--- a/src/devices/machine/8042kbdc.cpp
+++ b/src/devices/machine/8042kbdc.cpp
@@ -100,7 +100,7 @@ void kbdc8042_device::device_reset()
m_mouse_y = 0;
m_mouse_btn = 0;
- m_update_timer->adjust(attotime::from_hz(100), 0, attotime::from_hz(100));
+ m_update_timer->adjust_periodic(attotime::from_hz(100));
}
void kbdc8042_device::at_8042_set_outport(uint8_t data, int initial)
diff --git a/src/devices/machine/8530scc.cpp b/src/devices/machine/8530scc.cpp
index f90fa48734a..7096c8b791d 100644
--- a/src/devices/machine/8530scc.cpp
+++ b/src/devices/machine/8530scc.cpp
@@ -146,11 +146,11 @@ void scc8530_legacy_device::device_timer(timer_instance const &timer)
if (rate)
{
attotime attorate = attotime::from_hz(rate);
- pChan->baudtimer->adjust(attorate, 0, attorate);
+ pChan->baudtimer->adjust_periodic(attorate);
}
else
{
- pChan->baudtimer->adjust(attotime::never, 0, attotime::never);
+ pChan->baudtimer->adjust(attotime::never);
}
}
@@ -401,7 +401,7 @@ void scc8530_legacy_device::putreg(int ch, uint8_t data)
int brconst = pChan->reg_val[13]<<8 | pChan->reg_val[14];
int rate = clock() / brconst;
- pChan->baudtimer->adjust(attotime::from_hz(rate), 0, attotime::from_hz(rate));
+ pChan->baudtimer->adjust_periodic(attotime::from_hz(rate));
}
break;
diff --git a/src/devices/machine/aicartc.cpp b/src/devices/machine/aicartc.cpp
index fea8ac9f127..862d8900427 100644
--- a/src/devices/machine/aicartc.cpp
+++ b/src/devices/machine/aicartc.cpp
@@ -55,7 +55,7 @@ void aicartc_device::device_validity_check(validity_checker &valid) const
void aicartc_device::device_start()
{
m_clock_timer = timer_alloc();
- m_clock_timer->adjust(attotime::from_hz(clock()), 0, attotime::from_hz(clock()));
+ m_clock_timer->adjust_periodic(attotime::from_hz(clock()));
}
diff --git a/src/devices/machine/am2910.cpp b/src/devices/machine/am2910.cpp
index 048c6d580e2..8e3607bd6c4 100644
--- a/src/devices/machine/am2910.cpp
+++ b/src/devices/machine/am2910.cpp
@@ -83,7 +83,7 @@ void am2910_device::device_reset()
memset(m_stack, 0, sizeof(uint16_t) * 5);
if (m_execute_timer)
- m_execute_timer->adjust(attotime::from_hz(clock()), 0, attotime::from_hz(clock()));
+ m_execute_timer->adjust_periodic(attotime::from_hz(clock()));
}
void am2910_device::device_timer(timer_instance const &timer)
diff --git a/src/devices/machine/am79c90.cpp b/src/devices/machine/am79c90.cpp
index d7ce069ed42..08dc1695a98 100644
--- a/src/devices/machine/am79c90.cpp
+++ b/src/devices/machine/am79c90.cpp
@@ -88,7 +88,7 @@ void am7990_device_base::device_start()
m_dma_out_cb.resolve_safe();
m_transmit_poll = timer_alloc(*this, FUNC(am7990_device_base::transmit_poll));
- m_transmit_poll->adjust(TX_POLL_PERIOD, 0, TX_POLL_PERIOD);
+ m_transmit_poll->adjust_periodic(TX_POLL_PERIOD);
save_item(NAME(m_rap));
save_item(NAME(m_csr));
diff --git a/src/devices/machine/arm_iomd.cpp b/src/devices/machine/arm_iomd.cpp
index dcb5d4cac87..bb2d8f69ff4 100644
--- a/src/devices/machine/arm_iomd.cpp
+++ b/src/devices/machine/arm_iomd.cpp
@@ -502,7 +502,7 @@ inline void arm_iomd_device::trigger_timer(unsigned Which)
if(val==0)
m_timer[Which]->adjust(attotime::never);
else
- m_timer[Which]->adjust(attotime::from_usec(val), 0, attotime::from_usec(val));
+ m_timer[Which]->adjust_periodic(attotime::from_usec(val));
}
// TODO: live updates aren't really supported here
diff --git a/src/devices/machine/bq4847.cpp b/src/devices/machine/bq4847.cpp
index 11420baf1a0..44cd6aee434 100644
--- a/src/devices/machine/bq4847.cpp
+++ b/src/devices/machine/bq4847.cpp
@@ -410,7 +410,7 @@ void bq4847_device::set_periodic_timer()
if (rateval == 0)
m_periodic_timer->reset();
else
- m_periodic_timer->adjust(attotime::from_hz(rate), 0, attotime::from_hz(rate));
+ m_periodic_timer->adjust_periodic(attotime::from_hz(rate));
}
void bq4847_device::set_watchdog_timer(bool on)
@@ -488,7 +488,7 @@ void bq4847_device::connect_osc(bool conn)
if (conn)
{
// The internal update cycle is 1 sec
- m_clock_timer->adjust(attotime::from_seconds(1), 0, attotime::from_seconds(1));
+ m_clock_timer->adjust_periodic(attotime::from_seconds(1));
set_periodic_timer();
}
else
diff --git a/src/devices/machine/bq48x2.cpp b/src/devices/machine/bq48x2.cpp
index 59a937e6763..fa38098bc38 100644
--- a/src/devices/machine/bq48x2.cpp
+++ b/src/devices/machine/bq48x2.cpp
@@ -343,7 +343,7 @@ void bq48x2_device::write(offs_t address, uint8_t data)
case reg_days:
if (data & FLAG_FTE)
// Test mode
- m_periodic_timer->adjust(attotime::from_hz(1024), 0, attotime::from_hz(1024));
+ m_periodic_timer->adjust_periodic(attotime::from_hz(1024));
else
{
// reset to periodic timing
@@ -401,14 +401,14 @@ void bq48x2_device::set_periodic_timer()
m_periodic_timer->reset();
break;
case 1:
- m_periodic_timer->adjust(attotime::from_msec(10), 0, attotime::from_msec(10));
+ m_periodic_timer->adjust_periodic(attotime::from_msec(10));
break;
case 2:
- m_periodic_timer->adjust(attotime::from_msec(100), 0, attotime::from_msec(100));
+ m_periodic_timer->adjust_periodic(attotime::from_msec(100));
break;
default:
rate = 1 << (16-rateval);
- m_periodic_timer->adjust(attotime::from_hz(rate), 0, attotime::from_hz(rate));
+ m_periodic_timer->adjust_periodic(attotime::from_hz(rate));
break;
}
}
diff --git a/src/devices/machine/busmouse.cpp b/src/devices/machine/busmouse.cpp
index b0daf5ad454..47daa44ec63 100644
--- a/src/devices/machine/busmouse.cpp
+++ b/src/devices/machine/busmouse.cpp
@@ -156,7 +156,7 @@ void bus_mouse_device::device_reset()
{
int hz = 2 * 15 * ioport("irq_rate")->read();
- m_irq_timer->adjust(attotime::from_hz(hz), 0, attotime::from_hz(hz));
+ m_irq_timer->adjust_periodic(attotime::from_hz(hz));
irq = 0;
irq_disabled = 1;
diff --git a/src/devices/machine/cdp1879.cpp b/src/devices/machine/cdp1879.cpp
index 4a21a360ef7..96430fd03bd 100644
--- a/src/devices/machine/cdp1879.cpp
+++ b/src/devices/machine/cdp1879.cpp
@@ -37,7 +37,7 @@ void cdp1879_device::device_start()
{
// allocate timers
m_clock_timer = timer_alloc();
- m_clock_timer->adjust(attotime::from_seconds(1), 0, attotime::from_seconds(1));
+ m_clock_timer->adjust_periodic(attotime::from_seconds(1));
m_irq_w.resolve_safe();
diff --git a/src/devices/machine/com8116.cpp b/src/devices/machine/com8116.cpp
index b68f8826fa1..bd986460a07 100644
--- a/src/devices/machine/com8116.cpp
+++ b/src/devices/machine/com8116.cpp
@@ -143,7 +143,7 @@ void com8116_device::device_start()
if (!m_fx4_handler.isnull())
{
m_fx4_timer = timer_alloc(TIMER_FX4);
- m_fx4_timer->adjust(attotime::from_hz((clock() / 4) * 2), 0, attotime::from_hz((clock() / 4)) * 2);
+ m_fx4_timer->adjust_periodic(attotime::from_hz((clock() / 4) * 2));
}
m_fr_timer = timer_alloc(TIMER_FR);
m_ft_timer = timer_alloc(TIMER_FT);
diff --git a/src/devices/machine/dp8573.cpp b/src/devices/machine/dp8573.cpp
index aa1ab164cab..0260278a9ba 100644
--- a/src/devices/machine/dp8573.cpp
+++ b/src/devices/machine/dp8573.cpp
@@ -46,7 +46,7 @@ void dp8573_device::device_start()
m_tscr = 0;
- m_timer->adjust(attotime::from_msec(1), 0, attotime::from_msec(1));
+ m_timer->adjust_periodic(attotime::from_msec(1));
}
void dp8573_device::sync_time()
diff --git a/src/devices/machine/ds1302.cpp b/src/devices/machine/ds1302.cpp
index 1d0d3376483..54c8334d9c3 100644
--- a/src/devices/machine/ds1302.cpp
+++ b/src/devices/machine/ds1302.cpp
@@ -102,7 +102,7 @@ void ds1302_device::device_start()
{
// allocate timers
m_clock_timer = timer_alloc();
- m_clock_timer->adjust(attotime::from_hz(clock() / 32768), 0, attotime::from_hz(clock() / 32768));
+ m_clock_timer->adjust_periodic(attotime::from_hz(clock() / 32768));
m_clk = 0;
m_ce = 0;
diff --git a/src/devices/machine/ds1386.cpp b/src/devices/machine/ds1386.cpp
index 7d45b6cc686..9db09844e25 100644
--- a/src/devices/machine/ds1386.cpp
+++ b/src/devices/machine/ds1386.cpp
@@ -111,7 +111,7 @@ void ds1386_device::device_start()
// allocate timers
m_clock_timer = timer_alloc(CLOCK_TIMER);
- m_clock_timer->adjust(attotime::from_hz(100), 0, attotime::from_hz(100));
+ m_clock_timer->adjust_periodic(attotime::from_hz(100));
m_square_timer = timer_alloc(SQUAREWAVE_TIMER);
m_square_timer->adjust(attotime::never);
m_watchdog_timer = timer_alloc(WATCHDOG_TIMER);
diff --git a/src/devices/machine/ds1994.cpp b/src/devices/machine/ds1994.cpp
index 7c84d37e51f..1390f3eab53 100644
--- a/src/devices/machine/ds1994.cpp
+++ b/src/devices/machine/ds1994.cpp
@@ -119,7 +119,7 @@ void ds1994_device::device_start()
m_timer_reset = timer_alloc(TIMER_RESET);
m_timer_clock = timer_alloc(TIMER_CLOCK);
- m_timer_clock->adjust(attotime::from_hz(256), 0, attotime::from_hz(256));
+ m_timer_clock->adjust_periodic(attotime::from_hz(256));
}
void ds1994_device::device_reset()
diff --git a/src/devices/machine/ds2404.cpp b/src/devices/machine/ds2404.cpp
index d2b54b0f79a..704e7b10db0 100644
--- a/src/devices/machine/ds2404.cpp
+++ b/src/devices/machine/ds2404.cpp
@@ -74,7 +74,7 @@ void ds2404_device::device_start()
elem = STATE_IDLE;
m_tick_timer = timer_alloc(0);
- m_tick_timer->adjust(attotime::from_hz(256), 0, attotime::from_hz(256));
+ m_tick_timer->adjust_periodic(attotime::from_hz(256));
}
diff --git a/src/devices/machine/e0516.cpp b/src/devices/machine/e0516.cpp
index 2833c150e8b..fb3ea2731ee 100644
--- a/src/devices/machine/e0516.cpp
+++ b/src/devices/machine/e0516.cpp
@@ -55,7 +55,7 @@ void e0516_device::device_start()
{
// allocate timers
m_timer = timer_alloc();
- m_timer->adjust(attotime::from_hz(clock() / 32768), 0, attotime::from_hz(clock() / 32768));
+ m_timer->adjust_periodic(attotime::from_hz(clock() / 32768));
// state saving
save_item(NAME(m_cs));
diff --git a/src/devices/machine/fga002.cpp b/src/devices/machine/fga002.cpp
index a1891fd481a..d111f3659b3 100644
--- a/src/devices/machine/fga002.cpp
+++ b/src/devices/machine/fga002.cpp
@@ -154,7 +154,7 @@ void fga002_device::device_timer(timer_instance const &timer)
{
if ((m_fga002[FGA_TIM0CTL] & REG_TIM0CTL_ZERO_STOP) == 0)
{
- fga_timer->adjust(attotime::never, TIMER_ID_FGA, attotime::never);
+ fga_timer->adjust(attotime::never, TIMER_ID_FGA);
}
else
{
@@ -408,27 +408,27 @@ void fga002_device::do_fga002reg_tim0ctl_w(uint8_t data)
if ((data & REG_TIM0CTL_START_STOP) != (m_fga002[FGA_TIM0CTL] & REG_TIM0CTL_START_STOP))
{
if ((data & REG_TIM0CTL_START_STOP) == 0)
- fga_timer->adjust(attotime::never, TIMER_ID_FGA, attotime::never);
+ fga_timer->adjust(attotime::never, TIMER_ID_FGA);
else
{
switch (data & REG_TIM0CTL_CLK_MSK)
{
- case REG_TIM0CTL_CLK_1_MIC: fga_timer->adjust(attotime::from_usec(1), TIMER_ID_FGA, attotime::from_usec(1)); break;
- case REG_TIM0CTL_CLK_2_MIC: fga_timer->adjust(attotime::from_usec(2), TIMER_ID_FGA, attotime::from_usec(2)); break;
- case REG_TIM0CTL_CLK_4_MIC: fga_timer->adjust(attotime::from_usec(4), TIMER_ID_FGA, attotime::from_usec(4)); break;
- case REG_TIM0CTL_CLK_8_MIC: fga_timer->adjust(attotime::from_usec(8), TIMER_ID_FGA, attotime::from_usec(8)); break;
- case REG_TIM0CTL_CLK_16_MIC: fga_timer->adjust(attotime::from_usec(16), TIMER_ID_FGA, attotime::from_usec(16)); break;
- case REG_TIM0CTL_CLK_32_MIC: fga_timer->adjust(attotime::from_usec(32), TIMER_ID_FGA, attotime::from_usec(32)); break;
- case REG_TIM0CTL_CLK_64_MIC: fga_timer->adjust(attotime::from_usec(64), TIMER_ID_FGA, attotime::from_usec(64)); break;
- case REG_TIM0CTL_CLK_128_MIC: fga_timer->adjust(attotime::from_usec(128), TIMER_ID_FGA, attotime::from_usec(128)); break;
- case REG_TIM0CTL_CLK_256_MIC: fga_timer->adjust(attotime::from_usec(256), TIMER_ID_FGA, attotime::from_usec(256)); break;
- case REG_TIM0CTL_CLK_512_MIC: fga_timer->adjust(attotime::from_usec(512), TIMER_ID_FGA, attotime::from_usec(512)); break;
- case REG_TIM0CTL_CLK_2_MIL: fga_timer->adjust(attotime::from_msec(2), TIMER_ID_FGA, attotime::from_msec(2)); break;
- case REG_TIM0CTL_CLK_8_MIL: fga_timer->adjust(attotime::from_msec(8), TIMER_ID_FGA, attotime::from_msec(8)); break;
- case REG_TIM0CTL_CLK_32_MIL: fga_timer->adjust(attotime::from_msec(32), TIMER_ID_FGA, attotime::from_msec(32)); break;
- case REG_TIM0CTL_CLK_125_MIL: fga_timer->adjust(attotime::from_msec(125), TIMER_ID_FGA, attotime::from_msec(125)); break;
- case REG_TIM0CTL_CLK_500_MIL: fga_timer->adjust(attotime::from_msec(500), TIMER_ID_FGA, attotime::from_msec(500)); break;
- case REG_TIM0CTL_CLK_2_SEC: fga_timer->adjust(attotime::from_seconds(2), TIMER_ID_FGA, attotime::from_seconds(2)); break;
+ case REG_TIM0CTL_CLK_1_MIC: fga_timer->adjust_periodic(attotime::from_usec(1), TIMER_ID_FGA); break;
+ case REG_TIM0CTL_CLK_2_MIC: fga_timer->adjust_periodic(attotime::from_usec(2), TIMER_ID_FGA); break;
+ case REG_TIM0CTL_CLK_4_MIC: fga_timer->adjust_periodic(attotime::from_usec(4), TIMER_ID_FGA); break;
+ case REG_TIM0CTL_CLK_8_MIC: fga_timer->adjust_periodic(attotime::from_usec(8), TIMER_ID_FGA); break;
+ case REG_TIM0CTL_CLK_16_MIC: fga_timer->adjust_periodic(attotime::from_usec(16), TIMER_ID_FGA); break;
+ case REG_TIM0CTL_CLK_32_MIC: fga_timer->adjust_periodic(attotime::from_usec(32), TIMER_ID_FGA); break;
+ case REG_TIM0CTL_CLK_64_MIC: fga_timer->adjust_periodic(attotime::from_usec(64), TIMER_ID_FGA); break;
+ case REG_TIM0CTL_CLK_128_MIC: fga_timer->adjust_periodic(attotime::from_usec(128), TIMER_ID_FGA); break;
+ case REG_TIM0CTL_CLK_256_MIC: fga_timer->adjust_periodic(attotime::from_usec(256), TIMER_ID_FGA); break;
+ case REG_TIM0CTL_CLK_512_MIC: fga_timer->adjust_periodic(attotime::from_usec(512), TIMER_ID_FGA); break;
+ case REG_TIM0CTL_CLK_2_MIL: fga_timer->adjust_periodic(attotime::from_msec(2), TIMER_ID_FGA); break;
+ case REG_TIM0CTL_CLK_8_MIL: fga_timer->adjust_periodic(attotime::from_msec(8), TIMER_ID_FGA); break;
+ case REG_TIM0CTL_CLK_32_MIL: fga_timer->adjust_periodic(attotime::from_msec(32), TIMER_ID_FGA); break;
+ case REG_TIM0CTL_CLK_125_MIL: fga_timer->adjust_periodic(attotime::from_msec(125), TIMER_ID_FGA); break;
+ case REG_TIM0CTL_CLK_500_MIL: fga_timer->adjust_periodic(attotime::from_msec(500), TIMER_ID_FGA); break;
+ case REG_TIM0CTL_CLK_2_SEC: fga_timer->adjust_periodic(attotime::from_seconds(2), TIMER_ID_FGA); break;
default: logerror("REG_TIM0CTL programmer error, please report\n"); break; // Should never happen
}
}
diff --git a/src/devices/machine/generalplus_gpl16250soc.cpp b/src/devices/machine/generalplus_gpl16250soc.cpp
index b85c98a13d8..4653b5296bc 100644
--- a/src/devices/machine/generalplus_gpl16250soc.cpp
+++ b/src/devices/machine/generalplus_gpl16250soc.cpp
@@ -1628,7 +1628,7 @@ void sunplus_gcm394_base_device::device_reset()
m_system_dma_memtype = 0x0000;
- m_unk_timer->adjust(attotime::from_hz(60), 0, attotime::from_hz(60));
+ m_unk_timer->adjust_periodic(attotime::from_hz(60));
m_spg_video->set_video_spaces(this->space(AS_PROGRAM), *m_cs_space, m_csbase);
m_spg_video->reset();
diff --git a/src/devices/machine/hd63450.cpp b/src/devices/machine/hd63450.cpp
index a747e98060c..745157e84d0 100644
--- a/src/devices/machine/hd63450.cpp
+++ b/src/devices/machine/hd63450.cpp
@@ -307,9 +307,9 @@ void hd63450_device::dma_transfer_start(int channel)
else if (!(m_reg[channel].ocr & 2))
m_timer[channel]->adjust(attotime::from_usec(500), channel, m_our_clock[channel]);
else if ((m_reg[channel].ocr & 3) == 3)
- m_timer[channel]->adjust(attotime::from_usec(500), channel, attotime::never);
+ m_timer[channel]->adjust(attotime::from_usec(500), channel);
else if ((m_reg[channel].ocr & 3) == 2)
- m_timer[channel]->adjust(attotime::never, channel, attotime::never);
+ m_timer[channel]->adjust(attotime::never, channel);
m_transfer_size[channel] = m_reg[channel].mtc;
@@ -534,7 +534,7 @@ WRITE_LINE_MEMBER(hd63450_device::drq0_w)
{
// in cycle steal mode drq is supposed to be edge triggered
single_transfer(0);
- m_timer[0]->adjust(m_our_clock[0], 0, m_our_clock[0]);
+ m_timer[0]->adjust_periodic(m_our_clock[0], 0);
}
else if (!state)
m_timer[0]->adjust(attotime::never);
@@ -548,7 +548,7 @@ WRITE_LINE_MEMBER(hd63450_device::drq1_w)
if ((m_reg[1].ocr & 2) && (state && !ostate))
{
single_transfer(1);
- m_timer[1]->adjust(m_our_clock[1], 1, m_our_clock[1]);
+ m_timer[1]->adjust_periodic(m_our_clock[1], 1);
}
else if (!state)
m_timer[1]->adjust(attotime::never);
@@ -562,7 +562,7 @@ WRITE_LINE_MEMBER(hd63450_device::drq2_w)
if ((m_reg[2].ocr & 2) && (state && !ostate))
{
single_transfer(2);
- m_timer[2]->adjust(m_our_clock[2], 2, m_our_clock[2]);
+ m_timer[2]->adjust_periodic(m_our_clock[2], 2);
}
else if (!state)
m_timer[2]->adjust(attotime::never);
@@ -576,7 +576,7 @@ WRITE_LINE_MEMBER(hd63450_device::drq3_w)
if ((m_reg[3].ocr & 2) && (state && !ostate))
{
single_transfer(3);
- m_timer[3]->adjust(m_our_clock[3], 3, m_our_clock[3]);
+ m_timer[3]->adjust_periodic(m_our_clock[3], 3);
}
else if (!state)
m_timer[3]->adjust(attotime::never);
diff --git a/src/devices/machine/hd64610.cpp b/src/devices/machine/hd64610.cpp
index 3c9b067592b..a4f28a13f08 100644
--- a/src/devices/machine/hd64610.cpp
+++ b/src/devices/machine/hd64610.cpp
@@ -175,7 +175,7 @@ void hd64610_device::device_start()
// allocate timers
m_counter_timer = timer_alloc(TIMER_UPDATE_COUNTER);
- m_counter_timer->adjust(attotime::from_hz(clock() / 256), 0, attotime::from_hz(clock() / 256));
+ m_counter_timer->adjust_periodic(attotime::from_hz(clock() / 256));
// state saving
save_item(NAME(m_regs));
diff --git a/src/devices/machine/i8279.cpp b/src/devices/machine/i8279.cpp
index ed58648166e..9305c187d4b 100644
--- a/src/devices/machine/i8279.cpp
+++ b/src/devices/machine/i8279.cpp
@@ -181,7 +181,7 @@ void i8279_device::timer_adjust()
if (m_scanclock != new_clock)
{
- m_timer->adjust(attotime::from_ticks(64, new_clock), 0, attotime::from_ticks(64, new_clock));
+ m_timer->adjust_periodic(attotime::from_ticks(64, new_clock));
m_scanclock = new_clock;
}
diff --git a/src/devices/machine/icm7170.cpp b/src/devices/machine/icm7170.cpp
index 534b5c4c4c7..65d6248ce6b 100644
--- a/src/devices/machine/icm7170.cpp
+++ b/src/devices/machine/icm7170.cpp
@@ -90,7 +90,7 @@ void icm7170_device::device_start()
m_timer = timer_alloc(ICM7170_TIMER_ID);
// TODO: frequency should be based on input clock and divisor
- m_timer->adjust(attotime::from_hz(100), 0, attotime::from_hz(100));
+ m_timer->adjust_periodic(attotime::from_hz(100));
m_timer->enable(false);
save_item(NAME(m_regs));
diff --git a/src/devices/machine/kb3600.cpp b/src/devices/machine/kb3600.cpp
index 1cb3960be48..86e88ddf8f2 100644
--- a/src/devices/machine/kb3600.cpp
+++ b/src/devices/machine/kb3600.cpp
@@ -83,7 +83,7 @@ void ay3600_device::device_start()
// allocate timers
m_scan_timer = timer_alloc();
- m_scan_timer->adjust(attotime::from_hz(60), 0, attotime::from_hz(60));
+ m_scan_timer->adjust_periodic(attotime::from_hz(60));
m_ako = 0;
diff --git a/src/devices/machine/keyboard.ipp b/src/devices/machine/keyboard.ipp
index 5cbe54d5095..fc864f1d2e2 100644
--- a/src/devices/machine/keyboard.ipp
+++ b/src/devices/machine/keyboard.ipp
@@ -53,7 +53,7 @@ template <uint8_t ROW_COUNT>
void device_matrix_keyboard_interface<ROW_COUNT>::start_processing(const attotime &period)
{
m_processing = 1U;
- m_scan_timer.adjust(period, 0, period);
+ m_scan_timer.adjust_periodic(period);
}
diff --git a/src/devices/machine/m3002.cpp b/src/devices/machine/m3002.cpp
index 55339217544..b5827f3aef2 100644
--- a/src/devices/machine/m3002.cpp
+++ b/src/devices/machine/m3002.cpp
@@ -102,7 +102,7 @@ void m3002_device::device_start()
void m3002_device::device_clock_changed()
{
attotime second = clocks_to_attotime(32768);
- m_second_timer->adjust(second, 0, second);
+ m_second_timer->adjust_periodic(second);
}
diff --git a/src/devices/machine/mc14411.cpp b/src/devices/machine/mc14411.cpp
index 7935de29cb1..41d3fde2461 100644
--- a/src/devices/machine/mc14411.cpp
+++ b/src/devices/machine/mc14411.cpp
@@ -181,7 +181,7 @@ void mc14411_device::arm_timer(int i)
if (i < TIMER_F15)
divider *= s_divider_select[m_divider];
attotime half_cycle = clocks_to_attotime(divider) / 2; // 2 flanks per cycle
- m_fx_timer[i]->adjust(half_cycle, i, half_cycle);
+ m_fx_timer[i]->adjust_periodic(half_cycle, i);
LOGSETUP(" - arming timer for F%d at %fHz (/%d)\n", i + 1, double(clock()) / divider, divider);
}
@@ -206,7 +206,7 @@ void mc14411_device::device_reset()
if (m_reset == ASSERT_LINE)
{
- m_reset_timer->adjust(attotime::from_nsec((double)900), TIMER_ID_RESET, attotime::from_nsec((double)900));
+ m_reset_timer->adjust_periodic(attotime::from_nsec((double)900), TIMER_ID_RESET);
}
}
diff --git a/src/devices/machine/mc68328.cpp b/src/devices/machine/mc68328.cpp
index 7a8fa1e3fd2..3c8637dc34a 100644
--- a/src/devices/machine/mc68328.cpp
+++ b/src/devices/machine/mc68328.cpp
@@ -583,7 +583,7 @@ void mc68328_device::device_reset()
m_regs.rtcienr = 0x00;
m_regs.stpwtch = 0x00;
- m_rtc->adjust(attotime::from_hz(1), 0, attotime::from_hz(1));
+ m_rtc->adjust_periodic(attotime::from_hz(1));
}
diff --git a/src/devices/machine/mc68901.cpp b/src/devices/machine/mc68901.cpp
index 4905629bd33..261e6046474 100644
--- a/src/devices/machine/mc68901.cpp
+++ b/src/devices/machine/mc68901.cpp
@@ -696,7 +696,7 @@ void mc68901_device::write(offs_t offset, u8 data)
{
int divisor = PRESCALER[m_tacr & 0x07];
LOG("MC68901 Timer A Delay Mode : %u Prescale\n", divisor);
- m_timer[TIMER_A]->adjust(attotime::from_hz(m_timer_clock / divisor), 0, attotime::from_hz(m_timer_clock / divisor));
+ m_timer[TIMER_A]->adjust_periodic(attotime::from_hz(m_timer_clock / divisor));
}
break;
@@ -715,7 +715,7 @@ void mc68901_device::write(offs_t offset, u8 data)
{
int divisor = PRESCALER[m_tacr & 0x07];
LOG("MC68901 Timer A Pulse Width Mode : %u Prescale\n", divisor);
- m_timer[TIMER_A]->adjust(attotime::never, 0, attotime::from_hz(m_timer_clock / divisor));
+ m_timer[TIMER_A]->adjust(attotime::never);
m_timer[TIMER_A]->enable(false);
}
break;
@@ -751,7 +751,7 @@ void mc68901_device::write(offs_t offset, u8 data)
{
int divisor = PRESCALER[m_tbcr & 0x07];
LOG("MC68901 Timer B Delay Mode : %u Prescale\n", divisor);
- m_timer[TIMER_B]->adjust(attotime::from_hz(m_timer_clock / divisor), 0, attotime::from_hz(m_timer_clock / divisor));
+ m_timer[TIMER_B]->adjust_periodic(attotime::from_hz(m_timer_clock / divisor));
}
break;
@@ -768,9 +768,8 @@ void mc68901_device::write(offs_t offset, u8 data)
case TCR_TIMER_PULSE_100:
case TCR_TIMER_PULSE_200:
{
- int divisor = PRESCALER[m_tbcr & 0x07];
LOG("MC68901 Timer B Pulse Width Mode : %u Prescale\n", DIVISOR);
- m_timer[TIMER_B]->adjust(attotime::never, 0, attotime::from_hz(m_timer_clock / divisor));
+ m_timer[TIMER_B]->adjust(attotime::never);
m_timer[TIMER_B]->enable(false);
}
break;
@@ -806,7 +805,7 @@ void mc68901_device::write(offs_t offset, u8 data)
{
int divisor = PRESCALER[m_tcdcr & 0x07];
LOG("MC68901 Timer D Delay Mode : %u Prescale\n", divisor);
- m_timer[TIMER_D]->adjust(attotime::from_hz(m_timer_clock / divisor), 0, attotime::from_hz(m_timer_clock / divisor));
+ m_timer[TIMER_D]->adjust_periodic(attotime::from_hz(m_timer_clock / divisor));
}
break;
}
@@ -828,7 +827,7 @@ void mc68901_device::write(offs_t offset, u8 data)
{
int divisor = PRESCALER[(m_tcdcr >> 4) & 0x07];
LOG("MC68901 Timer C Delay Mode : %u Prescale\n", divisor);
- m_timer[TIMER_C]->adjust(attotime::from_hz(m_timer_clock / divisor), 0, attotime::from_hz(m_timer_clock / divisor));
+ m_timer[TIMER_C]->adjust_periodic(attotime::from_hz(m_timer_clock / divisor));
}
break;
}
diff --git a/src/devices/machine/mccs1850.cpp b/src/devices/machine/mccs1850.cpp
index 3a272d8f65f..4f9793212a7 100644
--- a/src/devices/machine/mccs1850.cpp
+++ b/src/devices/machine/mccs1850.cpp
@@ -325,7 +325,7 @@ void mccs1850_device::device_start()
// allocate timers
m_clock_timer = timer_alloc(TIMER_CLOCK);
- m_clock_timer->adjust(attotime::from_hz(clock() / 32768), 0, attotime::from_hz(clock() / 32768));
+ m_clock_timer->adjust_periodic(attotime::from_hz(clock() / 32768));
// state saving
save_item(NAME(m_pse));
diff --git a/src/devices/machine/microtch.cpp b/src/devices/machine/microtch.cpp
index 2e26e384c52..82274bfb06a 100644
--- a/src/devices/machine/microtch.cpp
+++ b/src/devices/machine/microtch.cpp
@@ -228,7 +228,7 @@ void microtouch_device::device_start()
m_last_touch_state = -1;
m_timer = timer_alloc();
- m_timer->adjust(attotime::from_hz(167*5), 0, attotime::from_hz(167*5));
+ m_timer->adjust_periodic(attotime::from_hz(167*5));
m_format = FORMAT_UNKNOWN;
m_mode = MODE_INACTIVE;
diff --git a/src/devices/machine/mm5740.cpp b/src/devices/machine/mm5740.cpp
index 43939ee9be2..925dd4a1acf 100644
--- a/src/devices/machine/mm5740.cpp
+++ b/src/devices/machine/mm5740.cpp
@@ -80,7 +80,7 @@ void mm5740_device::device_start()
// allocate timers
m_scan_timer = timer_alloc();
- m_scan_timer->adjust(attotime::from_hz(clock()), 0, attotime::from_hz(clock()));
+ m_scan_timer->adjust_periodic(attotime::from_hz(clock()));
// state saving
save_item(NAME(m_b));
diff --git a/src/devices/machine/mm58167.cpp b/src/devices/machine/mm58167.cpp
index 4ba9308615d..4e3275344d2 100644
--- a/src/devices/machine/mm58167.cpp
+++ b/src/devices/machine/mm58167.cpp
@@ -68,7 +68,7 @@ void mm58167_device::device_start()
{
// allocate timers
m_clock_timer = timer_alloc();
- m_clock_timer->adjust(attotime::from_hz(clock() / 32.768f), 0, attotime::from_hz(clock() / 32.768f));
+ m_clock_timer->adjust_periodic(attotime::from_hz(clock() / 32.768f));
m_irq_w.resolve_safe();
diff --git a/src/devices/machine/mos6526.cpp b/src/devices/machine/mos6526.cpp
index 8cf896c1922..7a274ec4832 100644
--- a/src/devices/machine/mos6526.cpp
+++ b/src/devices/machine/mos6526.cpp
@@ -645,7 +645,7 @@ void mos6526_device::device_start()
if (m_tod_clock > 0)
{
m_tod_timer = timer_alloc();
- m_tod_timer->adjust(attotime::from_hz(m_tod_clock), 0, attotime::from_hz(m_tod_clock));
+ m_tod_timer->adjust_periodic(attotime::from_hz(m_tod_clock));
}
// state saving
diff --git a/src/devices/machine/msm5832.cpp b/src/devices/machine/msm5832.cpp
index 2e0dcae56da..12a4d914ae2 100644
--- a/src/devices/machine/msm5832.cpp
+++ b/src/devices/machine/msm5832.cpp
@@ -111,7 +111,7 @@ void msm5832_device::device_start()
{
// allocate timers
m_clock_timer = timer_alloc(TIMER_CLOCK);
- m_clock_timer->adjust(attotime::from_hz(clock() / 32768), 0, attotime::from_hz(clock() / 32768));
+ m_clock_timer->adjust_periodic(attotime::from_hz(clock() / 32768));
// state saving
save_item(NAME(m_reg));
diff --git a/src/devices/machine/msm58321.cpp b/src/devices/machine/msm58321.cpp
index 842879f3c0a..d31e64ccea3 100644
--- a/src/devices/machine/msm58321.cpp
+++ b/src/devices/machine/msm58321.cpp
@@ -210,7 +210,7 @@ void msm58321_device::device_start()
// allocate timers
m_clock_timer = timer_alloc(TIMER_CLOCK);
- m_clock_timer->adjust(clocks_to_attotime(32768/1024), 0, clocks_to_attotime(32768/1024));
+ m_clock_timer->adjust_periodic(clocks_to_attotime(32768/1024));
// busy signal active period is approximately 427 µs
m_busy_timer = timer_alloc(TIMER_BUSY);
diff --git a/src/devices/machine/pcf8573.cpp b/src/devices/machine/pcf8573.cpp
index 860a443d84d..68e7cadf10f 100644
--- a/src/devices/machine/pcf8573.cpp
+++ b/src/devices/machine/pcf8573.cpp
@@ -62,7 +62,7 @@ void pcf8573_device::device_start()
// allocate timers
m_clock_timer = timer_alloc();
- m_clock_timer->adjust(attotime::from_hz(clock() / 32768), 0, attotime::from_hz(clock() / 32768));
+ m_clock_timer->adjust_periodic(attotime::from_hz(clock() / 32768));
// state saving
save_item(NAME(m_scl));
diff --git a/src/devices/machine/pcf8583.cpp b/src/devices/machine/pcf8583.cpp
index 5286c63bdea..2e13c41896b 100644
--- a/src/devices/machine/pcf8583.cpp
+++ b/src/devices/machine/pcf8583.cpp
@@ -56,7 +56,7 @@ pcf8583_device::pcf8583_device(const machine_config &mconfig, const char *tag, d
void pcf8583_device::device_start()
{
m_timer = timer_alloc(TIMER_TICK);
- m_timer->adjust(attotime::from_hz(100), 0, attotime::from_hz(100));
+ m_timer->adjust_periodic(attotime::from_hz(100));
save_item(NAME(m_scl));
save_item(NAME(m_sdaw));
diff --git a/src/devices/machine/pcf8593.cpp b/src/devices/machine/pcf8593.cpp
index 3a07050cae7..83e0cc70adc 100644
--- a/src/devices/machine/pcf8593.cpp
+++ b/src/devices/machine/pcf8593.cpp
@@ -64,7 +64,7 @@ void pcf8593_device::device_start()
_logerror( 0, ("pcf8593_init\n"));
memset(m_register, 0, sizeof(m_register));
m_timer = timer_alloc(TIMER_UPDATE_COUNTER);
- m_timer->adjust(attotime::from_seconds(1), 0, attotime::from_seconds(1));
+ m_timer->adjust_periodic(attotime::from_seconds(1));
}
//-------------------------------------------------
diff --git a/src/devices/machine/r10788.cpp b/src/devices/machine/r10788.cpp
index 56470527373..b48501c108e 100644
--- a/src/devices/machine/r10788.cpp
+++ b/src/devices/machine/r10788.cpp
@@ -82,7 +82,7 @@ void r10788_device::device_start()
m_timer = timer_alloc(TIMER_DISPLAY);
// recurring timer every 36 cycles
- m_timer->adjust(clocks_to_attotime(36), 0, clocks_to_attotime(36));
+ m_timer->adjust_periodic(clocks_to_attotime(36));
}
/**
diff --git a/src/devices/machine/ripple_counter.cpp b/src/devices/machine/ripple_counter.cpp
index 881313164e8..037a2fc3a8c 100644
--- a/src/devices/machine/ripple_counter.cpp
+++ b/src/devices/machine/ripple_counter.cpp
@@ -111,7 +111,7 @@ void ripple_counter_device::device_start()
void ripple_counter_device::device_clock_changed()
{
attotime freq = m_reset ? attotime::never : clocks_to_attotime(1);
- m_count_timer->adjust(freq, 0, freq);
+ m_count_timer->adjust_periodic(freq, 0);
}
diff --git a/src/devices/machine/rp5c01.cpp b/src/devices/machine/rp5c01.cpp
index 4fa58898c18..51081976af8 100644
--- a/src/devices/machine/rp5c01.cpp
+++ b/src/devices/machine/rp5c01.cpp
@@ -202,10 +202,10 @@ void rp5c01_device::device_start()
if (clock() > 0)
{
m_clock_timer = timer_alloc(TIMER_CLOCK);
- m_clock_timer->adjust(attotime::from_hz(clock() / 16384), 0, attotime::from_hz(clock() / 16384));
+ m_clock_timer->adjust_periodic(attotime::from_hz(clock() / 16384));
m_16hz_timer = timer_alloc(TIMER_16HZ);
- m_16hz_timer->adjust(attotime::from_hz(clock() / 1024), 0, attotime::from_hz(clock() / 1024));
+ m_16hz_timer->adjust_periodic(attotime::from_hz(clock() / 1024));
}
memset(m_reg, 0, sizeof(m_reg));
diff --git a/src/devices/machine/rp5c15.cpp b/src/devices/machine/rp5c15.cpp
index 411909225a6..24ab1960d73 100644
--- a/src/devices/machine/rp5c15.cpp
+++ b/src/devices/machine/rp5c15.cpp
@@ -208,10 +208,10 @@ void rp5c15_device::device_start()
// allocate timers
m_clock_timer = timer_alloc(TIMER_CLOCK);
- m_clock_timer->adjust(attotime::from_hz(clock() / 16384), 0, attotime::from_hz(clock() / 16384));
+ m_clock_timer->adjust_periodic(attotime::from_hz(clock() / 16384));
m_16hz_timer = timer_alloc(TIMER_16HZ);
- m_16hz_timer->adjust(attotime::from_hz(clock() / 1024), 0, attotime::from_hz(clock() / 1024));
+ m_16hz_timer->adjust_periodic(attotime::from_hz(clock() / 1024));
m_clkout_timer = timer_alloc(TIMER_CLKOUT);
@@ -378,23 +378,23 @@ void rp5c15_device::write(offs_t offset, uint8_t data)
switch (data & 0x07)
{
case CLKOUT_16384_HZ:
- m_clkout_timer->adjust(attotime::from_hz(clock()), 0, attotime::from_hz(clock()));
+ m_clkout_timer->adjust_periodic(attotime::from_hz(clock()));
break;
case CLKOUT_1024_HZ:
- m_clkout_timer->adjust(attotime::from_hz(clock() / 16), 0, attotime::from_hz(clock() / 16));
+ m_clkout_timer->adjust_periodic(attotime::from_hz(clock() / 16));
break;
case CLKOUT_128_HZ:
- m_clkout_timer->adjust(attotime::from_hz(clock() / 128), 0, attotime::from_hz(clock() / 128));
+ m_clkout_timer->adjust_periodic(attotime::from_hz(clock() / 128));
break;
case CLKOUT_16_HZ:
- m_clkout_timer->adjust(attotime::from_hz(clock() / 1024), 0, attotime::from_hz(clock() / 1024));
+ m_clkout_timer->adjust_periodic(attotime::from_hz(clock() / 1024));
break;
case CLKOUT_1_HZ:
- m_clkout_timer->adjust(attotime::from_hz(clock() / 16384), 0, attotime::from_hz(clock() / 16384));
+ m_clkout_timer->adjust_periodic(attotime::from_hz(clock() / 16384));
break;
case CLKOUT_1_DIV_60_HZ:
diff --git a/src/devices/machine/rtc4543.cpp b/src/devices/machine/rtc4543.cpp
index 2b4554f77d6..7bb4913042b 100644
--- a/src/devices/machine/rtc4543.cpp
+++ b/src/devices/machine/rtc4543.cpp
@@ -74,7 +74,7 @@ void rtc4543_device::device_start()
// allocate timers
m_clock_timer = timer_alloc();
- m_clock_timer->adjust(attotime::from_hz(clock() / 32768), 0, attotime::from_hz(clock() / 32768));
+ m_clock_timer->adjust_periodic(attotime::from_hz(clock() / 32768));
// state saving
save_item(NAME(m_ce));
diff --git a/src/devices/machine/rtc65271.cpp b/src/devices/machine/rtc65271.cpp
index bc8261052bb..cdcd15f451a 100644
--- a/src/devices/machine/rtc65271.cpp
+++ b/src/devices/machine/rtc65271.cpp
@@ -678,7 +678,7 @@ rtc65271_device::rtc65271_device(const machine_config &mconfig, const char *tag,
void rtc65271_device::device_start()
{
m_update_timer = timer_alloc(*this, FUNC(rtc65271_device::rtc_begin_update_cb));
- m_update_timer->adjust(attotime::from_seconds(1), 0, attotime::from_seconds(1));
+ m_update_timer->adjust_periodic(attotime::from_seconds(1));
m_SQW_timer = timer_alloc(*this, FUNC(rtc65271_device::rtc_SQW_cb));
m_interrupt_cb.resolve();
diff --git a/src/devices/machine/rtc9701.cpp b/src/devices/machine/rtc9701.cpp
index d5f8c175ad2..c67575932ab 100644
--- a/src/devices/machine/rtc9701.cpp
+++ b/src/devices/machine/rtc9701.cpp
@@ -93,7 +93,7 @@ void rtc9701_device::device_start()
{
/* let's call the timer callback every second */
m_timer = timer_alloc(*this, FUNC(rtc9701_device::timer_callback));
- m_timer->adjust(attotime::from_hz(clock() / XTAL(32'768)), 0, attotime::from_hz(clock() / XTAL(32'768)));
+ m_timer->adjust_periodic(attotime::from_hz(clock() / XTAL(32'768)));
system_time systime;
machine().base_datetime(systime);
diff --git a/src/devices/machine/s3520cf.cpp b/src/devices/machine/s3520cf.cpp
index 08f77422764..ed95155d9ed 100644
--- a/src/devices/machine/s3520cf.cpp
+++ b/src/devices/machine/s3520cf.cpp
@@ -106,7 +106,7 @@ void s3520cf_device::device_start()
{
/* let's call the timer callback every second for now */
m_timer = timer_alloc(*this, FUNC(s3520cf_device::timer_callback));
- m_timer->adjust(attotime::from_hz(clock() / XTAL(32'768)), 0, attotime::from_hz(clock() / XTAL(32'768)));
+ m_timer->adjust_periodic(attotime::from_hz(clock() / XTAL(32'768)));
system_time systime;
machine().base_datetime(systime);
diff --git a/src/devices/machine/s3c24xx.cpp b/src/devices/machine/s3c24xx.cpp
index 40cebd1b643..5de7ced7b3f 100644
--- a/src/devices/machine/s3c24xx.cpp
+++ b/src/devices/machine/s3c24xx.cpp
@@ -97,8 +97,7 @@ void s3c24xx_peripheral_types::rtc_t::reset()
std::memset(&regs, 0, sizeof(regs));
regs.almday = 1;
regs.almmon = 1;
- timer_update->adjust(attotime::never);
- timer_update->adjust(attotime::from_msec(1000), 0, attotime::from_msec(1000));
+ timer_update->adjust_periodic(attotime::from_msec(1000));
}
void s3c24xx_peripheral_types::rtc_t::recalc()
@@ -108,7 +107,7 @@ void s3c24xx_peripheral_types::rtc_t::recalc()
uint32_t const ttc = BITS(regs.ticnt, 6, 0);
double const freq = 128.0 / (ttc + 1);
LOG("ttc %u freq %f\n", ttc, freq);
- timer_tick_count->adjust(attotime::from_hz(freq), 0, attotime::from_hz(freq));
+ timer_tick_count->adjust_periodic(attotime::from_hz(freq));
}
else
{
diff --git a/src/devices/machine/s3c24xx.hxx b/src/devices/machine/s3c24xx.hxx
index 77928803397..335a982ba92 100644
--- a/src/devices/machine/s3c24xx.hxx
+++ b/src/devices/machine/s3c24xx.hxx
@@ -1425,7 +1425,7 @@ void S3C24_CLASS_NAME::s3c24xx_pwm_start(int timer)
m_pwm.freq[timer] = freq;
if (auto_reload)
{
- m_pwm.timer[timer]->adjust(attotime::from_hz(hz), timer, attotime::from_hz(hz));
+ m_pwm.timer[timer]->adjust_periodic(attotime::from_hz(hz), timer);
}
else
{
@@ -2160,7 +2160,7 @@ void S3C24_CLASS_NAME::s3c24xx_wdt_start()
freq = (double)pclk / (prescaler + 1) / clock;
hz = freq / m_wdt.regs.wtcnt;
LOGMASKED(LOG_WDT, "watchdog start: pclk %d prescaler %d clock %d freq %f hz %f\n", pclk, prescaler, clock, freq, hz);
- m_wdt.timer->adjust( attotime::from_hz( hz), 0, attotime::from_hz( hz));
+ m_wdt.timer->adjust_periodic( attotime::from_hz( hz));
#if defined(DEVICE_S3C2410)
m_wdt.freq = freq;
m_wdt.cnt = m_wdt.regs.wtcnt;
@@ -2468,7 +2468,7 @@ void S3C24_CLASS_NAME::s3c24xx_iis_start()
int pclk = s3c24xx_get_pclk();
double freq = ((double)pclk / (prescaler_control_a + 1) / codeclk_table[codeclk]) * 2; // why do I have to multiply by two?
LOGMASKED(LOG_I2S, "IIS - pclk %d psc_enable %d psc_a %d psc_b %d codeclk %d freq %f\n", pclk, prescaler_enable, prescaler_control_a, prescaler_control_b, codeclk_table[codeclk], freq);
- m_iis.timer->adjust( attotime::from_hz( freq), 0, attotime::from_hz( freq));
+ m_iis.timer->adjust_periodic( attotime::from_hz( freq));
}
void S3C24_CLASS_NAME::s3c24xx_iis_stop()
diff --git a/src/devices/machine/s3c44b0.cpp b/src/devices/machine/s3c44b0.cpp
index b19eac7063c..d27ad6ee902 100644
--- a/src/devices/machine/s3c44b0.cpp
+++ b/src/devices/machine/s3c44b0.cpp
@@ -1155,7 +1155,7 @@ void s3c44b0_device::pwm_start(int timer)
{
if (auto_reload)
{
- m_pwm.timer[timer]->adjust(attotime::from_hz(hz), timer, attotime::from_hz(hz));
+ m_pwm.timer[timer]->adjust_periodic(attotime::from_hz(hz), timer);
}
else
{
@@ -1609,7 +1609,7 @@ void s3c44b0_device::uart_w(int ch, uint32_t offset, uint32_t data, uint32_t mem
mclk = get_mclk();
hz = (mclk / (m_uart->regs.ubrdiv + 1)) / 16;
verboselog( *this, 5, "UART %d - mclk %08X hz %08X\n", ch, mclk, hz);
- m_uart->timer->adjust(attotime::from_hz(hz), ch, attotime::from_hz(hz));
+ m_uart->timer->adjust_periodic(attotime::from_hz(hz), ch);
}
break;
}
@@ -1696,7 +1696,7 @@ void s3c44b0_device::wdt_start()
freq = (double)mclk / (prescaler + 1) / clock;
hz = freq / m_wdt.regs.wtcnt;
verboselog( *this, 5, "WDT mclk %d prescaler %d clock %d freq %f hz %f\n", mclk, prescaler, clock, freq, hz);
- m_wdt.timer->adjust(attotime::from_hz(hz), 0, attotime::from_hz(hz));
+ m_wdt.timer->adjust_periodic(attotime::from_hz(hz));
}
void s3c44b0_device::wdt_stop()
@@ -1912,7 +1912,7 @@ void s3c44b0_device::iis_start()
freq = (double)mclk / div[prescaler];
hz = freq / 256 * 2;
verboselog( *this, 5, "IIS mclk %d prescaler %d freq %f hz %f\n", mclk, prescaler, freq, hz);
- m_iis.timer->adjust(attotime::from_hz(hz), 0, attotime::from_hz(hz));
+ m_iis.timer->adjust_periodic(attotime::from_hz(hz));
}
void s3c44b0_device::iis_stop()
diff --git a/src/devices/machine/s_smp.cpp b/src/devices/machine/s_smp.cpp
index c2dca533bc8..862c44c1b57 100644
--- a/src/devices/machine/s_smp.cpp
+++ b/src/devices/machine/s_smp.cpp
@@ -130,7 +130,7 @@ void s_smp_device::device_reset()
}
attotime period = attotime::from_ticks(32, clock());
- m_tick_timer->adjust(period, 0, period);
+ m_tick_timer->adjust_periodic(period);
spc700_device::device_reset();
}
@@ -142,7 +142,7 @@ void s_smp_device::device_reset()
void s_smp_device::device_clock_changed()
{
attotime period = attotime::from_ticks(32, clock());
- m_tick_timer->adjust(period, 0, period);
+ m_tick_timer->adjust_periodic(period);
}
//-------------------------------------------------
diff --git a/src/devices/machine/sa1110.cpp b/src/devices/machine/sa1110.cpp
index 70f2f068ce1..c47bc148f2d 100644
--- a/src/devices/machine/sa1110.cpp
+++ b/src/devices/machine/sa1110.cpp
@@ -914,10 +914,10 @@ attotime sa1110_periphs_device::mcp_get_telecom_frame_rate()
void sa1110_periphs_device::mcp_update_sample_rate()
{
const attotime audio_rate = mcp_get_audio_frame_rate();
- m_mcp_regs.audio_tx_timer->adjust(audio_rate, 0, audio_rate);
+ m_mcp_regs.audio_tx_timer->adjust_periodic(audio_rate);
const attotime telecom_rate = mcp_get_telecom_frame_rate();
- m_mcp_regs.telecom_tx_timer->adjust(telecom_rate, 0, telecom_rate);
+ m_mcp_regs.telecom_tx_timer->adjust_periodic(telecom_rate);
}
void sa1110_periphs_device::mcp_set_enabled(bool enabled)
@@ -1197,8 +1197,8 @@ void sa1110_periphs_device::ssp_update_enable_state()
uint64_t bit_count = (m_ssp_regs.sscr0 & SSCR0_DSS_MASK) >> SSCR0_DSS_BIT;
uint32_t clock_rate = 2 * (((m_ssp_regs.sscr0 & SSCR0_SCR_MASK) >> SSCR0_SCR_BIT) + 1);
attotime packet_rate = attotime::from_ticks(bit_count * clock_rate, 3686400);
- m_ssp_regs.rx_timer->adjust(packet_rate, 0, packet_rate);
- m_ssp_regs.tx_timer->adjust(packet_rate, 0, packet_rate);
+ m_ssp_regs.rx_timer->adjust_periodic(packet_rate);
+ m_ssp_regs.tx_timer->adjust_periodic(packet_rate);
}
else
{
@@ -2567,7 +2567,7 @@ void sa1110_periphs_device::device_reset()
m_rtc_regs.rcnr = 0;
m_rtc_regs.rttr = 0;
m_rtc_regs.rtsr = 0;
- m_rtc_regs.tick_timer->adjust(attotime::from_seconds(1), 0, attotime::from_seconds(1));
+ m_rtc_regs.tick_timer->adjust_periodic(attotime::from_seconds(1));
// init power regs
m_power_regs.pmcr = 0;
diff --git a/src/devices/machine/sa1111.cpp b/src/devices/machine/sa1111.cpp
index e35977793d5..649531a4e13 100644
--- a/src/devices/machine/sa1111.cpp
+++ b/src/devices/machine/sa1111.cpp
@@ -634,7 +634,7 @@ void sa1111_device::audio_start_tx_dma(const uint32_t buf)
const uint32_t divisor = ((m_sk_regs.skaud & SKAUD_ACD_MASK) >> SKAUD_ACD_BIT) + 1;
const uint32_t pll_clock = clock() * 39;
attotime clock_period = attotime::from_ticks(divisor * 128, pll_clock);
- m_audio_regs.tx_dma_timer->adjust(clock_period, 0, clock_period);
+ m_audio_regs.tx_dma_timer->adjust_periodic(clock_period);
LOGMASKED(LOG_AUDIO_DMA, "audio_start_tx_dma, setting start address to %08x, Tx clock to %d / %d\n", m_audio_regs.sadta, pll_clock, divisor);
}
@@ -649,7 +649,7 @@ void sa1111_device::audio_start_rx_dma(const uint32_t buf)
const uint32_t divisor = ((m_sk_regs.skaud & SKAUD_ACD_MASK) >> SKAUD_ACD_BIT) + 1;
const uint32_t pll_clock = clock() * 39;
attotime clock_period = attotime::from_ticks(divisor * 256, pll_clock);
- m_audio_regs.rx_dma_timer->adjust(clock_period, 0, clock_period);
+ m_audio_regs.rx_dma_timer->adjust_periodic(clock_period);
}
void sa1111_device::audio_update_tx_fifo_levels()
@@ -724,7 +724,7 @@ void sa1111_device::audio_tx_fifo_push(uint32_t data)
const uint32_t divisor = ((m_sk_regs.skaud & SKAUD_ACD_MASK) >> SKAUD_ACD_BIT) + 1;
const uint32_t pll_clock = clock() * 39;
attotime clock_period = attotime::from_ticks(divisor * 256, pll_clock);
- m_audio_regs.tx_timer->adjust(clock_period, 0, clock_period);
+ m_audio_regs.tx_timer->adjust_periodic(clock_period);
}
}
}
@@ -1293,8 +1293,8 @@ void sa1111_device::ssp_update_enable_state()
uint64_t bit_count = (m_ssp_regs.sspcr0 & SSPCR0_DSS_MASK) >> SSPCR0_DSS_BIT;
uint32_t clock_rate = 2 * (((m_ssp_regs.sspcr0 & SSPCR0_SCR_MASK) >> SSPCR0_SCR_BIT) + 1);
attotime packet_rate = attotime::from_ticks(bit_count * clock_rate, 3686400);
- m_ssp_regs.rx_timer->adjust(packet_rate, 0, packet_rate);
- m_ssp_regs.tx_timer->adjust(packet_rate, 0, packet_rate);
+ m_ssp_regs.rx_timer->adjust_periodic(packet_rate);
+ m_ssp_regs.tx_timer->adjust_periodic(packet_rate);
}
else
{
diff --git a/src/devices/machine/scc68070.cpp b/src/devices/machine/scc68070.cpp
index c5308d8e597..013f148a0aa 100644
--- a/src/devices/machine/scc68070.cpp
+++ b/src/devices/machine/scc68070.cpp
@@ -775,8 +775,8 @@ void scc68070_device::ucsr_w(uint8_t data)
attotime rx_rate = attotime::from_ticks(s_baud_divisors[(data >> 4) & 7] * 10, 49152000);
attotime tx_rate = attotime::from_ticks(s_baud_divisors[data & 7] * 10, 49152000);
- m_uart.rx_timer->adjust(rx_rate, 0, rx_rate);
- m_uart.tx_timer->adjust(tx_rate, 0, tx_rate);
+ m_uart.rx_timer->adjust_periodic(rx_rate);
+ m_uart.tx_timer->adjust_periodic(tx_rate);
}
uint8_t scc68070_device::ucr_r()
diff --git a/src/devices/machine/scn_pci.cpp b/src/devices/machine/scn_pci.cpp
index bd1e460ac3c..63df936ea57 100644
--- a/src/devices/machine/scn_pci.cpp
+++ b/src/devices/machine/scn_pci.cpp
@@ -1284,7 +1284,7 @@ void scn_pci_device::write_mode(u8 data)
else
{
attotime brg_period = clocks_to_attotime(m_br_div[data & 0x0f]);
- m_brg_timer->adjust(brg_period / 2, 0, brg_period / 2);
+ m_brg_timer->adjust_periodic(brg_period / 2);
}
}
diff --git a/src/devices/machine/scnxx562.cpp b/src/devices/machine/scnxx562.cpp
index 21d9f9824c0..7b8f1482468 100644
--- a/src/devices/machine/scnxx562.cpp
+++ b/src/devices/machine/scnxx562.cpp
@@ -759,7 +759,7 @@ void duscc_channel::device_timer(timer_instance const &timer)
else // Pulse!
{
m_rtxc = 1;
- rtxc_timer->adjust(attotime::from_hz(clock()), TIMER_ID_RTXC, attotime::from_hz(clock()));
+ rtxc_timer->adjust_periodic(attotime::from_hz(clock()), TIMER_ID_RTXC);
}
if (m_index == duscc_device::CHANNEL_A)
m_uart->m_out_rtxca_cb(m_rtxc);
@@ -777,7 +777,7 @@ void duscc_channel::device_timer(timer_instance const &timer)
else // Pulse!
{
m_trxc = 1;
- trxc_timer->adjust(attotime::from_hz(clock()), TIMER_ID_TRXC, attotime::from_hz(clock()));
+ trxc_timer->adjust_periodic(attotime::from_hz(clock()), TIMER_ID_TRXC);
}
if (m_index == duscc_device::CHANNEL_A)
m_uart->m_out_trxca_cb(m_trxc);
@@ -2007,7 +2007,7 @@ void duscc_channel::do_dusccreg_ccr_w(uint8_t data)
/* Start. Starts the counteritimer and prescaler. */
case REG_CCR_START_TIMER: LOG("- Start Counter/Timer\n");
rate = 100; // TODO: calculate correct rate
- duscc_timer->adjust(attotime::from_hz(rate), TIMER_ID_RTXC, attotime::from_hz(rate));
+ duscc_timer->adjust_periodic(attotime::from_hz(rate), TIMER_ID_RTXC);
break;
/* Stop. Stops the counter/timer and prescaler. Since the command may be asynchronous with the selected clock source,
diff --git a/src/devices/machine/smioc.cpp b/src/devices/machine/smioc.cpp
index 3c6bc9a5392..6fb2a565e43 100644
--- a/src/devices/machine/smioc.cpp
+++ b/src/devices/machine/smioc.cpp
@@ -221,7 +221,7 @@ void smioc_device::device_start()
m_m68k_r_cb.resolve_safe(0);
m_m68k_w_cb.resolve_safe();
- m_451_timer->adjust(attotime::from_msec(200), 0, attotime::from_msec(200));
+ m_451_timer->adjust_periodic(attotime::from_msec(200));
}
//-------------------------------------------------
diff --git a/src/devices/machine/spg290_cdservo.cpp b/src/devices/machine/spg290_cdservo.cpp
index 004e3004cfb..6070ff8b90e 100644
--- a/src/devices/machine/spg290_cdservo.cpp
+++ b/src/devices/machine/spg290_cdservo.cpp
@@ -335,7 +335,7 @@ void spg290_cdservo_device::change_status()
if (m_speed == 0 || !m_cdrom.found() || !m_cdrom->get_cdrom_file())
m_cdtimer->adjust(attotime::never);
else
- m_cdtimer->adjust(attotime::from_hz(75 * m_speed), 0, attotime::from_hz(75 * m_speed));
+ m_cdtimer->adjust_periodic(attotime::from_hz(75 * m_speed));
}
void spg290_cdservo_device::add_qsub(int sector, uint8_t addrctrl, uint8_t track, uint8_t index, uint32_t rel_msf, uint32_t abs_msf, uint16_t crc16)
diff --git a/src/devices/machine/spg290_timer.cpp b/src/devices/machine/spg290_timer.cpp
index 909fda5ccdc..f10ae3d4294 100644
--- a/src/devices/machine/spg290_timer.cpp
+++ b/src/devices/machine/spg290_timer.cpp
@@ -51,7 +51,7 @@ void spg290_timer_device::device_reset()
void spg290_timer_device::device_clock_changed()
{
if (m_enabled)
- m_tick_timer->adjust(attotime::from_hz(clock()), 0, attotime::from_hz(clock()));
+ m_tick_timer->adjust_periodic(attotime::from_hz(clock()));
else
m_tick_timer->adjust(attotime::never);
}
diff --git a/src/devices/machine/spg2xx_audio.cpp b/src/devices/machine/spg2xx_audio.cpp
index 9f4db7be594..c59e131d54f 100644
--- a/src/devices/machine/spg2xx_audio.cpp
+++ b/src/devices/machine/spg2xx_audio.cpp
@@ -138,7 +138,7 @@ void spg2xx_audio_device::device_reset()
m_audio_ctrl_regs[AUDIO_CHANNEL_REPEAT] = 0x3f;
m_audio_ctrl_regs[AUDIO_CHANNEL_ENV_MODE] = 0x3f;
- m_audio_beat->adjust(attotime::from_ticks(4, 281250), 0, attotime::from_ticks(4, 281250));
+ m_audio_beat->adjust_periodic(attotime::from_ticks(4, 281250));
for (int i = 0; i < 16; i++)
{
@@ -480,7 +480,7 @@ void spg2xx_audio_device::audio_ctrl_w(offs_t offset, uint16_t data)
m_audio_ctrl_regs[offset] |= mask;
if (BIT(m_audio_ctrl_regs[AUDIO_CHANNEL_FIQ_ENABLE], channel_bit))
{
- m_channel_irq[channel_bit]->adjust(attotime::from_hz(m_channel_rate[channel_bit]), 0, attotime::from_hz(m_channel_rate[channel_bit]));
+ m_channel_irq[channel_bit]->adjust_periodic(attotime::from_hz(m_channel_rate[channel_bit]));
}
else
{
diff --git a/src/devices/machine/spg2xx_io.cpp b/src/devices/machine/spg2xx_io.cpp
index 07729bbb111..8d880ccb32e 100644
--- a/src/devices/machine/spg2xx_io.cpp
+++ b/src/devices/machine/spg2xx_io.cpp
@@ -200,9 +200,9 @@ void spg2xx_io_device::device_reset()
std::fill_n(&m_extint[0], 2, false);
- m_4khz_timer->adjust(attotime::from_hz(4096), 0, attotime::from_hz(4096));
+ m_4khz_timer->adjust_periodic(attotime::from_hz(4096));
- m_rng_timer->adjust(attotime::from_hz(1234), 0, attotime::from_hz(1234)); // timer value is arbitrary, maybe should match system clock, but that would result in heavy switching
+ m_rng_timer->adjust_periodic(attotime::from_hz(1234)); // timer value is arbitrary, maybe should match system clock, but that would result in heavy switching
m_tmb1->adjust(attotime::never);
m_tmb2->adjust(attotime::never);
@@ -688,13 +688,13 @@ void spg2xx_io_device::update_timer_b_rate()
m_timer_src_c->adjust(attotime::never);
break;
case 2:
- m_timer_src_c->adjust(attotime::from_hz(32768), 0, attotime::from_hz(32768));
+ m_timer_src_c->adjust_periodic(attotime::from_hz(32768));
break;
case 3:
- m_timer_src_c->adjust(attotime::from_hz(8192), 0, attotime::from_hz(8192));
+ m_timer_src_c->adjust_periodic(attotime::from_hz(8192));
break;
case 4:
- m_timer_src_c->adjust(attotime::from_hz(4096), 0, attotime::from_hz(4096));
+ m_timer_src_c->adjust_periodic(attotime::from_hz(4096));
break;
}
}
@@ -843,9 +843,9 @@ void spg2xx_io_device::io_w(offs_t offset, uint16_t data)
m_io_regs[REG_TIMEBASE_SETUP] = data;
const uint8_t hifreq = BIT(data, 4);
const uint32_t tmb1freq = s_tmb1_freq[hifreq][data & 3];
- m_tmb1->adjust(attotime::from_hz(tmb1freq), 0, attotime::from_hz(tmb1freq));
+ m_tmb1->adjust_periodic(attotime::from_hz(tmb1freq));
const uint32_t tmb2freq = s_tmb2_freq[hifreq][(data >> 2) & 3];
- m_tmb2->adjust(attotime::from_hz(tmb2freq), 0, attotime::from_hz(tmb2freq));
+ m_tmb2->adjust_periodic(attotime::from_hz(tmb2freq));
break;
}
@@ -880,15 +880,15 @@ void spg2xx_io_device::io_w(offs_t offset, uint16_t data)
m_timer_src_ab->adjust(attotime::never);
break;
case 2:
- m_timer_src_ab->adjust(attotime::from_hz(32768), 0, attotime::from_hz(32768));
+ m_timer_src_ab->adjust_periodic(attotime::from_hz(32768));
timer_a_rate = 32768;
break;
case 3:
- m_timer_src_ab->adjust(attotime::from_hz(8192), 0, attotime::from_hz(8192));
+ m_timer_src_ab->adjust_periodic(attotime::from_hz(8192));
timer_a_rate = 8192;
break;
case 4:
- m_timer_src_ab->adjust(attotime::from_hz(4096), 0, attotime::from_hz(4096));
+ m_timer_src_ab->adjust_periodic(attotime::from_hz(4096));
timer_a_rate = 4096;
break;
}
@@ -1099,7 +1099,7 @@ void spg2xx_io_device::io_w(offs_t offset, uint16_t data)
if (BIT(data, 10))
{
m_io_regs[REG_ADC_DATA] &= ~0x8000;
- m_adc_timer[adc_channel]->adjust(attotime::from_hz(8000), 0, attotime::from_hz(8000));
+ m_adc_timer[adc_channel]->adjust_periodic(attotime::from_hz(8000));
}
}
else
@@ -1334,7 +1334,7 @@ void spg2xx_io_device::io_extended_w(offs_t offset, uint16_t data)
m_spi_tx_fifo_count++;
attotime rate = attotime::from_ticks(m_spi_rate, clock());
- m_spi_tx_timer->adjust(rate, 0, rate);
+ m_spi_tx_timer->adjust_periodic(rate);
}
else
{
diff --git a/src/devices/machine/timekpr.cpp b/src/devices/machine/timekpr.cpp
index b9028e9f69e..8b7306cb7d6 100644
--- a/src/devices/machine/timekpr.cpp
+++ b/src/devices/machine/timekpr.cpp
@@ -228,7 +228,7 @@ void timekeeper_device::device_start()
save_item(NAME(m_watchdog_delay));
emu_timer *timer = timer_alloc();
- timer->adjust(attotime::from_seconds(1), 0, attotime::from_seconds(1));
+ timer->adjust_periodic(attotime::from_seconds(1));
m_watchdog_timer = timer_alloc(*this, FUNC(timekeeper_device::watchdog_callback));
m_watchdog_timer->adjust(attotime::never);
diff --git a/src/devices/machine/tms9901.cpp b/src/devices/machine/tms9901.cpp
index 46aac576122..e45cb2587cc 100644
--- a/src/devices/machine/tms9901.cpp
+++ b/src/devices/machine/tms9901.cpp
@@ -604,7 +604,7 @@ void tms9901_device::device_start()
if (clock() != 0)
{
m_decrementer = timer_alloc(DECREMENTER);
- m_decrementer->adjust(attotime::from_hz(clock() / 64.), 0, attotime::from_hz(clock() / 64.));
+ m_decrementer->adjust_periodic(attotime::from_hz(clock() / 64.));
}
m_read_port.resolve();
diff --git a/src/devices/machine/upd1990a.cpp b/src/devices/machine/upd1990a.cpp
index 4003778c91b..34a3d8ac385 100644
--- a/src/devices/machine/upd1990a.cpp
+++ b/src/devices/machine/upd1990a.cpp
@@ -93,7 +93,7 @@ void upd1990a_device::device_start()
// allocate timers
m_timer_clock = timer_alloc(TIMER_CLOCK);
- m_timer_clock->adjust(attotime::from_hz(clock() / 32768.0), 0, attotime::from_hz(clock() / 32768.0)); // 1 second on XTAL(32'768)
+ m_timer_clock->adjust_periodic(attotime::from_hz(clock() / 32768.0)); // 1 second on XTAL(32'768)
m_timer_tp = timer_alloc(TIMER_TP);
m_timer_data_out = timer_alloc(TIMER_DATA_OUT);
m_timer_test_mode = timer_alloc(TIMER_TEST_MODE);
diff --git a/src/devices/machine/upd4991a.cpp b/src/devices/machine/upd4991a.cpp
index b64e02e4ec3..d04d4d73e29 100644
--- a/src/devices/machine/upd4991a.cpp
+++ b/src/devices/machine/upd4991a.cpp
@@ -63,7 +63,7 @@ void upd4991a_device::device_validity_check(validity_checker &valid) const
void upd4991a_device::device_start()
{
m_timer_clock = timer_alloc(TIMER_CLOCK);
- m_timer_clock->adjust(attotime::from_hz(clock() / 32768), 0, attotime::from_hz(clock() / 32768));
+ m_timer_clock->adjust_periodic(attotime::from_hz(clock() / 32768));
save_item(NAME(m_address));
}
diff --git a/src/devices/machine/upd4992.cpp b/src/devices/machine/upd4992.cpp
index ad2a90dff5e..99ea59f98e1 100644
--- a/src/devices/machine/upd4992.cpp
+++ b/src/devices/machine/upd4992.cpp
@@ -59,7 +59,7 @@ void upd4992_device::device_validity_check(validity_checker &valid) const
void upd4992_device::device_start()
{
m_timer_clock = timer_alloc(TIMER_CLOCK);
- m_timer_clock->adjust(attotime::from_hz(clock() / 32768), 0, attotime::from_hz(clock() / 32768));
+ m_timer_clock->adjust_periodic(attotime::from_hz(clock() / 32768));
}
diff --git a/src/devices/machine/v3021.cpp b/src/devices/machine/v3021.cpp
index e64e7c81111..d452d541b7d 100644
--- a/src/devices/machine/v3021.cpp
+++ b/src/devices/machine/v3021.cpp
@@ -154,7 +154,7 @@ void v3021_device::device_start()
{
/* let's call the timer callback every second */
m_timer = timer_alloc(*this, FUNC(v3021_device::timer_callback));
- m_timer->adjust(attotime::from_hz(clock() / XTAL(32'768)), 0, attotime::from_hz(clock() / XTAL(32'768)));
+ m_timer->adjust_periodic(attotime::from_hz(clock() / XTAL(32'768)));
copy_clock_to_ram();
diff --git a/src/devices/machine/wozfdc.cpp b/src/devices/machine/wozfdc.cpp
index 1f06ad9d837..147f196f9d9 100644
--- a/src/devices/machine/wozfdc.cpp
+++ b/src/devices/machine/wozfdc.cpp
@@ -114,7 +114,7 @@ void wozfdc_device::device_reset()
// Just a timer to be sure that the lss is updated from time to
// time, so that there's no hiccup when it's talked to again.
- timer->adjust(attotime::from_msec(10), 0, attotime::from_msec(10));
+ timer->adjust_periodic(attotime::from_msec(10));
}
void wozfdc_device::a3_update_drive_sel()
diff --git a/src/devices/machine/ym2148.cpp b/src/devices/machine/ym2148.cpp
index f1ea1b5dcd9..648fbbc9015 100644
--- a/src/devices/machine/ym2148.cpp
+++ b/src/devices/machine/ym2148.cpp
@@ -46,7 +46,7 @@ void ym2148_device::device_start()
// Start a timer to trigger at clock / 8 / 16
const attotime rate = clocks_to_attotime(8 * 16);
m_timer = timer_alloc(0);
- m_timer->adjust(rate, 0, rate);
+ m_timer->adjust_periodic(rate);
}
diff --git a/src/devices/machine/ym3802.cpp b/src/devices/machine/ym3802.cpp
index 73805331941..52770507ccd 100644
--- a/src/devices/machine/ym3802.cpp
+++ b/src/devices/machine/ym3802.cpp
@@ -162,7 +162,7 @@ void ym3802_device::reset_midi_timer()
}
if(rate != m_prev_rate)
- m_midi_timer->adjust(attotime::from_hz(rate),0,attotime::from_hz(rate));
+ m_midi_timer->adjust_periodic(attotime::from_hz(rate));
m_prev_rate = rate;
logerror("MIDI Timer rate set to %iHz\n",rate);
}
@@ -263,12 +263,12 @@ void ym3802_device::write(offs_t offset, uint8_t data)
const double rate = (m_reg[REG_CCR] & 0x02) ? m_clkm_rate / 4 : m_clkm_rate / 8;
// start message to click counter
- m_midi_counter_timer->adjust(attotime::from_hz(rate),0,attotime::from_hz(rate));
+ m_midi_counter_timer->adjust_periodic(attotime::from_hz(rate));
}
if((data & 0x07) == 3)
{
// stop message to click counter
- m_midi_counter_timer->adjust(attotime::zero,0,attotime::never);
+ m_midi_counter_timer->adjust(attotime::zero);
}
}
break;
diff --git a/src/devices/machine/z80ctc.cpp b/src/devices/machine/z80ctc.cpp
index 17ed606d085..295d484ad82 100644
--- a/src/devices/machine/z80ctc.cpp
+++ b/src/devices/machine/z80ctc.cpp
@@ -404,7 +404,7 @@ void z80ctc_channel_device::write(u8 data)
if ((m_mode & MODE) == MODE_COUNTER || (m_mode & TRIGGER) == TRIGGER_AUTO)
{
attotime curperiod = period();
- m_timer->adjust(curperiod, 0, curperiod);
+ m_timer->adjust_periodic(curperiod);
}
// else set the bit indicating that we're waiting for the appropriate trigger
@@ -513,7 +513,7 @@ TIMER_CALLBACK_MEMBER(z80ctc_channel_device::timer_callback)
{
attotime curperiod = period();
LOG("Period = %s\n", curperiod.as_string());
- m_timer->adjust(curperiod, 0, curperiod);
+ m_timer->adjust_periodic(curperiod);
// we're no longer waiting
m_mode &= ~WAITING_FOR_TRIG;
diff --git a/src/devices/machine/z80scc.cpp b/src/devices/machine/z80scc.cpp
index 24fa8e6399c..58c306dfef3 100644
--- a/src/devices/machine/z80scc.cpp
+++ b/src/devices/machine/z80scc.cpp
@@ -1199,7 +1199,7 @@ void z80scc_channel::device_timer(timer_instance const &timer)
{
// int rate = owner()->clock() / brconst;
// attotime attorate = attotime::from_hz(rate);
- // baudtimer->adjust(attorate, id, attorate);
+ // baudtimer->adjust_periodic(attorate, id);
txc_w(m_brg_counter & 1);
rxc_w(m_brg_counter & 1);
m_brg_counter++; // Will just keep track of state in timer mode, not hardware counter value.
@@ -1207,7 +1207,7 @@ void z80scc_channel::device_timer(timer_instance const &timer)
else
{
LOG(" - turning off Baudrate timer\n");
- baudtimer->adjust(attotime::never, 0, attotime::never);
+ baudtimer->adjust(attotime::never);
}
}
break;
@@ -2287,7 +2287,7 @@ void z80scc_channel::do_sccreg_wr14(uint8_t data)
if (data & WR14_BRG_SOURCE) // Do we use the PCLK as baudrate source
{
#if Z80SCC_USE_LOCAL_BRG
- baudtimer->adjust(attotime::from_hz(rate), TIMER_ID_BAUD, attotime::from_hz(rate)); // Start the baudrate generator
+ baudtimer->adjust_periodic(attotime::from_hz(rate), TIMER_ID_BAUD); // Start the baudrate generator
#if START_BIT_HUNT
m_rcv_mode = RCV_SEEKING;
#endif
@@ -2297,7 +2297,7 @@ void z80scc_channel::do_sccreg_wr14(uint8_t data)
else if ( (m_wr14 & WR14_BRG_ENABLE) && !(data & WR14_BRG_ENABLE) ) // baud rate generator being disabled?
{
#if Z80SCC_USE_LOCAL_BRG
- baudtimer->adjust(attotime::never, TIMER_ID_BAUD, attotime::never); // Stop the baudrate generator
+ baudtimer->adjust(attotime::never, TIMER_ID_BAUD); // Stop the baudrate generator
m_brg_counter = 0;
#endif
}
diff --git a/src/devices/machine/z80sti.cpp b/src/devices/machine/z80sti.cpp
index 98ab1a5a495..642657e0158 100644
--- a/src/devices/machine/z80sti.cpp
+++ b/src/devices/machine/z80sti.cpp
@@ -462,12 +462,12 @@ void z80sti_device::write(offs_t offset, uint8_t data)
LOG("Z80STI Timer D Prescaler: %u\n", tdc);
if (tcc)
- m_timer[TIMER_C]->adjust(attotime::from_hz(clock() / tcc), TIMER_C, attotime::from_hz(clock() / tcc));
+ m_timer[TIMER_C]->adjust_periodic(attotime::from_hz(clock() / tcc), TIMER_C);
else
m_timer[TIMER_C]->enable(false);
if (tdc)
- m_timer[TIMER_D]->adjust(attotime::from_hz(clock() / tdc), TIMER_D, attotime::from_hz(clock() / tdc));
+ m_timer[TIMER_D]->adjust_periodic(attotime::from_hz(clock() / tdc), TIMER_D);
else
m_timer[TIMER_D]->enable(false);
@@ -568,12 +568,12 @@ void z80sti_device::write(offs_t offset, uint8_t data)
LOG("Z80STI Timer B Prescaler: %u\n", tbc);
if (tac)
- m_timer[TIMER_A]->adjust(attotime::from_hz(clock() / tac), TIMER_A, attotime::from_hz(clock() / tac));
+ m_timer[TIMER_A]->adjust_periodic(attotime::from_hz(clock() / tac), TIMER_A);
else
m_timer[TIMER_A]->enable(false);
if (tbc)
- m_timer[TIMER_B]->adjust(attotime::from_hz(clock() / tbc), TIMER_B, attotime::from_hz(clock() / tbc));
+ m_timer[TIMER_B]->adjust_periodic(attotime::from_hz(clock() / tbc), TIMER_B);
else
m_timer[TIMER_B]->enable(false);
}
diff --git a/src/devices/machine/z8536.cpp b/src/devices/machine/z8536.cpp
index 0de327d5b80..316626aa9f2 100644
--- a/src/devices/machine/z8536.cpp
+++ b/src/devices/machine/z8536.cpp
@@ -827,7 +827,7 @@ void cio_base_device::device_start()
// allocate timer
m_timer = timer_alloc();
- m_timer->adjust(attotime::from_hz(clock() / 2), 0, attotime::from_hz(clock() / 2));
+ m_timer->adjust_periodic(attotime::from_hz(clock() / 2));
// resolve callbacks
m_write_irq.resolve_safe();