diff options
-rw-r--r-- | src/devices/machine/timer.h | 8 | ||||
-rw-r--r-- | src/devices/video/315_5313.cpp | 2 | ||||
-rw-r--r-- | src/mame/fujitsu/fmtowns.cpp | 4 | ||||
-rw-r--r-- | src/mame/jaleco/cischeat.cpp | 4 | ||||
-rw-r--r-- | src/mame/konami/viper.cpp | 3 | ||||
-rw-r--r-- | src/mame/midw8080/8080bw_a.cpp | 6 | ||||
-rw-r--r-- | src/mame/midway/midvunit.cpp | 2 | ||||
-rw-r--r-- | src/mame/namco/namcos22.cpp | 4 | ||||
-rw-r--r-- | src/mame/sega/megacd.cpp | 2 | ||||
-rw-r--r-- | src/mame/sega/model2.cpp | 2 | ||||
-rw-r--r-- | src/mame/sega/segas24.cpp | 2 | ||||
-rw-r--r-- | src/mame/shared/mega32x.cpp | 2 |
12 files changed, 20 insertions, 21 deletions
diff --git a/src/devices/machine/timer.h b/src/devices/machine/timer.h index c002bd3148a..dbd7e0763f6 100644 --- a/src/devices/machine/timer.h +++ b/src/devices/machine/timer.h @@ -97,10 +97,10 @@ public: } // timing information - attotime time_elapsed() const { return m_timer->elapsed(); } - attotime time_left() const { return m_timer->remaining(); } - attotime start_time() const { return m_timer->start(); } - attotime fire_time() const { return m_timer->expire(); } + attotime elapsed() const { return m_timer->elapsed(); } + attotime remaining() const { return m_timer->remaining(); } + attotime start() const { return m_timer->start(); } + attotime expire() const { return m_timer->expire(); } attotime period() const { return m_timer ? m_timer->period() : m_period; } private: diff --git a/src/devices/video/315_5313.cpp b/src/devices/video/315_5313.cpp index c42ab3815e5..eed0c2409c7 100644 --- a/src/devices/video/315_5313.cpp +++ b/src/devices/video/315_5313.cpp @@ -1241,7 +1241,7 @@ u16 sega315_5313_device::get_hposition() { attotime time_elapsed_since_megadriv_scanline_timer; - time_elapsed_since_megadriv_scanline_timer = m_megadriv_scanline_timer->time_elapsed(); + time_elapsed_since_megadriv_scanline_timer = m_megadriv_scanline_timer->elapsed(); if (time_elapsed_since_megadriv_scanline_timer.attoseconds() < (ATTOSECONDS_PER_SECOND/get_framerate() /double(m_total_scanlines))) { diff --git a/src/mame/fujitsu/fmtowns.cpp b/src/mame/fujitsu/fmtowns.cpp index 59e5829e3ad..8cecbb14c82 100644 --- a/src/mame/fujitsu/fmtowns.cpp +++ b/src/mame/fujitsu/fmtowns.cpp @@ -334,10 +334,10 @@ uint8_t towns_state::towns_system_r(offs_t offset) if(LOG_SYS) logerror("SYS: port 0x25 read\n"); return 0x00; /* case 0x06: - count = (m_towns_freerun_counter->time_elapsed() * ATTOSECONDS_TO_HZ(ATTOSECONDS_IN_USEC(1))).as_double(); + count = (m_towns_freerun_counter->elapsed() * ATTOSECONDS_TO_HZ(ATTOSECONDS_IN_USEC(1))).as_double(); return count & 0xff; case 0x07: - count = (m_towns_freerun_counter->time_elapsed() * ATTOSECONDS_TO_HZ(ATTOSECONDS_IN_USEC(1))).as_double(); + count = (m_towns_freerun_counter->elapsed() * ATTOSECONDS_TO_HZ(ATTOSECONDS_IN_USEC(1))).as_double(); return (count >> 8) & 0xff; */ case 0x06: //if(LOG_SYS) logerror("SYS: (0x26) timer read\n"); diff --git a/src/mame/jaleco/cischeat.cpp b/src/mame/jaleco/cischeat.cpp index a85025ed376..e21d053efec 100644 --- a/src/mame/jaleco/cischeat.cpp +++ b/src/mame/jaleco/cischeat.cpp @@ -778,7 +778,7 @@ void captflag_state::motor_move(int side, uint16_t data) timer_device &dev((side == RIGHT) ? *m_motor_right : *m_motor_left); -// bool busy = !(dev.time_left() == attotime::never); +// bool busy = !(dev.remaining() == attotime::never); bool busy = false; if (data & 0x0010) @@ -838,7 +838,7 @@ template <int N> READ_LINE_MEMBER(captflag_state::motor_busy_r) { // timer_device & dev = ((side == RIGHT) ? m_motor_right : m_motor_left); -// return (dev.time_left() == attotime::never) ? 0 : 1; +// return (dev.remaining() == attotime::never) ? 0 : 1; return 0; } diff --git a/src/mame/konami/viper.cpp b/src/mame/konami/viper.cpp index 54577e8cdff..bcd9ce466be 100644 --- a/src/mame/konami/viper.cpp +++ b/src/mame/konami/viper.cpp @@ -1972,7 +1972,6 @@ uint64_t viper_state::e70000_r(offs_t offset, uint64_t mem_mask) if (ACCESSING_BITS_56_63) { m_ds2430_bit_timer->reset(); - m_ds2430_bit_timer->start_time(); // printf("%s e70000_r: %08X (mask %08X%08X)\n", machine().describe_context().c_str(), offset, (uint32_t)(mem_mask >> 32), (uint32_t)mem_mask); } @@ -1997,7 +1996,7 @@ void viper_state::e70000_w(offs_t offset, uint64_t data, uint64_t mem_mask) // Bit 0 = ~3.6 microsecs // Bit 1 = ~98 microsecs - attotime diff_time = m_ds2430_bit_timer->time_elapsed(); + attotime diff_time = m_ds2430_bit_timer->elapsed(); m_ds2430_bit_timer->reset(); if (diff_time < attotime::from_usec(20)) DS2430_w(0); diff --git a/src/mame/midw8080/8080bw_a.cpp b/src/mame/midw8080/8080bw_a.cpp index 44070f8421a..686463ef631 100644 --- a/src/mame/midw8080/8080bw_a.cpp +++ b/src/mame/midw8080/8080bw_a.cpp @@ -1062,7 +1062,7 @@ void _8080bw_state::schaser_sh_port_1_w(uint8_t data) /* disable effect - stops at end of low cycle */ if (!m_schaser_effect_555_is_low) { - m_schaser_effect_555_time_remain = m_schaser_effect_555_timer->time_left(); + m_schaser_effect_555_time_remain = m_schaser_effect_555_timer->remaining(); m_schaser_effect_555_time_remain_savable = m_schaser_effect_555_time_remain.as_double(); m_schaser_effect_555_timer->adjust(attotime::never); } @@ -1581,7 +1581,7 @@ void cane_audio_device::sh_port_1_w(u8 data) m_sn->set_mixer_params(BIT(data, 2), BIT(data, 3), BIT(data, 1)); m_vco_timer->adjust(attotime::zero, m_vco_timer->param(), attotime::from_hz(1000)); - m_vco_rc_chargetime = m_vco_timer->start_time(); + m_vco_rc_chargetime = m_vco_timer->start(); // Little hack... // To be precise I should enable the 76477 every time the CPU reads or write to a port different from port 3 @@ -1729,7 +1729,7 @@ DISCRETE_SOUND_END TIMER_DEVICE_CALLBACK_MEMBER(cane_audio_device::vco_voltage_timer) { - const double delta = (m_vco_timer->fire_time() - m_vco_rc_chargetime).as_double(); + const double delta = (m_vco_timer->expire() - m_vco_rc_chargetime).as_double(); const double voltage = 5 * (1 - std::exp(-delta / 47)); LOG("t = %d\n", delta); diff --git a/src/mame/midway/midvunit.cpp b/src/mame/midway/midvunit.cpp index 026ea07bcb2..55e3c803213 100644 --- a/src/mame/midway/midvunit.cpp +++ b/src/mame/midway/midvunit.cpp @@ -230,7 +230,7 @@ uint32_t midvunit_state::tms32031_control_r(offs_t offset) { /* timer is clocked at 100ns */ int which = (offset >> 4) & 1; - int32_t result = (m_timer[which]->time_elapsed() * m_timer_rate).as_double(); + int32_t result = (m_timer[which]->elapsed() * m_timer_rate).as_double(); // logerror("%06X:tms32031_control_r(%02X) = %08X\n", m_maincpu->pc(), offset, result); return result; } diff --git a/src/mame/namco/namcos22.cpp b/src/mame/namco/namcos22.cpp index e081563b6e2..79cb432e6e4 100644 --- a/src/mame/namco/namcos22.cpp +++ b/src/mame/namco/namcos22.cpp @@ -2902,7 +2902,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(namcos22s_state::propcycl_pedal_update) const int range = 100000; attotime freq = attotime::from_usec(base + range * (1.0 / abs(pedal))); - m_pc_pedal_interrupt->adjust(std::min(freq, m_pc_pedal_interrupt->time_left()), pedal < 0, freq); + m_pc_pedal_interrupt->adjust(std::min(freq, m_pc_pedal_interrupt->remaining()), pedal < 0, freq); } else { @@ -2948,7 +2948,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(namcos22s_state::adillor_trackball_update) if (t[axis] > (1.0 / range)) { attotime freq = attotime::from_hz(base + range * t[axis]); - m_ar_tb_interrupt[axis]->adjust(std::min(freq, m_ar_tb_interrupt[axis]->time_left()), params[axis], freq); + m_ar_tb_interrupt[axis]->adjust(std::min(freq, m_ar_tb_interrupt[axis]->remaining()), params[axis], freq); } else { diff --git a/src/mame/sega/megacd.cpp b/src/mame/sega/megacd.cpp index 6f7bc7d82f6..c8d0d0f4ff7 100644 --- a/src/mame/sega/megacd.cpp +++ b/src/mame/sega/megacd.cpp @@ -1214,7 +1214,7 @@ void sega_segacd_device::segacd_stopwatch_timer_w(uint16_t data) uint16_t sega_segacd_device::segacd_stopwatch_timer_r() { - int32_t result = (m_stopwatch_timer->time_elapsed() * ATTOSECONDS_TO_HZ(ATTOSECONDS_IN_USEC(30.72))).as_double(); + int32_t result = (m_stopwatch_timer->elapsed() * ATTOSECONDS_TO_HZ(ATTOSECONDS_IN_USEC(30.72))).as_double(); return result & 0xfff; } diff --git a/src/mame/sega/model2.cpp b/src/mame/sega/model2.cpp index cb73047f97e..4c9daac0853 100644 --- a/src/mame/sega/model2.cpp +++ b/src/mame/sega/model2.cpp @@ -114,7 +114,7 @@ u32 model2_state::timers_r(offs_t offset) if (m_timerrun[offset]) { // get elapsed time, convert to units of 25 MHz - u32 cur = (m_timers[offset]->time_elapsed() * 25000000).as_double(); + u32 cur = (m_timers[offset]->elapsed() * 25000000).as_double(); // subtract units from starting value m_timervals[offset] = m_timerorig[offset] - cur; diff --git a/src/mame/sega/segas24.cpp b/src/mame/sega/segas24.cpp index 996ec44e443..38b96f8111b 100644 --- a/src/mame/sega/segas24.cpp +++ b/src/mame/sega/segas24.cpp @@ -709,7 +709,7 @@ void segas24_state::frc_mode_w(uint8_t data) uint8_t segas24_state::frc_r() { - int32_t result = (m_frc_cnt_timer->time_elapsed() * (m_frc_mode ? FRC_CLOCK_MODE1 : FRC_CLOCK_MODE0).dvalue()).as_double(); + int32_t result = (m_frc_cnt_timer->elapsed() * (m_frc_mode ? FRC_CLOCK_MODE1 : FRC_CLOCK_MODE0).dvalue()).as_double(); result %= ((m_frc_mode) ? 0x67 : 0x100); diff --git a/src/mame/shared/mega32x.cpp b/src/mame/shared/mega32x.cpp index fdbf96179d6..4fac35aa490 100644 --- a/src/mame/shared/mega32x.cpp +++ b/src/mame/shared/mega32x.cpp @@ -954,7 +954,7 @@ uint16_t sega_32x_device::get_hposition(void) attotime time_elapsed_since_megadriv_scanline_timer; uint16_t value4; - time_elapsed_since_megadriv_scanline_timer = m_scan_timer->time_elapsed(); + time_elapsed_since_megadriv_scanline_timer = m_scan_timer->elapsed(); if (time_elapsed_since_megadriv_scanline_timer.attoseconds() < (ATTOSECONDS_PER_SECOND/get_framerate() /double(m_total_scanlines))) { |