summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author smf- <smf-@users.noreply.github.com>2018-02-24 01:26:43 +0000
committer smf- <smf-@users.noreply.github.com>2018-02-24 01:45:27 +0000
commita58e057b8df5f83879e2c0b7f305664a227e30f3 (patch)
treeb57147f982f9941625649aedc073adf6821b288f
parent9842fc438ad42cbd3f0d20350a4a951ac97f8be4 (diff)
z80: Change refresh callback to write8 [smf]
-rw-r--r--src/devices/bus/ieee488/hp9895.cpp4
-rw-r--r--src/devices/bus/ieee488/hp9895.h2
-rw-r--r--src/devices/cpu/z80/z80.cpp2
-rw-r--r--src/devices/cpu/z80/z80.h2
-rw-r--r--src/mame/drivers/zx.cpp2
-rw-r--r--src/mame/includes/zx.h2
-rw-r--r--src/mame/video/zx.cpp10
7 files changed, 12 insertions, 12 deletions
diff --git a/src/devices/bus/ieee488/hp9895.cpp b/src/devices/bus/ieee488/hp9895.cpp
index c7a3a9d603e..2e477775747 100644
--- a/src/devices/bus/ieee488/hp9895.cpp
+++ b/src/devices/bus/ieee488/hp9895.cpp
@@ -503,7 +503,7 @@ READ8_MEMBER(hp9895_device::phi_reg_r)
return (uint8_t)reg;
}
-WRITE16_MEMBER(hp9895_device::z80_m1_w)
+WRITE8_MEMBER(hp9895_device::z80_m1_w)
{
// Every M1 cycle of Z80 clears the IRQ line
if (m_cpu_irq) {
@@ -886,7 +886,7 @@ MACHINE_CONFIG_START(hp9895_device::device_add_mconfig)
MCFG_CPU_ADD("cpu" , Z80 , 4000000)
MCFG_CPU_PROGRAM_MAP(z80_program_map)
MCFG_CPU_IO_MAP(z80_io_map)
- MCFG_Z80_SET_REFRESH_CALLBACK(WRITE16(hp9895_device , z80_m1_w))
+ MCFG_Z80_SET_REFRESH_CALLBACK(WRITE8(hp9895_device , z80_m1_w))
MCFG_DEVICE_ADD("phi" , PHI , 0)
MCFG_PHI_EOI_WRITE_CB(WRITELINE(hp9895_device , phi_eoi_w))
diff --git a/src/devices/bus/ieee488/hp9895.h b/src/devices/bus/ieee488/hp9895.h
index 5d748878f87..60c41f63afd 100644
--- a/src/devices/bus/ieee488/hp9895.h
+++ b/src/devices/bus/ieee488/hp9895.h
@@ -65,7 +65,7 @@ private:
DECLARE_WRITE_LINE_MEMBER(phi_int_w);
// Z80 IRQ
- DECLARE_WRITE16_MEMBER(z80_m1_w);
+ DECLARE_WRITE8_MEMBER(z80_m1_w);
// Floppy interface
DECLARE_WRITE8_MEMBER(data_w);
diff --git a/src/devices/cpu/z80/z80.cpp b/src/devices/cpu/z80/z80.cpp
index 3b2fcd99761..b8b8bdcaeb8 100644
--- a/src/devices/cpu/z80/z80.cpp
+++ b/src/devices/cpu/z80/z80.cpp
@@ -481,7 +481,7 @@ inline uint8_t z80_device::rop()
PC++;
uint8_t res = m_decrypted_opcodes_direct->read_byte(pc);
m_icount -= 2;
- m_refresh_cb((m_i << 8) | (m_r2 & 0x80) | ((m_r-1) & 0x7f));
+ m_refresh_cb((m_i << 8) | (m_r2 & 0x80) | ((m_r-1) & 0x7f), 0x00, 0xff);
m_icount += 2;
return res;
}
diff --git a/src/devices/cpu/z80/z80.h b/src/devices/cpu/z80/z80.h
index 732e425fd86..19f89a3cc22 100644
--- a/src/devices/cpu/z80/z80.h
+++ b/src/devices/cpu/z80/z80.h
@@ -247,7 +247,7 @@ protected:
direct_read_data<0> *m_direct;
direct_read_data<0> *m_decrypted_opcodes_direct;
devcb_write_line m_irqack_cb;
- devcb_write16 m_refresh_cb;
+ devcb_write8 m_refresh_cb;
devcb_write_line m_halt_cb;
PAIR m_prvpc;
diff --git a/src/mame/drivers/zx.cpp b/src/mame/drivers/zx.cpp
index 4c3e72ea523..dccb0e973f9 100644
--- a/src/mame/drivers/zx.cpp
+++ b/src/mame/drivers/zx.cpp
@@ -324,7 +324,7 @@ MACHINE_CONFIG_START(zx_state::zx80)
MCFG_CPU_PROGRAM_MAP(zx80_map)
MCFG_CPU_IO_MAP(zx80_io_map)
MCFG_CPU_OPCODES_MAP(ula_map)
- MCFG_Z80_SET_REFRESH_CALLBACK(WRITE16(zx_state, refresh_w))
+ MCFG_Z80_SET_REFRESH_CALLBACK(WRITE8(zx_state, refresh_w))
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(XTAL(6'500'000)/2/64159.0) // 54223 for NTSC
diff --git a/src/mame/includes/zx.h b/src/mame/includes/zx.h
index e3646c362e4..8b3124af1e1 100644
--- a/src/mame/includes/zx.h
+++ b/src/mame/includes/zx.h
@@ -50,7 +50,7 @@ public:
DECLARE_READ8_MEMBER(ula_high_r);
DECLARE_READ8_MEMBER(ula_low_r);
- DECLARE_WRITE16_MEMBER(refresh_w);
+ DECLARE_WRITE8_MEMBER(refresh_w);
DECLARE_READ8_MEMBER(zx80_io_r);
DECLARE_READ8_MEMBER(zx81_io_r);
DECLARE_READ8_MEMBER(pc8300_io_r);
diff --git a/src/mame/video/zx.cpp b/src/mame/video/zx.cpp
index e9ff7a33c8b..3bbb09677d5 100644
--- a/src/mame/video/zx.cpp
+++ b/src/mame/video/zx.cpp
@@ -50,11 +50,11 @@ void zx_state::zx_ula_hsync()
recalc_hsync();
}
-WRITE16_MEMBER(zx_state::refresh_w)
+WRITE8_MEMBER(zx_state::refresh_w)
{
- if((data ^ m_prev_refresh) & 0x40)
- m_maincpu->set_input_line(INPUT_LINE_IRQ0, data & 0x40 ? CLEAR_LINE : ASSERT_LINE);
- m_prev_refresh = data;
+ if((offset ^ m_prev_refresh) & 0x40)
+ m_maincpu->set_input_line(INPUT_LINE_IRQ0, offset & 0x40 ? CLEAR_LINE : ASSERT_LINE);
+ m_prev_refresh = offset;
if(m_ula_char_buffer != 0xffff) {
uint64_t time = m_maincpu->total_cycles();
int x = 2*((time-m_base_vsync_clock) % 207);
@@ -63,7 +63,7 @@ WRITE16_MEMBER(zx_state::refresh_w)
if(m_region_gfx1)
pixels = m_region_gfx1->base()[((m_ula_char_buffer & 0x3f) << 3) | (m_ypos & 7)];
else
- pixels = m_program->read_byte((data & 0xfe00) | ((m_ula_char_buffer & 0x3f) << 3) | (m_ypos & 7));
+ pixels = m_program->read_byte((offset & 0xfe00) | ((m_ula_char_buffer & 0x3f) << 3) | (m_ypos & 7));
if(m_ula_char_buffer & 0x80)
pixels = ~pixels;
if(x < 384-8 && y < 311) {