wd_fdc: Convert line handlers to READ/WRITE_LINE_MEMBER to make them devcb-accessible (nw)

This commit is contained in:
AJR 2017-10-28 03:20:55 -04:00
parent e42be958c9
commit 07a36d9d66
2 changed files with 15 additions and 15 deletions

View File

@ -200,15 +200,15 @@ void wd_fdc_device_base::set_floppy(floppy_image_device *_floppy)
ready_callback(floppy, next_ready); ready_callback(floppy, next_ready);
} }
void wd_fdc_device_base::dden_w(bool _dden) WRITE_LINE_MEMBER(wd_fdc_device_base::dden_w)
{ {
if(disable_mfm) { if(disable_mfm) {
logerror("Error, this chip does not have a dden line\n"); logerror("Error, this chip does not have a dden line\n");
return; return;
} }
if(dden != _dden) { if(dden != bool(state)) {
dden = _dden; dden = bool(state);
if (TRACE_LINES) logerror("select %s\n", dden ? "fm" : "mfm"); if (TRACE_LINES) logerror("select %s\n", dden ? "fm" : "mfm");
} }
} }
@ -1368,27 +1368,27 @@ void wd_fdc_device_base::index_callback(floppy_image_device *floppy, int state)
general_continue(); general_continue();
} }
bool wd_fdc_device_base::intrq_r() READ_LINE_MEMBER(wd_fdc_device_base::intrq_r)
{ {
return intrq; return intrq;
} }
bool wd_fdc_device_base::drq_r() READ_LINE_MEMBER(wd_fdc_device_base::drq_r)
{ {
return drq; return drq;
} }
bool wd_fdc_device_base::hld_r() READ_LINE_MEMBER(wd_fdc_device_base::hld_r)
{ {
return hld; return hld;
} }
void wd_fdc_device_base::hlt_w(bool state) WRITE_LINE_MEMBER(wd_fdc_device_base::hlt_w)
{ {
hlt = state; hlt = bool(state);
} }
bool wd_fdc_device_base::enp_r() READ_LINE_MEMBER(wd_fdc_device_base::enp_r)
{ {
return enp; return enp;
} }

View File

@ -145,7 +145,7 @@ public:
void soft_reset(); void soft_reset();
void dden_w(bool dden); DECLARE_WRITE_LINE_MEMBER(dden_w);
void set_floppy(floppy_image_device *floppy); void set_floppy(floppy_image_device *floppy);
void set_force_ready(bool force_ready); void set_force_ready(bool force_ready);
void set_disable_motor_control(bool _disable_motor_control); void set_disable_motor_control(bool _disable_motor_control);
@ -175,13 +175,13 @@ public:
DECLARE_READ8_MEMBER( read ) { return gen_r(offset); } DECLARE_READ8_MEMBER( read ) { return gen_r(offset); }
DECLARE_WRITE8_MEMBER( write ) { gen_w(offset,data); } DECLARE_WRITE8_MEMBER( write ) { gen_w(offset,data); }
bool intrq_r(); DECLARE_READ_LINE_MEMBER(intrq_r);
bool drq_r(); DECLARE_READ_LINE_MEMBER(drq_r);
bool hld_r(); DECLARE_READ_LINE_MEMBER(hld_r);
void hlt_w(bool state); DECLARE_WRITE_LINE_MEMBER(hlt_w);
bool enp_r(); DECLARE_READ_LINE_MEMBER(enp_r);
void index_callback(floppy_image_device *floppy, int state); void index_callback(floppy_image_device *floppy, int state);