diff options
author | andreasnaive <andreasnaive@gmail.com> | 2019-03-25 23:13:40 +0100 |
---|---|---|
committer | andreasnaive <andreasnaive@gmail.com> | 2019-03-25 23:13:40 +0100 |
commit | b380514764cf857469bae61c11143a19f79a74c5 (patch) | |
tree | 63c8012e262618f08a332da31dd714281aa2c5ed /src/devices/machine/i8271.cpp | |
parent | c24473ddff715ecec2e258a6eb38960cf8c8e98e (diff) |
Revert "conflict resolution (nw)"
This reverts commit c24473ddff715ecec2e258a6eb38960cf8c8e98e, reversing
changes made to 009cba4fb8102102168ef32870892438327f3705.
Diffstat (limited to 'src/devices/machine/i8271.cpp')
-rw-r--r-- | src/devices/machine/i8271.cpp | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/src/devices/machine/i8271.cpp b/src/devices/machine/i8271.cpp index 1bac233f955..3a309c4ea16 100644 --- a/src/devices/machine/i8271.cpp +++ b/src/devices/machine/i8271.cpp @@ -132,7 +132,7 @@ void i8271_device::set_floppy(floppy_image_device *flop) flop->setup_index_pulse_cb(floppy_image_device::index_pulse_cb(&i8271_device::index_callback, this)); } -uint8_t i8271_device::sr_r() +READ8_MEMBER(i8271_device::sr_r) { uint32_t ret = (irq ? SR_IRQ : 0); switch(main_phase) { @@ -151,13 +151,11 @@ uint8_t i8271_device::sr_r() return ret; } -uint8_t i8271_device::rr_r() +READ8_MEMBER(i8271_device::rr_r) { - if (!machine().side_effects_disabled()) { - if (main_phase == PHASE_RESULT) - main_phase = PHASE_IDLE; - set_irq(false); - } + if(main_phase == PHASE_RESULT) + main_phase = PHASE_IDLE; + set_irq(false); return rr; } @@ -166,32 +164,31 @@ void i8271_device::set_rate(int rate) cur_rate = rate; } -uint8_t i8271_device::read(offs_t offset) +READ8_MEMBER(i8271_device::read) { switch(offset & 0x03) { - case 0x00: return sr_r(); - case 0x01: return rr_r(); + case 0x00: return sr_r(space, 0); + case 0x01: return rr_r(space, 0); } return 0xff; } -void i8271_device::write(offs_t offset, uint8_t data) +WRITE8_MEMBER(i8271_device::write) { switch(offset & 0x03) { - case 0x00: cmd_w(data); break; - case 0x01: param_w(data); break; - case 0x02: reset_w(data); break; + case 0x00: cmd_w(space, 0, data); break; + case 0x01: param_w(space, 0, data); break; + case 0x02: reset_w(space, 0, data); break; } } -uint8_t i8271_device::data_r() +READ8_MEMBER(i8271_device::data_r) { - if (!machine().side_effects_disabled()) - set_drq(false); + set_drq(false); return dma_data; } -void i8271_device::data_w(uint8_t data) +WRITE8_MEMBER(i8271_device::data_w) { if(drq) { set_drq(false); @@ -199,7 +196,7 @@ void i8271_device::data_w(uint8_t data) } } -void i8271_device::cmd_w(uint8_t data) +WRITE8_MEMBER(i8271_device::cmd_w) { if(main_phase == PHASE_IDLE) { command[0] = data; @@ -214,7 +211,7 @@ void i8271_device::cmd_w(uint8_t data) } } -void i8271_device::param_w(uint8_t data) +WRITE8_MEMBER(i8271_device::param_w) { if(main_phase == PHASE_CMD) { command[command_pos++] = data; |