From f59638c2a1e2b0d936a3e970946de071a07d5c3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20St=C3=B6neberg?= Date: Fri, 4 Jul 2014 07:17:48 +0000 Subject: [PATCH] more passing of attotime as const references (nw) --- src/emu/cpu/h8/h8_sci.c | 2 +- src/emu/cpu/h8/h8_sci.h | 2 +- src/emu/cpu/sh4/sh4tmu.c | 2 +- src/emu/debug/debugcpu.c | 2 +- src/emu/debug/debugcpu.h | 2 +- src/emu/device.c | 4 ++-- src/emu/device.h | 6 +++--- src/emu/diexec.c | 4 ++-- src/emu/diexec.h | 6 +++--- src/emu/diserial.c | 4 ++-- src/emu/diserial.h | 6 +++--- src/emu/ioport.c | 10 +++++----- src/emu/ioport.h | 10 +++++----- src/emu/machine/atahle.c | 2 +- src/emu/machine/atahle.h | 2 +- src/emu/machine/eeprom.c | 2 +- src/emu/machine/eeprom.h | 2 +- src/emu/machine/hd63450.c | 2 +- src/emu/machine/hd63450.h | 6 +++--- src/emu/machine/laserdsc.c | 2 +- src/emu/machine/laserdsc.h | 6 +++--- src/emu/machine/ldpr8210.c | 6 +++--- src/emu/machine/ldpr8210.h | 6 +++--- src/emu/machine/ldstub.h | 12 ++++++------ src/emu/machine/ldv1000.c | 4 ++-- src/emu/machine/ldv1000.h | 4 ++-- src/emu/machine/ldvp931.c | 4 ++-- src/emu/machine/ldvp931.h | 4 ++-- src/emu/machine/upd765.c | 4 ++-- src/emu/machine/upd765.h | 18 +++++++++--------- src/emu/machine/wd17xx.c | 2 +- src/emu/machine/wd17xx.h | 2 +- src/emu/sound/262intf.c | 4 ++-- src/emu/sound/262intf.h | 2 +- src/emu/sound/3526intf.c | 4 ++-- src/emu/sound/3526intf.h | 2 +- src/emu/sound/3812intf.c | 4 ++-- src/emu/sound/3812intf.h | 2 +- src/emu/sound/8950intf.c | 4 ++-- src/emu/sound/8950intf.h | 2 +- src/emu/sound/fmopl.h | 2 +- src/emu/sound/speaker.c | 4 ++-- src/emu/sound/speaker.h | 4 ++-- src/emu/sound/ymf262.h | 2 +- src/emu/timer.c | 4 ++-- src/emu/timer.h | 6 +++--- src/emu/video/fixfreq.c | 4 ++-- src/emu/video/fixfreq.h | 4 ++-- src/emu/video/voodoo.c | 12 ++++++------ src/mame/audio/n8080.c | 2 +- src/mame/drivers/gottlieb.c | 2 +- src/mame/includes/gottlieb.h | 2 +- src/mame/includes/n8080.h | 2 +- src/mame/machine/cdislave.c | 2 +- src/mame/machine/cdislave.h | 2 +- src/mame/machine/ticket.c | 2 +- src/mame/machine/ticket.h | 2 +- 57 files changed, 116 insertions(+), 116 deletions(-) diff --git a/src/emu/cpu/h8/h8_sci.c b/src/emu/cpu/h8/h8_sci.c index c9e84f42bb6..d35200158a6 100644 --- a/src/emu/cpu/h8/h8_sci.c +++ b/src/emu/cpu/h8/h8_sci.c @@ -23,7 +23,7 @@ void h8_sci_device::set_info(const char *_intc_tag,int eri, int rxi, int txi, in tei_int = tei; } -void h8_sci_device::set_external_clock_period(attotime period) +void h8_sci_device::set_external_clock_period(const attotime &period) { external_clock_period = period; } diff --git a/src/emu/cpu/h8/h8_sci.h b/src/emu/cpu/h8/h8_sci.h index 24ead36b7cd..67590e3bf4c 100644 --- a/src/emu/cpu/h8/h8_sci.h +++ b/src/emu/cpu/h8/h8_sci.h @@ -61,7 +61,7 @@ public: h8_sci_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); void set_info(const char *intc, int eri, int rxi, int txi, int tei); - void set_external_clock_period(attotime _period); + void set_external_clock_period(const attotime &_period); DECLARE_WRITE8_MEMBER(smr_w); DECLARE_READ8_MEMBER(smr_r); diff --git a/src/emu/cpu/sh4/sh4tmu.c b/src/emu/cpu/sh4/sh4tmu.c index 660258275e8..7a9ebc71c05 100644 --- a/src/emu/cpu/sh4/sh4tmu.c +++ b/src/emu/cpu/sh4/sh4tmu.c @@ -14,7 +14,7 @@ static const int tcnt_div[8] = { 4, 16, 64, 256, 1024, 1, 1, 1 }; a (constant+1) where 0 <= constant < 2^32 -------------------------------------------------*/ -INLINE attotime sh4_scale_up_mame_time(attotime _time1, UINT32 factor1) +INLINE attotime sh4_scale_up_mame_time(const attotime &_time1, UINT32 factor1) { return _time1 * factor1 + _time1; } diff --git a/src/emu/debug/debugcpu.c b/src/emu/debug/debugcpu.c index 11839568f2e..dad8c178492 100644 --- a/src/emu/debug/debugcpu.c +++ b/src/emu/debug/debugcpu.c @@ -1705,7 +1705,7 @@ device_debug::~device_debug() // before beginning execution for the given device //------------------------------------------------- -void device_debug::start_hook(attotime endtime) +void device_debug::start_hook(const attotime &endtime) { debugcpu_private *global = m_device.machine().debugcpu_data; diff --git a/src/emu/debug/debugcpu.h b/src/emu/debug/debugcpu.h index b83dff7b408..b9bc53b4a86 100644 --- a/src/emu/debug/debugcpu.h +++ b/src/emu/debug/debugcpu.h @@ -177,7 +177,7 @@ public: // hooks used by the rest of the system - void start_hook(attotime endtime); + void start_hook(const attotime &endtime); void stop_hook(); void interrupt_hook(int irqline); void exception_hook(int exception); diff --git a/src/emu/device.c b/src/emu/device.c index b4cf54a9e10..d52dd8827ea 100644 --- a/src/emu/device.c +++ b/src/emu/device.c @@ -316,7 +316,7 @@ attotime device_t::clocks_to_attotime(UINT64 numclocks) const // attotime to CPU clock ticks //------------------------------------------------- -UINT64 device_t::attotime_to_clocks(attotime duration) const +UINT64 device_t::attotime_to_clocks(const attotime &duration) const { return mulu_32x32(duration.seconds, m_clock) + (UINT64)duration.attoseconds / (UINT64)m_attoseconds_per_clock; } @@ -338,7 +338,7 @@ emu_timer *device_t::timer_alloc(device_timer_id id, void *ptr) // call our device callback //------------------------------------------------- -void device_t::timer_set(attotime duration, device_timer_id id, int param, void *ptr) +void device_t::timer_set(const attotime &duration, device_timer_id id, int param, void *ptr) { machine().scheduler().timer_set(duration, *this, id, param, ptr); } diff --git a/src/emu/device.h b/src/emu/device.h index fd6a313a117..1157719f662 100644 --- a/src/emu/device.h +++ b/src/emu/device.h @@ -110,7 +110,7 @@ public: virtual ~device_t(); // getters - running_machine &machine() const { assert(m_machine != NULL); return *m_machine; } + running_machine &machine() const { /*assert(m_machine != NULL);*/ return *m_machine; } const char *tag() const { return m_tag; } const char *basetag() const { return m_basetag; } device_type type() const { return m_type; } @@ -180,11 +180,11 @@ public: double clock_scale() const { return m_clock_scale; } void set_clock_scale(double clockscale); attotime clocks_to_attotime(UINT64 clocks) const; - UINT64 attotime_to_clocks(attotime duration) const; + UINT64 attotime_to_clocks(const attotime &duration) const; // timer interfaces emu_timer *timer_alloc(device_timer_id id = 0, void *ptr = NULL); - void timer_set(attotime duration, device_timer_id id = 0, int param = 0, void *ptr = NULL); + void timer_set(const attotime &duration, device_timer_id id = 0, int param = 0, void *ptr = NULL); void synchronize(device_timer_id id = 0, int param = 0, void *ptr = NULL) { timer_set(attotime::zero, id, param, ptr); } void timer_expired(emu_timer &timer, device_timer_id id, int param, void *ptr) { device_timer(timer, id, param, ptr); } diff --git a/src/emu/diexec.c b/src/emu/diexec.c index 283e68b1145..a78773affe9 100644 --- a/src/emu/diexec.c +++ b/src/emu/diexec.c @@ -115,7 +115,7 @@ void device_execute_interface::static_set_vblank_int(device_t &device, device_in // to set up periodic interrupts on the device //------------------------------------------------- -void device_execute_interface::static_set_periodic_int(device_t &device, device_interrupt_delegate function, attotime rate) +void device_execute_interface::static_set_periodic_int(device_t &device, device_interrupt_delegate function, const attotime &rate) { device_execute_interface *exec; if (!device.interface(exec)) @@ -265,7 +265,7 @@ if (TEMPLOG) printf("resume %s (%X)\n", device().tag(), reason); // period of time //------------------------------------------------- -void device_execute_interface::spin_until_time(attotime duration) +void device_execute_interface::spin_until_time(const attotime &duration) { static int timetrig = 0; diff --git a/src/emu/diexec.h b/src/emu/diexec.h index 55e9ef9457d..1652d34b4fd 100644 --- a/src/emu/diexec.h +++ b/src/emu/diexec.h @@ -142,7 +142,7 @@ public: UINT32 min_cycles() const { return execute_min_cycles(); } UINT32 max_cycles() const { return execute_max_cycles(); } attotime cycles_to_attotime(UINT64 cycles) const { return device().clocks_to_attotime(cycles_to_clocks(cycles)); } - UINT64 attotime_to_cycles(attotime duration) const { return clocks_to_cycles(device().attotime_to_clocks(duration)); } + UINT64 attotime_to_cycles(const attotime &duration) const { return clocks_to_cycles(device().attotime_to_clocks(duration)); } UINT32 input_lines() const { return execute_input_lines(); } UINT32 default_irq_vector() const { return execute_default_irq_vector(); } bool is_octal() const { return m_is_octal; } @@ -150,7 +150,7 @@ public: // static inline configuration helpers static void static_set_disable(device_t &device); static void static_set_vblank_int(device_t &device, device_interrupt_delegate function, const char *tag, int rate = 0); - static void static_set_periodic_int(device_t &device, device_interrupt_delegate function, attotime rate); + static void static_set_periodic_int(device_t &device, device_interrupt_delegate function, const attotime &rate); static void static_set_irq_acknowledge_callback(device_t &device, device_irq_acknowledge_delegate callback); // execution management @@ -173,7 +173,7 @@ public: void yield() { suspend(SUSPEND_REASON_TIMESLICE, false); } void spin() { suspend(SUSPEND_REASON_TIMESLICE, true); } void spin_until_trigger(int trigid) { suspend_until_trigger(trigid, true); } - void spin_until_time(attotime duration); + void spin_until_time(const attotime &duration); void spin_until_interrupt() { spin_until_trigger(m_inttrigger); } // triggers diff --git a/src/emu/diserial.c b/src/emu/diserial.c index 338fbde2544..afd771b958a 100644 --- a/src/emu/diserial.c +++ b/src/emu/diserial.c @@ -58,14 +58,14 @@ void device_serial_interface::interface_pre_start() m_tra_clock_state = false; } -void device_serial_interface::set_rcv_rate(attotime rate) +void device_serial_interface::set_rcv_rate(const attotime &rate) { m_rcv_rate = rate/2; receive_register_reset(); m_rcv_clock->adjust(attotime::never); } -void device_serial_interface::set_tra_rate(attotime rate) +void device_serial_interface::set_tra_rate(const attotime &rate) { m_tra_rate = rate/2; transmit_register_reset(); diff --git a/src/emu/diserial.h b/src/emu/diserial.h index 0abf75699dd..fa86c2b72ae 100644 --- a/src/emu/diserial.h +++ b/src/emu/diserial.h @@ -88,13 +88,13 @@ protected: void receive_register_update_bit(int bit); void receive_register_extract(); - void set_rcv_rate(attotime rate); - void set_tra_rate(attotime rate); + void set_rcv_rate(const attotime &rate); + void set_tra_rate(const attotime &rate); void set_rcv_rate(UINT32 clock, int div) { set_rcv_rate((clock && div) ? (attotime::from_hz(clock) * div) : attotime::never); } void set_tra_rate(UINT32 clock, int div) { set_tra_rate((clock && div) ? (attotime::from_hz(clock) * div) : attotime::never); } void set_rcv_rate(int baud) { set_rcv_rate(baud ? attotime::from_hz(baud) : attotime::never); } void set_tra_rate(int baud) { set_tra_rate(baud ? attotime::from_hz(baud) : attotime::never); } - void set_rate(attotime rate) { set_rcv_rate(rate); set_tra_rate(rate); } + void set_rate(const attotime &rate) { set_rcv_rate(rate); set_tra_rate(rate); } void set_rate(UINT32 clock, int div) { set_rcv_rate(clock, div); set_tra_rate(clock, div); } void set_rate(int baud) { set_rcv_rate(baud); set_tra_rate(baud); } diff --git a/src/emu/ioport.c b/src/emu/ioport.c index f55f17f1ca2..11f5c58c720 100644 --- a/src/emu/ioport.c +++ b/src/emu/ioport.c @@ -922,7 +922,7 @@ void natural_keyboard::post(unicode_char ch) // post - post a unicode encoded string //------------------------------------------------- -void natural_keyboard::post(const unicode_char *text, size_t length, attotime rate) +void natural_keyboard::post(const unicode_char *text, size_t length, const attotime &rate) { // set the fixed rate m_current_rate = rate; @@ -946,7 +946,7 @@ void natural_keyboard::post(const unicode_char *text, size_t length, attotime ra // post_utf8 - post a UTF-8 encoded string //------------------------------------------------- -void natural_keyboard::post_utf8(const char *text, size_t length, attotime rate) +void natural_keyboard::post_utf8(const char *text, size_t length, const attotime &rate) { // set the fixed rate m_current_rate = rate; @@ -979,7 +979,7 @@ void natural_keyboard::post_utf8(const char *text, size_t length, attotime rate) // post_coded - post a coded string //------------------------------------------------- -void natural_keyboard::post_coded(const char *text, size_t length, attotime rate) +void natural_keyboard::post_coded(const char *text, size_t length, const attotime &rate) { static const struct { @@ -3436,7 +3436,7 @@ void ioport_manager::playback_end(const char *message) // playback //------------------------------------------------- -void ioport_manager::playback_frame(attotime curtime) +void ioport_manager::playback_frame(const attotime &curtime) { // if playing back, fetch the information and verify if (m_playback_file.is_open()) @@ -3575,7 +3575,7 @@ void ioport_manager::record_end(const char *message) // recording //------------------------------------------------- -void ioport_manager::record_frame(attotime curtime) +void ioport_manager::record_frame(const attotime &curtime) { // if recording, record information about the current frame if (m_record_file.is_open()) diff --git a/src/emu/ioport.h b/src/emu/ioport.h index d09b0bc4cdb..509eb100927 100644 --- a/src/emu/ioport.h +++ b/src/emu/ioport.h @@ -818,9 +818,9 @@ public: // posting void post(unicode_char ch); - void post(const unicode_char *text, size_t length = 0, attotime rate = attotime::zero); - void post_utf8(const char *text, size_t length = 0, attotime rate = attotime::zero); - void post_coded(const char *text, size_t length = 0, attotime rate = attotime::zero); + void post(const unicode_char *text, size_t length = 0, const attotime &rate = attotime::zero); + void post_utf8(const char *text, size_t length = 0, const attotime &rate = attotime::zero); + void post_coded(const char *text, size_t length = 0, const attotime &rate = attotime::zero); void frame_update(ioport_port &port, ioport_value &digital); const char *key_name(astring &string, unicode_char ch); @@ -1419,13 +1419,13 @@ private: template _Type playback_read(_Type &result); time_t playback_init(); void playback_end(const char *message = NULL); - void playback_frame(attotime curtime); + void playback_frame(const attotime &curtime); void playback_port(ioport_port &port); template void record_write(_Type value); void record_init(); void record_end(const char *message = NULL); - void record_frame(attotime curtime); + void record_frame(const attotime &curtime); void record_port(ioport_port &port); // internal state diff --git a/src/emu/machine/atahle.c b/src/emu/machine/atahle.c index a8681b67cac..ee1c5756e9f 100644 --- a/src/emu/machine/atahle.c +++ b/src/emu/machine/atahle.c @@ -432,7 +432,7 @@ void ata_hle_device::set_pdiag(int state) } } -void ata_hle_device::start_busy(attotime time, int param) +void ata_hle_device::start_busy(const attotime &time, int param) { m_status |= IDE_STATUS_BSY; m_busy_timer->adjust(time, param); diff --git a/src/emu/machine/atahle.h b/src/emu/machine/atahle.h index eb7477caabe..7a17ae2945a 100644 --- a/src/emu/machine/atahle.h +++ b/src/emu/machine/atahle.h @@ -47,7 +47,7 @@ protected: void set_dasp(int state); void set_pdiag(int state); - void start_busy(attotime time, int param); + void start_busy(const attotime &time, int param); void stop_busy(); int dev() { return (m_device_head & IDE_DEVICE_HEAD_DRV) >> 4; } diff --git a/src/emu/machine/eeprom.c b/src/emu/machine/eeprom.c index 1e99dc3c9ad..3626b19a267 100644 --- a/src/emu/machine/eeprom.c +++ b/src/emu/machine/eeprom.c @@ -133,7 +133,7 @@ void eeprom_base_device::static_set_default_value(device_t &device, UINT32 value // to set timing constants for various operations //------------------------------------------------- -void eeprom_base_device::static_set_timing(device_t &device, timing_type type, attotime duration) +void eeprom_base_device::static_set_timing(device_t &device, timing_type type, const attotime &duration) { downcast(device).m_operation_time[type] = duration; } diff --git a/src/emu/machine/eeprom.h b/src/emu/machine/eeprom.h index 876e51e1ff5..d6db74f5a21 100644 --- a/src/emu/machine/eeprom.h +++ b/src/emu/machine/eeprom.h @@ -67,7 +67,7 @@ public: static void static_set_default_data(device_t &device, const UINT8 *data, UINT32 size); static void static_set_default_data(device_t &device, const UINT16 *data, UINT32 size); static void static_set_default_value(device_t &device, UINT32 value); - static void static_set_timing(device_t &device, timing_type type, attotime duration); + static void static_set_timing(device_t &device, timing_type type, const attotime &duration); // read/write/erase data UINT32 read(offs_t address); diff --git a/src/emu/machine/hd63450.c b/src/emu/machine/hd63450.c index 97f14f6aa80..061f574a069 100644 --- a/src/emu/machine/hd63450.c +++ b/src/emu/machine/hd63450.c @@ -265,7 +265,7 @@ void hd63450_device::dma_transfer_start(int channel) logerror("DMA: Transfer begins: size=0x%08x\n",m_transfer_size[channel]); } -void hd63450_device::set_timer(int channel, attotime tm) +void hd63450_device::set_timer(int channel, const attotime &tm) { m_our_clock[channel] = tm; if(m_in_progress[channel] != 0) diff --git a/src/emu/machine/hd63450.h b/src/emu/machine/hd63450.h index 0e689ae1958..227c970c259 100644 --- a/src/emu/machine/hd63450.h +++ b/src/emu/machine/hd63450.h @@ -84,7 +84,7 @@ public: template static devcb_base &set_dma_write_3_callback(device_t &device, _Object object) { return downcast(device).m_dma_write_3.set_callback(object); } static void set_cpu_tag(device_t &device, const char *tag) { downcast(device).m_cpu_tag = tag; } - static void set_our_clocks(device_t &device, attotime clk1, attotime clk2, attotime clk3, attotime clk4) + static void set_our_clocks(device_t &device, const attotime &clk1, const attotime &clk2, const attotime &clk3, const attotime &clk4) { hd63450_device &dev = downcast(device); dev.m_our_clock[0] = clk1; @@ -92,7 +92,7 @@ public: dev.m_our_clock[2] = clk3; dev.m_our_clock[3] = clk4; } - static void set_burst_clocks(device_t &device, attotime clk1, attotime clk2, attotime clk3, attotime clk4) + static void set_burst_clocks(device_t &device, const attotime &clk1, const attotime &clk2, const attotime &clk3, const attotime &clk4) { hd63450_device &dev = downcast(device); dev.m_burst_clock[0] = clk1; @@ -109,7 +109,7 @@ public: DECLARE_WRITE_LINE_MEMBER(drq3_w); void single_transfer(int x); - void set_timer(int channel, attotime tm); + void set_timer(int channel, const attotime &tm); int get_vector(int channel); int get_error_vector(int channel); diff --git a/src/emu/machine/laserdsc.c b/src/emu/machine/laserdsc.c index b647330a6d9..b6373ecb627 100644 --- a/src/emu/machine/laserdsc.c +++ b/src/emu/machine/laserdsc.c @@ -550,7 +550,7 @@ laserdisc_device::slider_position laserdisc_device::get_slider_position() // that works for most situations //------------------------------------------------- -INT32 laserdisc_device::generic_update(const vbi_metadata &vbi, int fieldnum, attotime curtime, player_state_info &newstate) +INT32 laserdisc_device::generic_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime, player_state_info &newstate) { INT32 advanceby = 0; int frame; diff --git a/src/emu/machine/laserdsc.h b/src/emu/machine/laserdsc.h index c5943e45895..e5a724120ad 100644 --- a/src/emu/machine/laserdsc.h +++ b/src/emu/machine/laserdsc.h @@ -232,8 +232,8 @@ protected: }; // subclass overrides - virtual void player_vsync(const vbi_metadata &vbi, int fieldnum, attotime curtime) = 0; - virtual INT32 player_update(const vbi_metadata &vbi, int fieldnum, attotime curtime) = 0; + virtual void player_vsync(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) = 0; + virtual INT32 player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) = 0; virtual void player_overlay(bitmap_yuy16 &bitmap) = 0; // device-level overrides @@ -252,7 +252,7 @@ protected: void set_slider_speed(INT32 tracks_per_vsync); void advance_slider(INT32 numtracks); slider_position get_slider_position(); - INT32 generic_update(const vbi_metadata &vbi, int fieldnum, attotime curtime, player_state_info &curstate); + INT32 generic_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime, player_state_info &curstate); // general helpers bool is_start_of_frame(const vbi_metadata &vbi); diff --git a/src/emu/machine/ldpr8210.c b/src/emu/machine/ldpr8210.c index d578576ad0c..b52b3b38f4d 100644 --- a/src/emu/machine/ldpr8210.c +++ b/src/emu/machine/ldpr8210.c @@ -407,7 +407,7 @@ machine_config_constructor pioneer_pr8210_device::device_mconfig_additions() con // start of the blanking period //------------------------------------------------- -void pioneer_pr8210_device::player_vsync(const vbi_metadata &vbi, int fieldnum, attotime curtime) +void pioneer_pr8210_device::player_vsync(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) { // logging if (LOG_VBLANK_VBI) @@ -432,7 +432,7 @@ void pioneer_pr8210_device::player_vsync(const vbi_metadata &vbi, int fieldnum, // first visible line of the frame //------------------------------------------------- -INT32 pioneer_pr8210_device::player_update(const vbi_metadata &vbi, int fieldnum, attotime curtime) +INT32 pioneer_pr8210_device::player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) { // logging if (LOG_VBLANK_VBI) @@ -934,7 +934,7 @@ void simutrek_special_device::set_external_audio_squelch(int state) // start of the blanking period //------------------------------------------------- -void simutrek_special_device::player_vsync(const vbi_metadata &vbi, int fieldnum, attotime curtime) +void simutrek_special_device::player_vsync(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) { // latch the control state after the second field if (fieldnum == 1) diff --git a/src/emu/machine/ldpr8210.h b/src/emu/machine/ldpr8210.h index 83c0852d448..96273dcb12a 100644 --- a/src/emu/machine/ldpr8210.h +++ b/src/emu/machine/ldpr8210.h @@ -87,8 +87,8 @@ protected: virtual machine_config_constructor device_mconfig_additions() const; // subclass overrides - virtual void player_vsync(const vbi_metadata &vbi, int fieldnum, attotime curtime); - virtual INT32 player_update(const vbi_metadata &vbi, int fieldnum, attotime curtime); + virtual void player_vsync(const vbi_metadata &vbi, int fieldnum, const attotime &curtime); + virtual INT32 player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime); virtual void player_overlay(bitmap_yuy16 &bitmap); // internal helpers @@ -158,7 +158,7 @@ protected: }; // subclass overrides - virtual void player_vsync(const vbi_metadata &vbi, int fieldnum, attotime curtime); + virtual void player_vsync(const vbi_metadata &vbi, int fieldnum, const attotime &curtime); // device-level overrides virtual void device_start(); diff --git a/src/emu/machine/ldstub.h b/src/emu/machine/ldstub.h index f66f3709cbf..d10cd0313ea 100644 --- a/src/emu/machine/ldstub.h +++ b/src/emu/machine/ldstub.h @@ -59,8 +59,8 @@ public: protected: // subclass overrides - virtual void player_vsync(const vbi_metadata &vbi, int fieldnum, attotime curtime) { } - virtual INT32 player_update(const vbi_metadata &vbi, int fieldnum, attotime curtime) { return fieldnum; } + virtual void player_vsync(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) { } + virtual INT32 player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) { return fieldnum; } virtual void player_overlay(bitmap_yuy16 &bitmap) { } }; @@ -83,8 +83,8 @@ public: protected: // subclass overrides - virtual void player_vsync(const vbi_metadata &vbi, int fieldnum, attotime curtime) { } - virtual INT32 player_update(const vbi_metadata &vbi, int fieldnum, attotime curtime) { return fieldnum; } + virtual void player_vsync(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) { } + virtual INT32 player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) { return fieldnum; } virtual void player_overlay(bitmap_yuy16 &bitmap) { } }; @@ -105,8 +105,8 @@ public: protected: // subclass overrides - virtual void player_vsync(const vbi_metadata &vbi, int fieldnum, attotime curtime) { } - virtual INT32 player_update(const vbi_metadata &vbi, int fieldnum, attotime curtime) { return fieldnum; } + virtual void player_vsync(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) { } + virtual INT32 player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) { return fieldnum; } virtual void player_overlay(bitmap_yuy16 &bitmap) { } }; diff --git a/src/emu/machine/ldv1000.c b/src/emu/machine/ldv1000.c index b299def2da5..18c8d86fc9a 100644 --- a/src/emu/machine/ldv1000.c +++ b/src/emu/machine/ldv1000.c @@ -301,7 +301,7 @@ machine_config_constructor pioneer_ldv1000_device::device_mconfig_additions() co // start of the blanking period //------------------------------------------------- -void pioneer_ldv1000_device::player_vsync(const vbi_metadata &vbi, int fieldnum, attotime curtime) +void pioneer_ldv1000_device::player_vsync(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) { // generate interrupts if we hit the edges slider_position sliderpos = get_slider_position(); @@ -325,7 +325,7 @@ void pioneer_ldv1000_device::player_vsync(const vbi_metadata &vbi, int fieldnum, // the first visible line of the frame //------------------------------------------------- -INT32 pioneer_ldv1000_device::player_update(const vbi_metadata &vbi, int fieldnum, attotime curtime) +INT32 pioneer_ldv1000_device::player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) { if (LOG_FRAMES_SEEN) { diff --git a/src/emu/machine/ldv1000.h b/src/emu/machine/ldv1000.h index cd85239f83d..bb65a24515e 100644 --- a/src/emu/machine/ldv1000.h +++ b/src/emu/machine/ldv1000.h @@ -73,8 +73,8 @@ protected: virtual machine_config_constructor device_mconfig_additions() const; // subclass overrides - virtual void player_vsync(const vbi_metadata &vbi, int fieldnum, attotime curtime); - virtual INT32 player_update(const vbi_metadata &vbi, int fieldnum, attotime curtime); + virtual void player_vsync(const vbi_metadata &vbi, int fieldnum, const attotime &curtime); + virtual INT32 player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime); virtual void player_overlay(bitmap_yuy16 &bitmap) { } // internal helpers diff --git a/src/emu/machine/ldvp931.c b/src/emu/machine/ldvp931.c index 31cc88d87f5..0d927fed665 100644 --- a/src/emu/machine/ldvp931.c +++ b/src/emu/machine/ldvp931.c @@ -307,7 +307,7 @@ machine_config_constructor phillips_22vp931_device::device_mconfig_additions() c // start of the blanking period //------------------------------------------------- -void phillips_22vp931_device::player_vsync(const vbi_metadata &vbi, int fieldnum, attotime curtime) +void phillips_22vp931_device::player_vsync(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) { // reset our command counter (debugging only) m_cmdcount = 0; @@ -323,7 +323,7 @@ void phillips_22vp931_device::player_vsync(const vbi_metadata &vbi, int fieldnum // the first visible line of the frame //------------------------------------------------- -INT32 phillips_22vp931_device::player_update(const vbi_metadata &vbi, int fieldnum, attotime curtime) +INT32 phillips_22vp931_device::player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime) { // set the first VBI timer to go at the start of line 16 timer_set(screen().time_until_pos(16*2), TID_VBI_DATA_FETCH, LASERDISC_CODE_LINE16 << 2); diff --git a/src/emu/machine/ldvp931.h b/src/emu/machine/ldvp931.h index 8720bcd7dd5..636f4529d6b 100644 --- a/src/emu/machine/ldvp931.h +++ b/src/emu/machine/ldvp931.h @@ -80,8 +80,8 @@ protected: virtual machine_config_constructor device_mconfig_additions() const; // subclass overrides - virtual void player_vsync(const vbi_metadata &vbi, int fieldnum, attotime curtime); - virtual INT32 player_update(const vbi_metadata &vbi, int fieldnum, attotime curtime); + virtual void player_vsync(const vbi_metadata &vbi, int fieldnum, const attotime &curtime); + virtual INT32 player_update(const vbi_metadata &vbi, int fieldnum, const attotime &curtime); virtual void player_overlay(bitmap_yuy16 &bitmap) { } public: diff --git a/src/emu/machine/upd765.c b/src/emu/machine/upd765.c index 685d2b4239a..d01a1563a38 100644 --- a/src/emu/machine/upd765.c +++ b/src/emu/machine/upd765.c @@ -2333,7 +2333,7 @@ void upd765_family_device::general_continue(floppy_info &fi) } } -bool upd765_family_device::read_one_bit(attotime limit) +bool upd765_family_device::read_one_bit(const attotime &limit) { int bit = cur_live.pll.get_next_bit(cur_live.tm, cur_live.fi->dev, limit); if(bit < 0) @@ -2351,7 +2351,7 @@ bool upd765_family_device::read_one_bit(attotime limit) return false; } -bool upd765_family_device::write_one_bit(attotime limit) +bool upd765_family_device::write_one_bit(const attotime &limit) { bool bit = cur_live.shift_reg & 0x8000; if(cur_live.pll.write_next_bit(bit, cur_live.tm, cur_live.fi->dev, limit)) diff --git a/src/emu/machine/upd765.h b/src/emu/machine/upd765.h index fd53c9cb18e..27ed83a7122 100644 --- a/src/emu/machine/upd765.h +++ b/src/emu/machine/upd765.h @@ -267,13 +267,13 @@ protected: int write_position; int freq_hist; - void set_clock(attotime period); - void reset(attotime when); - int get_next_bit(attotime &tm, floppy_image_device *floppy, attotime limit); - bool write_next_bit(bool bit, attotime &tm, floppy_image_device *floppy, attotime limit); - void start_writing(attotime tm); - void commit(floppy_image_device *floppy, attotime tm); - void stop_writing(floppy_image_device *floppy, attotime tm); + void set_clock(const attotime &period); + void reset(const attotime &when); + int get_next_bit(attotime &tm, floppy_image_device *floppy, const attotime &limit); + bool write_next_bit(bool bit, attotime &tm, floppy_image_device *floppy, const attotime &limit); + void start_writing(const attotime &tm); + void commit(floppy_image_device *floppy, const attotime &tm); + void stop_writing(floppy_image_device *floppy, const attotime &tm); }; struct floppy_info { @@ -409,8 +409,8 @@ protected: void live_write_fm(UINT8 fm); void live_write_mfm(UINT8 mfm); - bool read_one_bit(attotime limit); - bool write_one_bit(attotime limit); + bool read_one_bit(const attotime &limit); + bool write_one_bit(const attotime &limit); }; class upd765a_device : public upd765_family_device { diff --git a/src/emu/machine/wd17xx.c b/src/emu/machine/wd17xx.c index 62d5ab4232e..a5b836db3bd 100644 --- a/src/emu/machine/wd17xx.c +++ b/src/emu/machine/wd17xx.c @@ -445,7 +445,7 @@ TIMER_CALLBACK_MEMBER( wd1770_device::wd17xx_data_callback ) } -void wd1770_device::wd17xx_set_busy(attotime duration) +void wd1770_device::wd17xx_set_busy(const attotime &duration) { m_status |= STA_1_BUSY; diff --git a/src/emu/machine/wd17xx.h b/src/emu/machine/wd17xx.h index 99c4c75dfdb..2aa7e39cb28 100644 --- a/src/emu/machine/wd17xx.h +++ b/src/emu/machine/wd17xx.h @@ -107,7 +107,7 @@ protected: void wd17xx_set_intrq(); TIMER_CALLBACK_MEMBER( wd17xx_command_callback ); TIMER_CALLBACK_MEMBER( wd17xx_data_callback ); - void wd17xx_set_busy(attotime duration); + void wd17xx_set_busy(const attotime &duration); void wd17xx_command_restore(); void write_track(); void read_track(); diff --git a/src/emu/sound/262intf.c b/src/emu/sound/262intf.c index 613eb069d42..1ddfa00358c 100644 --- a/src/emu/sound/262intf.c +++ b/src/emu/sound/262intf.c @@ -39,13 +39,13 @@ void ymf262_device::device_timer(emu_timer &timer, device_timer_id id, int param } -static void timer_handler(void *param, int c, attotime period) +static void timer_handler(void *param, int c, const attotime &period) { ymf262_device *ymf262 = (ymf262_device *) param; ymf262->_timer_handler(c, period); } -void ymf262_device::_timer_handler(int c, attotime period) +void ymf262_device::_timer_handler(int c, const attotime &period) { if( period == attotime::zero ) { /* Reset FM Timer */ diff --git a/src/emu/sound/262intf.h b/src/emu/sound/262intf.h index 76b12d1c54f..a45852f4223 100644 --- a/src/emu/sound/262intf.h +++ b/src/emu/sound/262intf.h @@ -21,7 +21,7 @@ public: DECLARE_WRITE8_MEMBER( write ); void _IRQHandler(int irq); - void _timer_handler(int c, attotime period); + void _timer_handler(int c, const attotime &period); void _ymf262_update_request(); virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); diff --git a/src/emu/sound/3526intf.c b/src/emu/sound/3526intf.c index 6e73faebc48..88d0f69fdd5 100644 --- a/src/emu/sound/3526intf.c +++ b/src/emu/sound/3526intf.c @@ -49,13 +49,13 @@ void ym3526_device::device_timer(emu_timer &timer, device_timer_id id, int param } } -static void timer_handler(void *param,int c,attotime period) +static void timer_handler(void *param,int c,const attotime &period) { ym3526_device *ym3526 = (ym3526_device *) param; ym3526->_timer_handler(c, period); } -void ym3526_device::_timer_handler(int c,attotime period) +void ym3526_device::_timer_handler(int c,const attotime &period) { if( period == attotime::zero ) { /* Reset FM Timer */ diff --git a/src/emu/sound/3526intf.h b/src/emu/sound/3526intf.h index 226fd399881..5ad6812d297 100644 --- a/src/emu/sound/3526intf.h +++ b/src/emu/sound/3526intf.h @@ -26,7 +26,7 @@ public: DECLARE_WRITE8_MEMBER( write_port_w ); void _IRQHandler(int irq); - void _timer_handler(int c,attotime period); + void _timer_handler(int c,const attotime &period); void _ym3526_update_request(); protected: diff --git a/src/emu/sound/3812intf.c b/src/emu/sound/3812intf.c index 53645242e30..9e1f35118c1 100644 --- a/src/emu/sound/3812intf.c +++ b/src/emu/sound/3812intf.c @@ -49,13 +49,13 @@ void ym3812_device::device_timer(emu_timer &timer, device_timer_id id, int param } } -static void timer_handler(void *param,int c,attotime period) +static void timer_handler(void *param,int c,const attotime &period) { ym3812_device *ym3812 = (ym3812_device *) param; ym3812->_timer_handler(c, period); } -void ym3812_device::_timer_handler(int c, attotime period) +void ym3812_device::_timer_handler(int c, const attotime &period) { if( period == attotime::zero ) { /* Reset FM Timer */ diff --git a/src/emu/sound/3812intf.h b/src/emu/sound/3812intf.h index a724ac75384..986296d058c 100644 --- a/src/emu/sound/3812intf.h +++ b/src/emu/sound/3812intf.h @@ -26,7 +26,7 @@ public: DECLARE_WRITE8_MEMBER( write_port_w ); void _IRQHandler(int irq); - void _timer_handler(int c, attotime period); + void _timer_handler(int c, const attotime &period); void _ym3812_update_request(); protected: diff --git a/src/emu/sound/8950intf.c b/src/emu/sound/8950intf.c index b241da8fb5e..d0073c78a6c 100644 --- a/src/emu/sound/8950intf.c +++ b/src/emu/sound/8950intf.c @@ -46,13 +46,13 @@ void y8950_device::device_timer(emu_timer &timer, device_timer_id id, int param, } } -static void timer_handler(void *param, int c, attotime period) +static void timer_handler(void *param, int c, const attotime &period) { y8950_device *y8950 = (y8950_device *) param; y8950->_timer_handler(c, period); } -void y8950_device::_timer_handler(int c, attotime period) +void y8950_device::_timer_handler(int c, const attotime &period) { if( period == attotime::zero ) { /* Reset FM Timer */ diff --git a/src/emu/sound/8950intf.h b/src/emu/sound/8950intf.h index 28ed7f5c2d0..304fd2bc654 100644 --- a/src/emu/sound/8950intf.h +++ b/src/emu/sound/8950intf.h @@ -42,7 +42,7 @@ public: DECLARE_WRITE8_MEMBER( write_port_w ); void _IRQHandler(int irq); - void _timer_handler(int c,attotime period); + void _timer_handler(int c, const attotime &period); void _y8950_update_request(); unsigned char _Y8950PortHandler_r(); void _Y8950PortHandler_w(unsigned char data); diff --git a/src/emu/sound/fmopl.h b/src/emu/sound/fmopl.h index f0543742e3e..708bc1c7287 100644 --- a/src/emu/sound/fmopl.h +++ b/src/emu/sound/fmopl.h @@ -32,7 +32,7 @@ typedef INT8 OPLSAMPLE; #endif */ -typedef void (*OPL_TIMERHANDLER)(void *param,int timer,attotime period); +typedef void (*OPL_TIMERHANDLER)(void *param,int timer,const attotime &period); typedef void (*OPL_IRQHANDLER)(void *param,int irq); typedef void (*OPL_UPDATEHANDLER)(void *param,int min_interval_us); typedef void (*OPL_PORTHANDLER_W)(void *param,unsigned char data); diff --git a/src/emu/sound/speaker.c b/src/emu/sound/speaker.c index 86d2dfb3de0..c01ae3df45e 100644 --- a/src/emu/sound/speaker.c +++ b/src/emu/sound/speaker.c @@ -317,7 +317,7 @@ void speaker_sound_device::level_w(int new_level) } -void speaker_sound_device::update_interm_samples(attotime time, int volume) +void speaker_sound_device::update_interm_samples(const attotime &time, int volume) { double fraction; @@ -400,7 +400,7 @@ void speaker_sound_device::init_next_interm_sample() } -inline double speaker_sound_device::make_fraction(attotime a, attotime b, double timediv) +inline double speaker_sound_device::make_fraction(const attotime &a, const attotime &b, double timediv) { /* fraction = (a - b) / timediv */ return (a - b).as_double() / timediv; diff --git a/src/emu/sound/speaker.h b/src/emu/sound/speaker.h index d439f0897eb..642d30110fd 100644 --- a/src/emu/sound/speaker.h +++ b/src/emu/sound/speaker.h @@ -48,14 +48,14 @@ private: // internal state // Updates the composed volume array according to time - void update_interm_samples(attotime time, int volume); + void update_interm_samples(const attotime &time, int volume); // Updates the composed volume array and returns final filtered volume of next stream sample double update_interm_samples_get_filtered_volume(int volume); void finalize_interm_sample(int volume); void init_next_interm_sample(); - inline double make_fraction(attotime a, attotime b, double timediv); + inline double make_fraction(const attotime &a, const attotime &b, double timediv); double get_filtered_volume(); // Kernel (pulse response) for filtering across samples (while we avoid fancy filtering within samples) diff --git a/src/emu/sound/ymf262.h b/src/emu/sound/ymf262.h index 8880d07e08c..b805ed485d8 100644 --- a/src/emu/sound/ymf262.h +++ b/src/emu/sound/ymf262.h @@ -27,7 +27,7 @@ typedef INT8 OPL3SAMPLE; #endif */ -typedef void (*OPL3_TIMERHANDLER)(void *param,int timer,attotime period); +typedef void (*OPL3_TIMERHANDLER)(void *param,int timer,const attotime &period); typedef void (*OPL3_IRQHANDLER)(void *param,int irq); typedef void (*OPL3_UPDATEHANDLER)(void *param,int min_interval_us); diff --git a/src/emu/timer.c b/src/emu/timer.c index 43b9683fc8d..f4012ca7dab 100644 --- a/src/emu/timer.c +++ b/src/emu/timer.c @@ -68,7 +68,7 @@ void timer_device::static_configure_generic(device_t &device, timer_device_expir // helper to set up a periodic timer //------------------------------------------------- -void timer_device::static_configure_periodic(device_t &device, timer_device_expired_delegate callback, attotime period) +void timer_device::static_configure_periodic(device_t &device, timer_device_expired_delegate callback, const attotime &period) { timer_device &timer = downcast(device); timer.m_type = TIMER_TYPE_PERIODIC; @@ -110,7 +110,7 @@ void timer_device::static_set_callback(device_t &device, timer_device_expired_de // to set the starting delay //------------------------------------------------- -void timer_device::static_set_start_delay(device_t &device, attotime delay) +void timer_device::static_set_start_delay(device_t &device, const attotime &delay) { timer_device &timer = downcast(device); timer.m_start_delay = delay; diff --git a/src/emu/timer.h b/src/emu/timer.h index 5deb159b5be..0dab2d50e6a 100644 --- a/src/emu/timer.h +++ b/src/emu/timer.h @@ -85,10 +85,10 @@ public: // inline configuration helpers static void static_configure_generic(device_t &device, timer_device_expired_delegate callback); - static void static_configure_periodic(device_t &device, timer_device_expired_delegate callback, attotime period); + static void static_configure_periodic(device_t &device, timer_device_expired_delegate callback, const attotime &period); static void static_configure_scanline(device_t &device, timer_device_expired_delegate callback, const char *screen, int first_vpos, int increment); static void static_set_callback(device_t &device, timer_device_expired_delegate callback); - static void static_set_start_delay(device_t &device, attotime delay); + static void static_set_start_delay(device_t &device, const attotime &delay); static void static_set_param(device_t &device, int param); static void static_set_ptr(device_t &device, void *ptr); @@ -104,7 +104,7 @@ public: // adjustments void reset() { adjust(attotime::never, 0, attotime::never); } - void adjust(attotime duration, INT32 param = 0, attotime period = attotime::never) { assert(m_type == TIMER_TYPE_GENERIC); m_timer->adjust(duration, param, period); } + void adjust(const attotime &duration, INT32 param = 0, const attotime &period = attotime::never) { assert(m_type == TIMER_TYPE_GENERIC); m_timer->adjust(duration, param, period); } // timing information attotime time_elapsed() const { return m_timer->elapsed(); } diff --git a/src/emu/video/fixfreq.c b/src/emu/video/fixfreq.c index e027df65393..3e1a4c54996 100644 --- a/src/emu/video/fixfreq.c +++ b/src/emu/video/fixfreq.c @@ -189,7 +189,7 @@ void fixedfreq_device::recompute_parameters(bool postload) screen().configure(m_htotal, m_vtotal, visarea, m_refresh.as_attoseconds()); } -void fixedfreq_device::update_screen_parameters(attotime refresh) +void fixedfreq_device::update_screen_parameters(const attotime &refresh) { rectangle visarea( // m_hsync - m_hvisible, @@ -203,7 +203,7 @@ void fixedfreq_device::update_screen_parameters(attotime refresh) screen().configure(m_htotal, m_vtotal, visarea, m_refresh.as_attoseconds()); } -int fixedfreq_device::sync_separator(attotime time, double newval) +int fixedfreq_device::sync_separator(const attotime &time, double newval) { int last_vsync = m_sig_vsync; int last_comp = m_sig_composite; diff --git a/src/emu/video/fixfreq.h b/src/emu/video/fixfreq.h index 9426dc6346c..c636fc2c354 100644 --- a/src/emu/video/fixfreq.h +++ b/src/emu/video/fixfreq.h @@ -68,11 +68,11 @@ protected: //virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); void recompute_parameters(bool postload); - void update_screen_parameters(attotime refresh); + void update_screen_parameters(const attotime &refresh); private: - int sync_separator(attotime time, double newval); + int sync_separator(const attotime &time, double newval); int m_htotal; int m_vtotal; diff --git a/src/emu/video/voodoo.c b/src/emu/video/voodoo.c index b7c052e0af8..34f3487ceb1 100644 --- a/src/emu/video/voodoo.c +++ b/src/emu/video/voodoo.c @@ -205,10 +205,10 @@ static void init_tmu_shared(tmu_shared_state *s); static void init_tmu(voodoo_state *v, tmu_state *t, voodoo_reg *reg, void *memory, int tmem); static void soft_reset(voodoo_state *v); static void recompute_video_memory(voodoo_state *v); -static void check_stalled_cpu(voodoo_state *v, attotime current_time); -static void flush_fifos(voodoo_state *v, attotime current_time); +static void check_stalled_cpu(voodoo_state *v, const attotime ¤t_time); +static void flush_fifos(voodoo_state *v, const attotime ¤t_time); static TIMER_CALLBACK( stall_cpu_callback ); -static void stall_cpu(voodoo_state *v, int state, attotime current_time); +static void stall_cpu(voodoo_state *v, int state, const attotime ¤t_time); static TIMER_CALLBACK( vblank_callback ); static INT32 register_w(voodoo_state *v, offs_t offset, UINT32 data); static INT32 lfb_w(voodoo_state *v, offs_t offset, UINT32 data, UINT32 mem_mask, int forcefront); @@ -2108,7 +2108,7 @@ static TIMER_CALLBACK( stall_cpu_callback ) } -static void check_stalled_cpu(voodoo_state *v, attotime current_time) +static void check_stalled_cpu(voodoo_state *v, const attotime ¤t_time) { int resume = FALSE; @@ -2162,7 +2162,7 @@ static void check_stalled_cpu(voodoo_state *v, attotime current_time) } -static void stall_cpu(voodoo_state *v, int state, attotime current_time) +static void stall_cpu(voodoo_state *v, int state, const attotime ¤t_time) { /* sanity check */ if (!v->pci.op_pending) fatalerror("FIFOs not empty, no op pending!\n"); @@ -3421,7 +3421,7 @@ static INT32 texture_w(voodoo_state *v, offs_t offset, UINT32 data) * *************************************/ -static void flush_fifos(voodoo_state *v, attotime current_time) +static void flush_fifos(voodoo_state *v, const attotime ¤t_time) { static UINT8 in_flush; diff --git a/src/mame/audio/n8080.c b/src/mame/audio/n8080.c index 987049f720e..924ddbfb63c 100644 --- a/src/mame/audio/n8080.c +++ b/src/mame/audio/n8080.c @@ -129,7 +129,7 @@ void n8080_state::update_SN76477_status() } -void n8080_state::start_mono_flop( int n, attotime expire ) +void n8080_state::start_mono_flop( int n, const attotime &expire ) { m_mono_flop[n] = 1; diff --git a/src/mame/drivers/gottlieb.c b/src/mame/drivers/gottlieb.c index e5e18662473..7c929f3f71f 100644 --- a/src/mame/drivers/gottlieb.c +++ b/src/mame/drivers/gottlieb.c @@ -535,7 +535,7 @@ void gottlieb_state::audio_process_clock(int logit) } -void gottlieb_state::audio_handle_zero_crossing(attotime zerotime, int logit) +void gottlieb_state::audio_handle_zero_crossing(const attotime &zerotime, int logit) { /* compute time from last clock */ attotime deltaclock = zerotime - m_laserdisc_last_clock; diff --git a/src/mame/includes/gottlieb.h b/src/mame/includes/gottlieb.h index 86269ea3f22..936a5f9de11 100644 --- a/src/mame/includes/gottlieb.h +++ b/src/mame/includes/gottlieb.h @@ -305,7 +305,7 @@ public: void draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect); inline void audio_end_state(); void audio_process_clock(int logit); - void audio_handle_zero_crossing(attotime zerotime, int logit); + void audio_handle_zero_crossing(const attotime &zerotime, int logit); void laserdisc_audio_process(laserdisc_device &device, int samplerate, int samples, const INT16 *ch0, const INT16 *ch1); protected: diff --git a/src/mame/includes/n8080.h b/src/mame/includes/n8080.h index 838741c8bfe..5d2c69a1aa2 100644 --- a/src/mame/includes/n8080.h +++ b/src/mame/includes/n8080.h @@ -104,7 +104,7 @@ public: void spacefev_update_SN76477_status(); void sheriff_update_SN76477_status(); void update_SN76477_status(); - void start_mono_flop( int n, attotime expire ); + void start_mono_flop( int n, const attotime &expire ); void stop_mono_flop( int n ); TIMER_CALLBACK_MEMBER( stop_mono_flop_callback ); void spacefev_sound_pins_changed(); diff --git a/src/mame/machine/cdislave.c b/src/mame/machine/cdislave.c index a7f87a858d2..ef29be5d3f7 100644 --- a/src/mame/machine/cdislave.c +++ b/src/mame/machine/cdislave.c @@ -60,7 +60,7 @@ TIMER_CALLBACK_MEMBER( cdislave_device::trigger_readback_int ) m_interrupt_timer->adjust(attotime::never); } -void cdislave_device::prepare_readback(attotime delay, UINT8 channel, UINT8 count, UINT8 data0, UINT8 data1, UINT8 data2, UINT8 data3, UINT8 cmd) +void cdislave_device::prepare_readback(const attotime &delay, UINT8 channel, UINT8 count, UINT8 data0, UINT8 data1, UINT8 data2, UINT8 data3, UINT8 cmd) { m_channel[channel].m_out_index = 0; m_channel[channel].m_out_count = count; diff --git a/src/mame/machine/cdislave.h b/src/mame/machine/cdislave.h index dda0379444a..a1a2c1c02dd 100644 --- a/src/mame/machine/cdislave.h +++ b/src/mame/machine/cdislave.h @@ -100,7 +100,7 @@ private: // static internal members // non-static internal members - void prepare_readback(attotime delay, UINT8 channel, UINT8 count, UINT8 data0, UINT8 data1, UINT8 data2, UINT8 data3, UINT8 cmd); + void prepare_readback(const attotime &delay, UINT8 channel, UINT8 count, UINT8 data0, UINT8 data1, UINT8 data2, UINT8 data3, UINT8 cmd); void perform_mouse_update(); void set_mouse_position(); }; diff --git a/src/mame/machine/ticket.c b/src/mame/machine/ticket.c index f350992b29d..a80d951a973 100644 --- a/src/mame/machine/ticket.c +++ b/src/mame/machine/ticket.c @@ -72,7 +72,7 @@ ticket_dispenser_device::~ticket_dispenser_device() // for dispensing //------------------------------------------------- -void ticket_dispenser_device::static_set_period(device_t &device, attotime period) +void ticket_dispenser_device::static_set_period(device_t &device, const attotime &period) { downcast(device).m_period = period; } diff --git a/src/mame/machine/ticket.h b/src/mame/machine/ticket.h index ef8999d2160..b061ba7338d 100644 --- a/src/mame/machine/ticket.h +++ b/src/mame/machine/ticket.h @@ -57,7 +57,7 @@ public: virtual ~ticket_dispenser_device(); // inline configuration helpers - static void static_set_period(device_t &device, attotime period); + static void static_set_period(device_t &device, const attotime &period); static void static_set_senses(device_t &device, UINT8 motor_sense, UINT8 status_sense); // read/write handlers