diff options
author | Vas Crabb <vas@vastheman.com> | 2019-03-26 11:13:37 +1100 |
---|---|---|
committer | Vas Crabb <vas@vastheman.com> | 2019-03-26 11:13:37 +1100 |
commit | 97b67170277437131adf6ed4d60139c172529e4f (patch) | |
tree | 7a5cbf608f191075f1612b1af15832c206a3fe2d /src/devices/machine/i8271.cpp | |
parent | b380514764cf857469bae61c11143a19f79a74c5 (diff) |
(nw) Clean up the mess on master
This effectively reverts b380514764cf857469bae61c11143a19f79a74c5 and
c24473ddff715ecec2e258a6eb38960cf8c8e98e, restoring the state at
598cd5227223c3b04ca31f0dbc1981256d9ea3ff.
Before pushing, please check that what you're about to push is sane.
Check your local commit log and ensure there isn't anything out-of-place
before pushing to mainline. When things like this happen, it wastes
everyone's time. I really don't need this in a week when real work⢠is
busting my balls and I'm behind where I want to be with preparing for
MAME release.
Diffstat (limited to 'src/devices/machine/i8271.cpp')
-rw-r--r-- | src/devices/machine/i8271.cpp | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/src/devices/machine/i8271.cpp b/src/devices/machine/i8271.cpp index 3a309c4ea16..1bac233f955 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)); } -READ8_MEMBER(i8271_device::sr_r) +uint8_t i8271_device::sr_r() { uint32_t ret = (irq ? SR_IRQ : 0); switch(main_phase) { @@ -151,11 +151,13 @@ READ8_MEMBER(i8271_device::sr_r) return ret; } -READ8_MEMBER(i8271_device::rr_r) +uint8_t i8271_device::rr_r() { - if(main_phase == PHASE_RESULT) - main_phase = PHASE_IDLE; - set_irq(false); + if (!machine().side_effects_disabled()) { + if (main_phase == PHASE_RESULT) + main_phase = PHASE_IDLE; + set_irq(false); + } return rr; } @@ -164,31 +166,32 @@ void i8271_device::set_rate(int rate) cur_rate = rate; } -READ8_MEMBER(i8271_device::read) +uint8_t i8271_device::read(offs_t offset) { switch(offset & 0x03) { - case 0x00: return sr_r(space, 0); - case 0x01: return rr_r(space, 0); + case 0x00: return sr_r(); + case 0x01: return rr_r(); } return 0xff; } -WRITE8_MEMBER(i8271_device::write) +void i8271_device::write(offs_t offset, uint8_t data) { switch(offset & 0x03) { - case 0x00: cmd_w(space, 0, data); break; - case 0x01: param_w(space, 0, data); break; - case 0x02: reset_w(space, 0, data); break; + case 0x00: cmd_w(data); break; + case 0x01: param_w(data); break; + case 0x02: reset_w(data); break; } } -READ8_MEMBER(i8271_device::data_r) +uint8_t i8271_device::data_r() { - set_drq(false); + if (!machine().side_effects_disabled()) + set_drq(false); return dma_data; } -WRITE8_MEMBER(i8271_device::data_w) +void i8271_device::data_w(uint8_t data) { if(drq) { set_drq(false); @@ -196,7 +199,7 @@ WRITE8_MEMBER(i8271_device::data_w) } } -WRITE8_MEMBER(i8271_device::cmd_w) +void i8271_device::cmd_w(uint8_t data) { if(main_phase == PHASE_IDLE) { command[0] = data; @@ -211,7 +214,7 @@ WRITE8_MEMBER(i8271_device::cmd_w) } } -WRITE8_MEMBER(i8271_device::param_w) +void i8271_device::param_w(uint8_t data) { if(main_phase == PHASE_CMD) { command[command_pos++] = data; |