first batch of passing attotime as const reference instead of copy - where possible (nw)
This commit is contained in:
parent
d4b13a88cc
commit
1da9d1b6a4
@ -208,19 +208,19 @@ void c2040_fdc_t::rollback()
|
||||
get_next_edge(cur_live.tm);
|
||||
}
|
||||
|
||||
void c2040_fdc_t::start_writing(attotime tm)
|
||||
void c2040_fdc_t::start_writing(const attotime &tm)
|
||||
{
|
||||
cur_live.write_start_time = tm;
|
||||
cur_live.write_position = 0;
|
||||
}
|
||||
|
||||
void c2040_fdc_t::stop_writing(attotime tm)
|
||||
void c2040_fdc_t::stop_writing(const attotime &tm)
|
||||
{
|
||||
commit(tm);
|
||||
cur_live.write_start_time = attotime::never;
|
||||
}
|
||||
|
||||
bool c2040_fdc_t::write_next_bit(bool bit, attotime limit)
|
||||
bool c2040_fdc_t::write_next_bit(bool bit, const attotime &limit)
|
||||
{
|
||||
if(cur_live.write_start_time.is_never()) {
|
||||
cur_live.write_start_time = cur_live.tm;
|
||||
@ -239,7 +239,7 @@ bool c2040_fdc_t::write_next_bit(bool bit, attotime limit)
|
||||
return false;
|
||||
}
|
||||
|
||||
void c2040_fdc_t::commit(attotime tm)
|
||||
void c2040_fdc_t::commit(const attotime &tm)
|
||||
{
|
||||
if(cur_live.write_start_time.is_never() || tm == cur_live.write_start_time || !cur_live.write_position)
|
||||
return;
|
||||
@ -305,7 +305,7 @@ void c2040_fdc_t::live_abort()
|
||||
cur_live.error = 1;
|
||||
}
|
||||
|
||||
void c2040_fdc_t::live_run(attotime limit)
|
||||
void c2040_fdc_t::live_run(const attotime &limit)
|
||||
{
|
||||
if(cur_live.state == IDLE || cur_live.next_state != -1)
|
||||
return;
|
||||
@ -438,14 +438,14 @@ void c2040_fdc_t::live_run(attotime limit)
|
||||
}
|
||||
}
|
||||
|
||||
void c2040_fdc_t::get_next_edge(attotime when)
|
||||
void c2040_fdc_t::get_next_edge(const attotime &when)
|
||||
{
|
||||
floppy_image_device *floppy = get_floppy();
|
||||
|
||||
cur_live.edge = floppy ? floppy->get_next_transition(when) : attotime::never;
|
||||
}
|
||||
|
||||
int c2040_fdc_t::get_next_bit(attotime &tm, attotime limit)
|
||||
int c2040_fdc_t::get_next_bit(attotime &tm, const attotime &limit)
|
||||
{
|
||||
attotime next = tm + m_period;
|
||||
|
||||
|
@ -149,16 +149,16 @@ protected:
|
||||
void live_start();
|
||||
void checkpoint();
|
||||
void rollback();
|
||||
bool write_next_bit(bool bit, attotime limit);
|
||||
void start_writing(attotime tm);
|
||||
void commit(attotime tm);
|
||||
void stop_writing(attotime tm);
|
||||
bool write_next_bit(bool bit, const attotime &limit);
|
||||
void start_writing(const attotime &tm);
|
||||
void commit(const attotime &tm);
|
||||
void stop_writing(const attotime &tm);
|
||||
void live_delay(int state);
|
||||
void live_sync();
|
||||
void live_abort();
|
||||
void live_run(attotime limit = attotime::never);
|
||||
void get_next_edge(attotime when);
|
||||
int get_next_bit(attotime &tm, attotime limit);
|
||||
void live_run(const attotime &limit = attotime::never);
|
||||
void get_next_edge(const attotime &when);
|
||||
int get_next_bit(attotime &tm, const attotime &limit);
|
||||
};
|
||||
|
||||
|
||||
|
@ -557,7 +557,7 @@ int floppy_image_device::find_index(UINT32 position, const UINT32 *buf, int buf_
|
||||
}
|
||||
}
|
||||
|
||||
UINT32 floppy_image_device::find_position(attotime &base, attotime when)
|
||||
UINT32 floppy_image_device::find_position(attotime &base, const attotime &when)
|
||||
{
|
||||
base = revolution_start_time;
|
||||
attotime delta = when - base;
|
||||
@ -574,7 +574,7 @@ UINT32 floppy_image_device::find_position(attotime &base, attotime when)
|
||||
return (delta*floppy_ratio_1 + attotime::from_nsec(500)).as_ticks(1000000000/1000);
|
||||
}
|
||||
|
||||
attotime floppy_image_device::get_next_transition(attotime from_when)
|
||||
attotime floppy_image_device::get_next_transition(const attotime &from_when)
|
||||
{
|
||||
if(!image || mon)
|
||||
return attotime::never;
|
||||
@ -603,7 +603,7 @@ attotime floppy_image_device::get_next_transition(attotime from_when)
|
||||
return base + attotime::from_nsec((UINT64(next_position)*2000/floppy_ratio_1+1)/2);
|
||||
}
|
||||
|
||||
void floppy_image_device::write_flux(attotime start, attotime end, int transition_count, const attotime *transitions)
|
||||
void floppy_image_device::write_flux(const attotime &start, const attotime &end, int transition_count, const attotime *transitions)
|
||||
{
|
||||
if(!image || mon)
|
||||
return;
|
||||
@ -762,7 +762,7 @@ void floppy_image_device::write_zone(UINT32 *buf, int &cells, int &index, UINT32
|
||||
}
|
||||
}
|
||||
|
||||
void floppy_image_device::set_write_splice(attotime when)
|
||||
void floppy_image_device::set_write_splice(const attotime &when)
|
||||
{
|
||||
image_dirty = true;
|
||||
attotime base;
|
||||
|
@ -112,9 +112,9 @@ public:
|
||||
|
||||
void index_resync();
|
||||
attotime time_next_index();
|
||||
attotime get_next_transition(attotime from_when);
|
||||
void write_flux(attotime start, attotime end, int transition_count, const attotime *transitions);
|
||||
void set_write_splice(attotime when);
|
||||
attotime get_next_transition(const attotime &from_when);
|
||||
void write_flux(const attotime &start, const attotime &end, int transition_count, const attotime *transitions);
|
||||
void set_write_splice(const attotime &when);
|
||||
UINT32 get_form_factor() const;
|
||||
UINT32 get_variant() const;
|
||||
|
||||
@ -175,7 +175,7 @@ protected:
|
||||
ready_cb cur_ready_cb;
|
||||
wpt_cb cur_wpt_cb;
|
||||
|
||||
UINT32 find_position(attotime &base, attotime when);
|
||||
UINT32 find_position(attotime &base, const attotime &when);
|
||||
int find_index(UINT32 position, const UINT32 *buf, int buf_size);
|
||||
void write_zone(UINT32 *buf, int &cells, int &index, UINT32 spos, UINT32 epos, UINT32 mg);
|
||||
void commit_image();
|
||||
|
@ -166,19 +166,19 @@ void c64h156_device::rollback()
|
||||
get_next_edge(cur_live.tm);
|
||||
}
|
||||
|
||||
void c64h156_device::start_writing(attotime tm)
|
||||
void c64h156_device::start_writing(const attotime &tm)
|
||||
{
|
||||
cur_live.write_start_time = tm;
|
||||
cur_live.write_position = 0;
|
||||
}
|
||||
|
||||
void c64h156_device::stop_writing(attotime tm)
|
||||
void c64h156_device::stop_writing(const attotime &tm)
|
||||
{
|
||||
commit(tm);
|
||||
cur_live.write_start_time = attotime::never;
|
||||
}
|
||||
|
||||
bool c64h156_device::write_next_bit(bool bit, attotime limit)
|
||||
bool c64h156_device::write_next_bit(bool bit, const attotime &limit)
|
||||
{
|
||||
if(cur_live.write_start_time.is_never()) {
|
||||
cur_live.write_start_time = cur_live.tm;
|
||||
@ -197,7 +197,7 @@ bool c64h156_device::write_next_bit(bool bit, attotime limit)
|
||||
return false;
|
||||
}
|
||||
|
||||
void c64h156_device::commit(attotime tm)
|
||||
void c64h156_device::commit(const attotime &tm)
|
||||
{
|
||||
if(cur_live.write_start_time.is_never() || tm == cur_live.write_start_time || !cur_live.write_position)
|
||||
return;
|
||||
@ -261,7 +261,7 @@ void c64h156_device::live_abort()
|
||||
cur_live.byte = 1;
|
||||
}
|
||||
|
||||
void c64h156_device::live_run(attotime limit)
|
||||
void c64h156_device::live_run(const attotime &limit)
|
||||
{
|
||||
if(cur_live.state == IDLE || cur_live.next_state != -1)
|
||||
return;
|
||||
@ -378,12 +378,12 @@ void c64h156_device::live_run(attotime limit)
|
||||
}
|
||||
}
|
||||
|
||||
void c64h156_device::get_next_edge(attotime when)
|
||||
void c64h156_device::get_next_edge(const attotime &when)
|
||||
{
|
||||
cur_live.edge = m_floppy->get_next_transition(when);
|
||||
}
|
||||
|
||||
int c64h156_device::get_next_bit(attotime &tm, attotime limit)
|
||||
int c64h156_device::get_next_bit(attotime &tm, const attotime &limit)
|
||||
{
|
||||
attotime next = tm + m_period;
|
||||
|
||||
|
@ -186,16 +186,16 @@ private:
|
||||
void live_start();
|
||||
void checkpoint();
|
||||
void rollback();
|
||||
bool write_next_bit(bool bit, attotime limit);
|
||||
void start_writing(attotime tm);
|
||||
void commit(attotime tm);
|
||||
void stop_writing(attotime tm);
|
||||
bool write_next_bit(bool bit, const attotime &limit);
|
||||
void start_writing(const attotime &tm);
|
||||
void commit(const attotime &tm);
|
||||
void stop_writing(const attotime &tm);
|
||||
void live_delay(int state);
|
||||
void live_sync();
|
||||
void live_abort();
|
||||
void live_run(attotime limit = attotime::never);
|
||||
void get_next_edge(attotime when);
|
||||
int get_next_bit(attotime &tm, attotime limit);
|
||||
void live_run(const attotime &limit = attotime::never);
|
||||
void get_next_edge(const attotime &when);
|
||||
int get_next_bit(attotime &tm, const attotime &limit);
|
||||
};
|
||||
|
||||
|
||||
|
@ -172,7 +172,7 @@ void amiga_fdc::live_abort()
|
||||
cur_live.next_state = -1;
|
||||
}
|
||||
|
||||
void amiga_fdc::live_run(attotime limit)
|
||||
void amiga_fdc::live_run(const attotime &limit)
|
||||
{
|
||||
amiga_state *state = machine().driver_data<amiga_state>();
|
||||
|
||||
@ -507,13 +507,13 @@ void amiga_fdc::index_callback(floppy_image_device *floppy, int state)
|
||||
m_write_index(!state);
|
||||
}
|
||||
|
||||
void amiga_fdc::pll_t::set_clock(attotime period)
|
||||
void amiga_fdc::pll_t::set_clock(const attotime &period)
|
||||
{
|
||||
for(int i=0; i<38; i++)
|
||||
delays[i] = period*(i+1);
|
||||
}
|
||||
|
||||
void amiga_fdc::pll_t::reset(attotime when)
|
||||
void amiga_fdc::pll_t::reset(const attotime &when)
|
||||
{
|
||||
counter = 0;
|
||||
increment = 146;
|
||||
@ -527,7 +527,7 @@ void amiga_fdc::pll_t::reset(attotime when)
|
||||
freq_sub = 0x00;
|
||||
}
|
||||
|
||||
int amiga_fdc::pll_t::get_next_bit(attotime &tm, floppy_image_device *floppy, attotime limit)
|
||||
int amiga_fdc::pll_t::get_next_bit(attotime &tm, floppy_image_device *floppy, const attotime &limit)
|
||||
{
|
||||
attotime when = floppy ? floppy->get_next_transition(ctime) : attotime::never;
|
||||
|
||||
@ -601,19 +601,19 @@ int amiga_fdc::pll_t::get_next_bit(attotime &tm, floppy_image_device *floppy, at
|
||||
return bit;
|
||||
}
|
||||
|
||||
void amiga_fdc::pll_t::start_writing(attotime tm)
|
||||
void amiga_fdc::pll_t::start_writing(const attotime & tm)
|
||||
{
|
||||
write_start_time = tm;
|
||||
write_position = 0;
|
||||
}
|
||||
|
||||
void amiga_fdc::pll_t::stop_writing(floppy_image_device *floppy, attotime tm)
|
||||
void amiga_fdc::pll_t::stop_writing(floppy_image_device *floppy, const attotime &tm)
|
||||
{
|
||||
commit(floppy, tm);
|
||||
write_start_time = attotime::never;
|
||||
}
|
||||
|
||||
bool amiga_fdc::pll_t::write_next_bit(bool bit, attotime &tm, floppy_image_device *floppy, attotime limit)
|
||||
bool amiga_fdc::pll_t::write_next_bit(bool bit, attotime &tm, floppy_image_device *floppy, const attotime &limit)
|
||||
{
|
||||
if(write_start_time.is_never()) {
|
||||
write_start_time = ctime;
|
||||
@ -644,7 +644,7 @@ bool amiga_fdc::pll_t::write_next_bit(bool bit, attotime &tm, floppy_image_devic
|
||||
}
|
||||
|
||||
|
||||
void amiga_fdc::pll_t::commit(floppy_image_device *floppy, attotime tm)
|
||||
void amiga_fdc::pll_t::commit(floppy_image_device *floppy, const attotime &tm)
|
||||
{
|
||||
if(write_start_time.is_never() || tm == write_start_time)
|
||||
return;
|
||||
|
@ -66,13 +66,13 @@ private:
|
||||
attotime write_buffer[32];
|
||||
int write_position;
|
||||
|
||||
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 live_info {
|
||||
@ -111,7 +111,7 @@ private:
|
||||
void live_delay(int state);
|
||||
void live_sync();
|
||||
void live_abort();
|
||||
void live_run(attotime limit = attotime::never);
|
||||
void live_run(const attotime &limit = attotime::never);
|
||||
};
|
||||
|
||||
extern const device_type AMIGA_FDC;
|
||||
|
@ -11,7 +11,7 @@ astring fdc_pll_t::tts(attotime t)
|
||||
return buf;
|
||||
}
|
||||
|
||||
void fdc_pll_t::set_clock(attotime _period)
|
||||
void fdc_pll_t::set_clock(const attotime &_period)
|
||||
{
|
||||
period = _period;
|
||||
period_adjust_base = period * 0.05;
|
||||
@ -19,7 +19,7 @@ void fdc_pll_t::set_clock(attotime _period)
|
||||
max_period = period * 1.25;
|
||||
}
|
||||
|
||||
void fdc_pll_t::reset(attotime when)
|
||||
void fdc_pll_t::reset(const attotime &when)
|
||||
{
|
||||
ctime = when;
|
||||
phase_adjust = attotime::zero;
|
||||
@ -28,19 +28,19 @@ void fdc_pll_t::reset(attotime when)
|
||||
write_start_time = attotime::never;
|
||||
}
|
||||
|
||||
void fdc_pll_t::start_writing(attotime tm)
|
||||
void fdc_pll_t::start_writing(const attotime &tm)
|
||||
{
|
||||
write_start_time = tm;
|
||||
write_position = 0;
|
||||
}
|
||||
|
||||
void fdc_pll_t::stop_writing(floppy_image_device *floppy, attotime tm)
|
||||
void fdc_pll_t::stop_writing(floppy_image_device *floppy, const attotime &tm)
|
||||
{
|
||||
commit(floppy, tm);
|
||||
write_start_time = attotime::never;
|
||||
}
|
||||
|
||||
void fdc_pll_t::commit(floppy_image_device *floppy, attotime tm)
|
||||
void fdc_pll_t::commit(floppy_image_device *floppy, const attotime &tm)
|
||||
{
|
||||
if(write_start_time.is_never() || tm == write_start_time)
|
||||
return;
|
||||
@ -51,7 +51,7 @@ void fdc_pll_t::commit(floppy_image_device *floppy, attotime tm)
|
||||
write_position = 0;
|
||||
}
|
||||
|
||||
int fdc_pll_t::get_next_bit(attotime &tm, floppy_image_device *floppy, attotime limit)
|
||||
int fdc_pll_t::get_next_bit(attotime &tm, floppy_image_device *floppy, const attotime &limit)
|
||||
{
|
||||
attotime edge = floppy ? floppy->get_next_transition(ctime) : attotime::never;
|
||||
|
||||
@ -112,7 +112,7 @@ int fdc_pll_t::get_next_bit(attotime &tm, floppy_image_device *floppy, attotime
|
||||
return 1;
|
||||
}
|
||||
|
||||
bool fdc_pll_t::write_next_bit(bool bit, attotime &tm, floppy_image_device *floppy, attotime limit)
|
||||
bool fdc_pll_t::write_next_bit(bool bit, attotime &tm, floppy_image_device *floppy, const attotime &limit)
|
||||
{
|
||||
if(write_start_time.is_never()) {
|
||||
write_start_time = ctime;
|
||||
|
@ -17,13 +17,13 @@ public:
|
||||
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);
|
||||
|
||||
astring tts(attotime tm);
|
||||
};
|
||||
|
@ -188,7 +188,7 @@ void wd_fdc_t::dden_w(bool _dden)
|
||||
}
|
||||
}
|
||||
|
||||
astring wd_fdc_t::tts(attotime t)
|
||||
astring wd_fdc_t::tts(const attotime &t)
|
||||
{
|
||||
char buf[256];
|
||||
int nsec = t.attoseconds / ATTOSECONDS_PER_NANOSECOND;
|
||||
@ -1394,7 +1394,7 @@ void wd_fdc_t::live_abort()
|
||||
cur_live.next_state = -1;
|
||||
}
|
||||
|
||||
bool wd_fdc_t::read_one_bit(attotime limit)
|
||||
bool wd_fdc_t::read_one_bit(const attotime &limit)
|
||||
{
|
||||
int bit = pll_get_next_bit(cur_live.tm, floppy, limit);
|
||||
if(bit < 0)
|
||||
@ -1412,7 +1412,7 @@ bool wd_fdc_t::read_one_bit(attotime limit)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool wd_fdc_t::write_one_bit(attotime limit)
|
||||
bool wd_fdc_t::write_one_bit(const attotime &limit)
|
||||
{
|
||||
bool bit = cur_live.shift_reg & 0x8000;
|
||||
if(pll_write_next_bit(bit, cur_live.tm, floppy, limit))
|
||||
@ -2092,23 +2092,23 @@ wd_fdc_analog_t::wd_fdc_analog_t(const machine_config &mconfig, device_type type
|
||||
clock_ratio = 1;
|
||||
}
|
||||
|
||||
void wd_fdc_analog_t::pll_reset(bool fm, attotime when)
|
||||
void wd_fdc_analog_t::pll_reset(bool fm, const attotime &when)
|
||||
{
|
||||
cur_pll.reset(when);
|
||||
cur_pll.set_clock(clocks_to_attotime(fm ? 4 : 2));
|
||||
}
|
||||
|
||||
void wd_fdc_analog_t::pll_start_writing(attotime tm)
|
||||
void wd_fdc_analog_t::pll_start_writing(const attotime &tm)
|
||||
{
|
||||
cur_pll.start_writing(tm);
|
||||
}
|
||||
|
||||
void wd_fdc_analog_t::pll_commit(floppy_image_device *floppy, attotime tm)
|
||||
void wd_fdc_analog_t::pll_commit(floppy_image_device *floppy, const attotime &tm)
|
||||
{
|
||||
cur_pll.commit(floppy, tm);
|
||||
}
|
||||
|
||||
void wd_fdc_analog_t::pll_stop_writing(floppy_image_device *floppy, attotime tm)
|
||||
void wd_fdc_analog_t::pll_stop_writing(floppy_image_device *floppy, const attotime &tm)
|
||||
{
|
||||
cur_pll.stop_writing(floppy, tm);
|
||||
}
|
||||
@ -2123,12 +2123,12 @@ void wd_fdc_analog_t::pll_retrieve_checkpoint()
|
||||
cur_pll = checkpoint_pll;
|
||||
}
|
||||
|
||||
int wd_fdc_analog_t::pll_get_next_bit(attotime &tm, floppy_image_device *floppy, attotime limit)
|
||||
int wd_fdc_analog_t::pll_get_next_bit(attotime &tm, floppy_image_device *floppy, const attotime &limit)
|
||||
{
|
||||
return cur_pll.get_next_bit(tm, floppy, limit);
|
||||
}
|
||||
|
||||
bool wd_fdc_analog_t::pll_write_next_bit(bool bit, attotime &tm, floppy_image_device *floppy, attotime limit)
|
||||
bool wd_fdc_analog_t::pll_write_next_bit(bool bit, attotime &tm, floppy_image_device *floppy, const attotime &limit)
|
||||
{
|
||||
return cur_pll.write_next_bit(bit, tm, floppy, limit);
|
||||
}
|
||||
@ -2141,33 +2141,33 @@ wd_fdc_digital_t::wd_fdc_digital_t(const machine_config &mconfig, device_type ty
|
||||
|
||||
const int wd_fdc_digital_t::wd_digital_step_times[4] = { 12000, 24000, 40000, 60000 };
|
||||
|
||||
void wd_fdc_digital_t::pll_reset(bool fm, attotime when)
|
||||
void wd_fdc_digital_t::pll_reset(bool fm, const attotime &when)
|
||||
{
|
||||
cur_pll.reset(when);
|
||||
cur_pll.set_clock(clocks_to_attotime(fm ? 2 : 1)); // HACK
|
||||
}
|
||||
|
||||
void wd_fdc_digital_t::pll_start_writing(attotime tm)
|
||||
void wd_fdc_digital_t::pll_start_writing(const attotime &tm)
|
||||
{
|
||||
cur_pll.start_writing(tm);
|
||||
}
|
||||
|
||||
void wd_fdc_digital_t::pll_commit(floppy_image_device *floppy, attotime tm)
|
||||
void wd_fdc_digital_t::pll_commit(floppy_image_device *floppy, const attotime &tm)
|
||||
{
|
||||
cur_pll.commit(floppy, tm);
|
||||
}
|
||||
|
||||
void wd_fdc_digital_t::pll_stop_writing(floppy_image_device *floppy, attotime tm)
|
||||
void wd_fdc_digital_t::pll_stop_writing(floppy_image_device *floppy, const attotime &tm)
|
||||
{
|
||||
cur_pll.stop_writing(floppy, tm);
|
||||
}
|
||||
|
||||
int wd_fdc_digital_t::pll_get_next_bit(attotime &tm, floppy_image_device *floppy, attotime limit)
|
||||
int wd_fdc_digital_t::pll_get_next_bit(attotime &tm, floppy_image_device *floppy, const attotime &limit)
|
||||
{
|
||||
return cur_pll.get_next_bit(tm, floppy, limit);
|
||||
}
|
||||
|
||||
bool wd_fdc_digital_t::pll_write_next_bit(bool bit, attotime &tm, floppy_image_device *floppy, attotime limit)
|
||||
bool wd_fdc_digital_t::pll_write_next_bit(bool bit, attotime &tm, floppy_image_device *floppy, const attotime &limit)
|
||||
{
|
||||
return cur_pll.write_next_bit(bit, tm, floppy, limit);
|
||||
}
|
||||
@ -2182,13 +2182,13 @@ void wd_fdc_digital_t::pll_retrieve_checkpoint()
|
||||
cur_pll = checkpoint_pll;
|
||||
}
|
||||
|
||||
void wd_fdc_digital_t::digital_pll_t::set_clock(attotime period)
|
||||
void wd_fdc_digital_t::digital_pll_t::set_clock(const attotime &period)
|
||||
{
|
||||
for(int i=0; i<42; i++)
|
||||
delays[i] = period*(i+1);
|
||||
}
|
||||
|
||||
void wd_fdc_digital_t::digital_pll_t::reset(attotime when)
|
||||
void wd_fdc_digital_t::digital_pll_t::reset(const attotime &when)
|
||||
{
|
||||
counter = 0;
|
||||
increment = 128;
|
||||
@ -2204,7 +2204,7 @@ void wd_fdc_digital_t::digital_pll_t::reset(attotime when)
|
||||
write_start_time = attotime::never;
|
||||
}
|
||||
|
||||
int wd_fdc_digital_t::digital_pll_t::get_next_bit(attotime &tm, floppy_image_device *floppy, attotime limit)
|
||||
int wd_fdc_digital_t::digital_pll_t::get_next_bit(attotime &tm, floppy_image_device *floppy, const attotime &limit)
|
||||
{
|
||||
attotime when = floppy ? floppy->get_next_transition(ctime) : attotime::never;
|
||||
|
||||
@ -2284,19 +2284,19 @@ int wd_fdc_digital_t::digital_pll_t::get_next_bit(attotime &tm, floppy_image_dev
|
||||
return bit;
|
||||
}
|
||||
|
||||
void wd_fdc_digital_t::digital_pll_t::start_writing(attotime tm)
|
||||
void wd_fdc_digital_t::digital_pll_t::start_writing(const attotime &tm)
|
||||
{
|
||||
write_start_time = tm;
|
||||
write_position = 0;
|
||||
}
|
||||
|
||||
void wd_fdc_digital_t::digital_pll_t::stop_writing(floppy_image_device *floppy, attotime tm)
|
||||
void wd_fdc_digital_t::digital_pll_t::stop_writing(floppy_image_device *floppy, const attotime &tm)
|
||||
{
|
||||
commit(floppy, tm);
|
||||
write_start_time = attotime::never;
|
||||
}
|
||||
|
||||
bool wd_fdc_digital_t::digital_pll_t::write_next_bit(bool bit, attotime &tm, floppy_image_device *floppy, attotime limit)
|
||||
bool wd_fdc_digital_t::digital_pll_t::write_next_bit(bool bit, attotime &tm, floppy_image_device *floppy, const attotime &limit)
|
||||
{
|
||||
if(write_start_time.is_never()) {
|
||||
write_start_time = ctime;
|
||||
@ -2326,7 +2326,7 @@ bool wd_fdc_digital_t::digital_pll_t::write_next_bit(bool bit, attotime &tm, flo
|
||||
return false;
|
||||
}
|
||||
|
||||
void wd_fdc_digital_t::digital_pll_t::commit(floppy_image_device *floppy, attotime tm)
|
||||
void wd_fdc_digital_t::digital_pll_t::commit(floppy_image_device *floppy, const attotime &tm)
|
||||
{
|
||||
if(write_start_time.is_never() || tm == write_start_time)
|
||||
return;
|
||||
|
@ -195,12 +195,12 @@ protected:
|
||||
virtual int calc_sector_size(UINT8 size, UINT8 command) const;
|
||||
virtual int settle_time() const;
|
||||
|
||||
virtual void pll_reset(bool fm, attotime when) = 0;
|
||||
virtual void pll_start_writing(attotime tm) = 0;
|
||||
virtual void pll_commit(floppy_image_device *floppy, attotime tm) = 0;
|
||||
virtual void pll_stop_writing(floppy_image_device *floppy, attotime tm) = 0;
|
||||
virtual int pll_get_next_bit(attotime &tm, floppy_image_device *floppy, attotime limit) = 0;
|
||||
virtual bool pll_write_next_bit(bool bit, attotime &tm, floppy_image_device *floppy, attotime limit) = 0;
|
||||
virtual void pll_reset(bool fm, const attotime &when) = 0;
|
||||
virtual void pll_start_writing(const attotime &tm) = 0;
|
||||
virtual void pll_commit(floppy_image_device *floppy, const attotime &tm) = 0;
|
||||
virtual void pll_stop_writing(floppy_image_device *floppy, const attotime &tm) = 0;
|
||||
virtual int pll_get_next_bit(attotime &tm, floppy_image_device *floppy, const attotime &limit) = 0;
|
||||
virtual bool pll_write_next_bit(bool bit, attotime &tm, floppy_image_device *floppy, const attotime &limit) = 0;
|
||||
virtual void pll_save_checkpoint() = 0;
|
||||
virtual void pll_retrieve_checkpoint() = 0;
|
||||
|
||||
@ -370,7 +370,7 @@ private:
|
||||
int format_last_byte_count;
|
||||
astring format_description_string;
|
||||
|
||||
static astring tts(attotime t);
|
||||
static astring tts(const attotime &t);
|
||||
astring ttsn();
|
||||
|
||||
void delay_cycles(emu_timer *tm, int cycles);
|
||||
@ -419,8 +419,8 @@ private:
|
||||
void live_delay(int state);
|
||||
void live_sync();
|
||||
void live_run(attotime limit = attotime::never);
|
||||
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);
|
||||
|
||||
void live_write_raw(UINT16 raw);
|
||||
void live_write_mfm(UINT8 mfm);
|
||||
@ -435,12 +435,12 @@ public:
|
||||
wd_fdc_analog_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
|
||||
|
||||
protected:
|
||||
virtual void pll_reset(bool fm, attotime when);
|
||||
virtual void pll_start_writing(attotime tm);
|
||||
virtual void pll_commit(floppy_image_device *floppy, attotime tm);
|
||||
virtual void pll_stop_writing(floppy_image_device *floppy, attotime tm);
|
||||
virtual int pll_get_next_bit(attotime &tm, floppy_image_device *floppy, attotime limit);
|
||||
virtual bool pll_write_next_bit(bool bit, attotime &tm, floppy_image_device *floppy, attotime limit);
|
||||
virtual void pll_reset(bool fm, const attotime &when);
|
||||
virtual void pll_start_writing(const attotime &tm);
|
||||
virtual void pll_commit(floppy_image_device *floppy, const attotime &tm);
|
||||
virtual void pll_stop_writing(floppy_image_device *floppy, const attotime &tm);
|
||||
virtual int pll_get_next_bit(attotime &tm, floppy_image_device *floppy, const attotime &limit);
|
||||
virtual bool pll_write_next_bit(bool bit, attotime &tm, floppy_image_device *floppy, const attotime &limit);
|
||||
virtual void pll_save_checkpoint();
|
||||
virtual void pll_retrieve_checkpoint();
|
||||
|
||||
@ -455,12 +455,12 @@ public:
|
||||
protected:
|
||||
static const int wd_digital_step_times[4];
|
||||
|
||||
virtual void pll_reset(bool fm, attotime when);
|
||||
virtual void pll_start_writing(attotime tm);
|
||||
virtual void pll_commit(floppy_image_device *floppy, attotime tm);
|
||||
virtual void pll_stop_writing(floppy_image_device *floppy, attotime tm);
|
||||
virtual int pll_get_next_bit(attotime &tm, floppy_image_device *floppy, attotime limit);
|
||||
virtual bool pll_write_next_bit(bool bit, attotime &tm, floppy_image_device *floppy, attotime limit);
|
||||
virtual void pll_reset(bool fm, const attotime &when);
|
||||
virtual void pll_start_writing(const attotime &tm);
|
||||
virtual void pll_commit(floppy_image_device *floppy, const attotime &tm);
|
||||
virtual void pll_stop_writing(floppy_image_device *floppy, const attotime &tm);
|
||||
virtual int pll_get_next_bit(attotime &tm, floppy_image_device *floppy, const attotime &limit);
|
||||
virtual bool pll_write_next_bit(bool bit, attotime &tm, floppy_image_device *floppy, const attotime &limit);
|
||||
virtual void pll_save_checkpoint();
|
||||
virtual void pll_retrieve_checkpoint();
|
||||
|
||||
@ -480,13 +480,13 @@ private:
|
||||
attotime write_buffer[32];
|
||||
int write_position;
|
||||
|
||||
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);
|
||||
};
|
||||
|
||||
digital_pll_t cur_pll, checkpoint_pll;
|
||||
|
@ -336,7 +336,7 @@ void wozfdc_device::control(int offset)
|
||||
}
|
||||
}
|
||||
|
||||
UINT64 wozfdc_device::time_to_cycles(attotime tm)
|
||||
UINT64 wozfdc_device::time_to_cycles(const attotime &tm)
|
||||
{
|
||||
// Clock is falling edges of the ~2Mhz clock
|
||||
// The 1021800 must be the controlling 6502's speed
|
||||
@ -365,7 +365,7 @@ void wozfdc_device::lss_start()
|
||||
lss_predict();
|
||||
}
|
||||
|
||||
void wozfdc_device::lss_delay(UINT64 cycles, attotime tm, UINT8 data_reg, UINT8 address, bool write_line_active)
|
||||
void wozfdc_device::lss_delay(UINT64 cycles, const attotime &tm, UINT8 data_reg, UINT8 address, bool write_line_active)
|
||||
{
|
||||
if(data_reg & 0x80)
|
||||
address |= 0x02;
|
||||
|
@ -74,12 +74,12 @@ private:
|
||||
|
||||
void control(int offset);
|
||||
void phase(int ph, bool on);
|
||||
UINT64 time_to_cycles(attotime tm);
|
||||
UINT64 time_to_cycles(const attotime &tm);
|
||||
attotime cycles_to_time(UINT64 cycles);
|
||||
void a3_update_drive_sel();
|
||||
|
||||
void lss_start();
|
||||
void lss_delay(UINT64 cycles, attotime tm, UINT8 data_reg, UINT8 address, bool write_line_active);
|
||||
void lss_delay(UINT64 cycles, const attotime &tm, UINT8 data_reg, UINT8 address, bool write_line_active);
|
||||
void lss_delay(UINT64 cycles, UINT8 data_reg, UINT8 address, bool write_line_active);
|
||||
void lss_sync();
|
||||
void lss_predict(attotime limit = attotime::never);
|
||||
|
Loading…
Reference in New Issue
Block a user