summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar AJR <ajrhacker@users.noreply.github.com>2019-02-19 13:55:56 -0500
committerGravatarGravatar AJR <ajrhacker@users.noreply.github.com>2019-02-19 13:55:56 -0500
commita9f1509511c061ef6fee02790da262e68fde06bd (patch) (github)
treecca428bf024bee0373666e20068070f5a90b9ca5
parent48563c34f26532a10b2b8030997ab37b0d9760a4 (diff)
downloadmame-a9f1509511c061ef6fee02790da262e68fde06bd.tar.bz2
mame-a9f1509511c061ef6fee02790da262e68fde06bd.zip
bus/newbrain, bus/tiki100, wd2010: Simplify read/write handlers (nw)
-rw-r--r--src/devices/bus/isa/p1_hdc.cpp4
-rw-r--r--src/devices/bus/newbrain/eim.cpp16
-rw-r--r--src/devices/bus/newbrain/eim.h8
-rw-r--r--src/devices/bus/newbrain/exp.cpp16
-rw-r--r--src/devices/bus/newbrain/exp.h16
-rw-r--r--src/devices/bus/newbrain/fdc.cpp24
-rw-r--r--src/devices/bus/newbrain/fdc.h14
-rw-r--r--src/devices/bus/tiki100/8088.cpp4
-rw-r--r--src/devices/bus/tiki100/8088.h4
-rw-r--r--src/devices/bus/tiki100/exp.cpp16
-rw-r--r--src/devices/bus/tiki100/exp.h20
-rw-r--r--src/devices/bus/tiki100/hdc.cpp8
-rw-r--r--src/devices/bus/tiki100/hdc.h4
-rw-r--r--src/devices/machine/wd2010.cpp4
-rw-r--r--src/devices/machine/wd2010.h4
-rw-r--r--src/mame/drivers/newbrain.cpp8
-rw-r--r--src/mame/drivers/ngen.cpp4
-rw-r--r--src/mame/drivers/rainbow.cpp28
-rw-r--r--src/mame/drivers/tiki100.cpp8
19 files changed, 105 insertions, 105 deletions
diff --git a/src/devices/bus/isa/p1_hdc.cpp b/src/devices/bus/isa/p1_hdc.cpp
index 53eb614ee21..129c7a6ce37 100644
--- a/src/devices/bus/isa/p1_hdc.cpp
+++ b/src/devices/bus/isa/p1_hdc.cpp
@@ -89,7 +89,7 @@ READ8_MEMBER(p1_hdc_device::p1_HDC_r)
switch (offset >> 8)
{
case 8:
- data = m_hdc->read(space, offset & 255);
+ data = m_hdc->read(offset & 255);
}
LOG("hdc R $%04x == $%02x\n", offset, data);
@@ -103,7 +103,7 @@ WRITE8_MEMBER(p1_hdc_device::p1_HDC_w)
switch (offset >> 8)
{
case 8:
- m_hdc->write(space, offset & 255, data, 0);
+ m_hdc->write(offset & 255, data);
}
}
diff --git a/src/devices/bus/newbrain/eim.cpp b/src/devices/bus/newbrain/eim.cpp
index f28b2af5360..3f0b7a19ee0 100644
--- a/src/devices/bus/newbrain/eim.cpp
+++ b/src/devices/bus/newbrain/eim.cpp
@@ -145,9 +145,9 @@ void newbrain_eim_device::device_reset()
// mreq_r - memory request read
//-------------------------------------------------
-uint8_t newbrain_eim_device::mreq_r(address_space &space, offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh)
+uint8_t newbrain_eim_device::mreq_r(offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh)
{
- return m_exp->mreq_r(space, offset, data, romov, exrm, raminh);
+ return m_exp->mreq_r(offset, data, romov, exrm, raminh);
}
@@ -155,9 +155,9 @@ uint8_t newbrain_eim_device::mreq_r(address_space &space, offs_t offset, uint8_t
// mreq_w - memory request write
//-------------------------------------------------
-void newbrain_eim_device::mreq_w(address_space &space, offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh)
+void newbrain_eim_device::mreq_w(offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh)
{
- m_exp->mreq_w(space, offset, data, romov, exrm, raminh);
+ m_exp->mreq_w(offset, data, romov, exrm, raminh);
}
@@ -165,9 +165,9 @@ void newbrain_eim_device::mreq_w(address_space &space, offs_t offset, uint8_t da
// iorq_r - I/O request read
//-------------------------------------------------
-uint8_t newbrain_eim_device::iorq_r(address_space &space, offs_t offset, uint8_t data, bool &prtov)
+uint8_t newbrain_eim_device::iorq_r(offs_t offset, uint8_t data, bool &prtov)
{
- return m_exp->iorq_r(space, offset, data, prtov);
+ return m_exp->iorq_r(offset, data, prtov);
}
@@ -175,9 +175,9 @@ uint8_t newbrain_eim_device::iorq_r(address_space &space, offs_t offset, uint8_t
// iorq_w - I/O request write
//-------------------------------------------------
-void newbrain_eim_device::iorq_w(address_space &space, offs_t offset, uint8_t data, bool &prtov)
+void newbrain_eim_device::iorq_w(offs_t offset, uint8_t data, bool &prtov)
{
- m_exp->iorq_w(space, offset, data, prtov);
+ m_exp->iorq_w(offset, data, prtov);
}
diff --git a/src/devices/bus/newbrain/eim.h b/src/devices/bus/newbrain/eim.h
index 3e83b22112e..19b456338fd 100644
--- a/src/devices/bus/newbrain/eim.h
+++ b/src/devices/bus/newbrain/eim.h
@@ -48,10 +48,10 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
// device_newbrain_expansion_slot_interface overrides
- virtual uint8_t mreq_r(address_space &space, offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh) override;
- virtual void mreq_w(address_space &space, offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh) override;
- virtual uint8_t iorq_r(address_space &space, offs_t offset, uint8_t data, bool &prtov) override;
- virtual void iorq_w(address_space &space, offs_t offset, uint8_t data, bool &prtov) override;
+ virtual uint8_t mreq_r(offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh) override;
+ virtual void mreq_w(offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh) override;
+ virtual uint8_t iorq_r(offs_t offset, uint8_t data, bool &prtov) override;
+ virtual void iorq_w(offs_t offset, uint8_t data, bool &prtov) override;
private:
DECLARE_WRITE_LINE_MEMBER( acia_interrupt );
diff --git a/src/devices/bus/newbrain/exp.cpp b/src/devices/bus/newbrain/exp.cpp
index b4675c3b89f..a1a9e2210ed 100644
--- a/src/devices/bus/newbrain/exp.cpp
+++ b/src/devices/bus/newbrain/exp.cpp
@@ -77,11 +77,11 @@ void newbrain_expansion_slot_device::device_reset()
// mreq_r - memory request read
//-------------------------------------------------
-uint8_t newbrain_expansion_slot_device::mreq_r(address_space &space, offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh)
+uint8_t newbrain_expansion_slot_device::mreq_r(offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh)
{
if (m_card != nullptr)
{
- data = m_card->mreq_r(space, offset, data, romov, exrm, raminh);
+ data = m_card->mreq_r(offset, data, romov, exrm, raminh);
}
return data;
@@ -92,11 +92,11 @@ uint8_t newbrain_expansion_slot_device::mreq_r(address_space &space, offs_t offs
// mreq_w - memory request write
//-------------------------------------------------
-void newbrain_expansion_slot_device::mreq_w(address_space &space, offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh)
+void newbrain_expansion_slot_device::mreq_w(offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh)
{
if (m_card != nullptr)
{
- m_card->mreq_w(space, offset, data, romov, exrm, raminh);
+ m_card->mreq_w(offset, data, romov, exrm, raminh);
}
}
@@ -105,11 +105,11 @@ void newbrain_expansion_slot_device::mreq_w(address_space &space, offs_t offset,
// iorq_r - I/O request read
//-------------------------------------------------
-uint8_t newbrain_expansion_slot_device::iorq_r(address_space &space, offs_t offset, uint8_t data, bool &prtov)
+uint8_t newbrain_expansion_slot_device::iorq_r(offs_t offset, uint8_t data, bool &prtov)
{
if (m_card != nullptr)
{
- data = m_card->iorq_r(space, offset, data, prtov);
+ data = m_card->iorq_r(offset, data, prtov);
}
return data;
@@ -120,11 +120,11 @@ uint8_t newbrain_expansion_slot_device::iorq_r(address_space &space, offs_t offs
// iorq_w - I/O request write
//-------------------------------------------------
-void newbrain_expansion_slot_device::iorq_w(address_space &space, offs_t offset, uint8_t data, bool &prtov)
+void newbrain_expansion_slot_device::iorq_w(offs_t offset, uint8_t data, bool &prtov)
{
if (m_card != nullptr)
{
- m_card->iorq_w(space, offset, data, prtov);
+ m_card->iorq_w(offset, data, prtov);
}
}
diff --git a/src/devices/bus/newbrain/exp.h b/src/devices/bus/newbrain/exp.h
index 26655d76410..e9e56c1bd66 100644
--- a/src/devices/bus/newbrain/exp.h
+++ b/src/devices/bus/newbrain/exp.h
@@ -75,11 +75,11 @@ public:
newbrain_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// computer interface
- uint8_t mreq_r(address_space &space, offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh);
- void mreq_w(address_space &space, offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh);
+ uint8_t mreq_r(offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh);
+ void mreq_w(offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh);
- uint8_t iorq_r(address_space &space, offs_t offset, uint8_t data, bool &prtov);
- void iorq_w(address_space &space, offs_t offset, uint8_t data, bool &prtov);
+ uint8_t iorq_r(offs_t offset, uint8_t data, bool &prtov);
+ void iorq_w(offs_t offset, uint8_t data, bool &prtov);
protected:
// device-level overrides
@@ -97,12 +97,12 @@ class device_newbrain_expansion_slot_interface : public device_slot_card_interfa
{
public:
// memory access
- virtual uint8_t mreq_r(address_space &space, offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh) { return data; }
- virtual void mreq_w(address_space &space, offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh) { }
+ virtual uint8_t mreq_r(offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh) { return data; }
+ virtual void mreq_w(offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh) { }
// I/O access
- virtual uint8_t iorq_r(address_space &space, offs_t offset, uint8_t data, bool &prtov) { return data; }
- virtual void iorq_w(address_space &space, offs_t offset, uint8_t data, bool &prtov) { }
+ virtual uint8_t iorq_r(offs_t offset, uint8_t data, bool &prtov) { return data; }
+ virtual void iorq_w(offs_t offset, uint8_t data, bool &prtov) { }
protected:
// construction/destruction
diff --git a/src/devices/bus/newbrain/fdc.cpp b/src/devices/bus/newbrain/fdc.cpp
index 238109153e5..7cadbd0bddd 100644
--- a/src/devices/bus/newbrain/fdc.cpp
+++ b/src/devices/bus/newbrain/fdc.cpp
@@ -177,9 +177,9 @@ void newbrain_fdc_device::device_reset()
// mreq_r - memory request read
//-------------------------------------------------
-uint8_t newbrain_fdc_device::mreq_r(address_space &space, offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh)
+uint8_t newbrain_fdc_device::mreq_r(offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh)
{
- return m_exp->mreq_r(space, offset, data, romov, exrm, raminh);
+ return m_exp->mreq_r(offset, data, romov, exrm, raminh);
}
@@ -187,9 +187,9 @@ uint8_t newbrain_fdc_device::mreq_r(address_space &space, offs_t offset, uint8_t
// mreq_w - memory request write
//-------------------------------------------------
-void newbrain_fdc_device::mreq_w(address_space &space, offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh)
+void newbrain_fdc_device::mreq_w(offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh)
{
- m_exp->mreq_w(space, offset, data, romov, exrm, raminh);
+ m_exp->mreq_w(offset, data, romov, exrm, raminh);
}
@@ -197,9 +197,9 @@ void newbrain_fdc_device::mreq_w(address_space &space, offs_t offset, uint8_t da
// iorq_r - I/O request read
//-------------------------------------------------
-uint8_t newbrain_fdc_device::iorq_r(address_space &space, offs_t offset, uint8_t data, bool &prtov)
+uint8_t newbrain_fdc_device::iorq_r(offs_t offset, uint8_t data, bool &prtov)
{
- return m_exp->iorq_r(space, offset, data, prtov);
+ return m_exp->iorq_r(offset, data, prtov);
}
@@ -207,13 +207,13 @@ uint8_t newbrain_fdc_device::iorq_r(address_space &space, offs_t offset, uint8_t
// iorq_w - I/O request write
//-------------------------------------------------
-void newbrain_fdc_device::iorq_w(address_space &space, offs_t offset, uint8_t data, bool &prtov)
+void newbrain_fdc_device::iorq_w(offs_t offset, uint8_t data, bool &prtov)
{
- m_exp->iorq_w(space, offset, data, prtov);
+ m_exp->iorq_w(offset, data, prtov);
if ((offset & 0x20f) == 0x20f)
{
- io_dec_w(space, 0, data);
+ io_dec_w(data);
}
}
@@ -245,7 +245,7 @@ WRITE_LINE_MEMBER( newbrain_fdc_device::fdc_int_w )
// fdc_auxiliary_w -
//-------------------------------------------------
-WRITE8_MEMBER( newbrain_fdc_device::fdc_auxiliary_w )
+void newbrain_fdc_device::fdc_auxiliary_w(uint8_t data)
{
/*
@@ -279,7 +279,7 @@ WRITE8_MEMBER( newbrain_fdc_device::fdc_auxiliary_w )
// fdc_control_r -
//-------------------------------------------------
-READ8_MEMBER( newbrain_fdc_device::fdc_control_r )
+uint8_t newbrain_fdc_device::fdc_control_r()
{
/*
@@ -304,7 +304,7 @@ READ8_MEMBER( newbrain_fdc_device::fdc_control_r )
// io_dec_w - 0x20f
//-------------------------------------------------
-WRITE8_MEMBER( newbrain_fdc_device::io_dec_w )
+void newbrain_fdc_device::io_dec_w(uint8_t data)
{
/*
diff --git a/src/devices/bus/newbrain/fdc.h b/src/devices/bus/newbrain/fdc.h
index e5a40ae0748..e5d6665a078 100644
--- a/src/devices/bus/newbrain/fdc.h
+++ b/src/devices/bus/newbrain/fdc.h
@@ -40,17 +40,17 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
// device_newbrain_expansion_slot_interface overrides
- virtual uint8_t mreq_r(address_space &space, offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh) override;
- virtual void mreq_w(address_space &space, offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh) override;
- virtual uint8_t iorq_r(address_space &space, offs_t offset, uint8_t data, bool &prtov) override;
- virtual void iorq_w(address_space &space, offs_t offset, uint8_t data, bool &prtov) override;
+ virtual uint8_t mreq_r(offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh) override;
+ virtual void mreq_w(offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh) override;
+ virtual uint8_t iorq_r(offs_t offset, uint8_t data, bool &prtov) override;
+ virtual void iorq_w(offs_t offset, uint8_t data, bool &prtov) override;
private:
DECLARE_WRITE_LINE_MEMBER( fdc_int_w );
- DECLARE_WRITE8_MEMBER( fdc_auxiliary_w );
- DECLARE_READ8_MEMBER( fdc_control_r );
- DECLARE_WRITE8_MEMBER( io_dec_w );
+ void fdc_auxiliary_w(uint8_t data);
+ uint8_t fdc_control_r();
+ void io_dec_w(uint8_t data);
void newbrain_fdc_io(address_map &map);
void newbrain_fdc_mem(address_map &map);
diff --git a/src/devices/bus/tiki100/8088.cpp b/src/devices/bus/tiki100/8088.cpp
index 99d9511c5ce..0a940fcbc2c 100644
--- a/src/devices/bus/tiki100/8088.cpp
+++ b/src/devices/bus/tiki100/8088.cpp
@@ -118,7 +118,7 @@ void tiki100_8088_device::device_reset()
// tiki100bus_iorq_r - I/O read
//-------------------------------------------------
-uint8_t tiki100_8088_device::iorq_r(address_space &space, offs_t offset, uint8_t data)
+uint8_t tiki100_8088_device::iorq_r(offs_t offset, uint8_t data)
{
if ((offset & 0xff) == 0x7f)
{
@@ -133,7 +133,7 @@ uint8_t tiki100_8088_device::iorq_r(address_space &space, offs_t offset, uint8_t
// tiki100bus_iorq_w - I/O write
//-------------------------------------------------
-void tiki100_8088_device::iorq_w(address_space &space, offs_t offset, uint8_t data)
+void tiki100_8088_device::iorq_w(offs_t offset, uint8_t data)
{
if ((offset & 0xff) == 0x7f)
{
diff --git a/src/devices/bus/tiki100/8088.h b/src/devices/bus/tiki100/8088.h
index c9fcca86807..2e4e6966172 100644
--- a/src/devices/bus/tiki100/8088.h
+++ b/src/devices/bus/tiki100/8088.h
@@ -37,8 +37,8 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
// device_tiki100bus_card_interface overrides
- virtual uint8_t iorq_r(address_space &space, offs_t offset, uint8_t data) override;
- virtual void iorq_w(address_space &space, offs_t offset, uint8_t data) override;
+ virtual uint8_t iorq_r(offs_t offset, uint8_t data) override;
+ virtual void iorq_w(offs_t offset, uint8_t data) override;
private:
required_device<i8088_cpu_device> m_maincpu;
diff --git a/src/devices/bus/tiki100/exp.cpp b/src/devices/bus/tiki100/exp.cpp
index 95aff70d106..2d3dfc22031 100644
--- a/src/devices/bus/tiki100/exp.cpp
+++ b/src/devices/bus/tiki100/exp.cpp
@@ -99,13 +99,13 @@ void tiki100_bus_device::add_card(device_tiki100bus_card_interface *card)
// mrq_r - memory read
//-------------------------------------------------
-uint8_t tiki100_bus_device::mrq_r(address_space &space, offs_t offset, uint8_t data, bool &mdis)
+uint8_t tiki100_bus_device::mrq_r(offs_t offset, uint8_t data, bool &mdis)
{
device_tiki100bus_card_interface *entry = m_device_list.first();
while (entry)
{
- data &= entry->mrq_r(space, offset, data, mdis);
+ data &= entry->mrq_r(offset, data, mdis);
entry = entry->next();
}
@@ -117,13 +117,13 @@ uint8_t tiki100_bus_device::mrq_r(address_space &space, offs_t offset, uint8_t d
// mrq_w - memory write
//-------------------------------------------------
-WRITE8_MEMBER( tiki100_bus_device::mrq_w )
+void tiki100_bus_device::mrq_w(offs_t offset, uint8_t data)
{
device_tiki100bus_card_interface *entry = m_device_list.first();
while (entry)
{
- entry->mrq_w(space, offset, data);
+ entry->mrq_w(offset, data);
entry = entry->next();
}
}
@@ -133,13 +133,13 @@ WRITE8_MEMBER( tiki100_bus_device::mrq_w )
// iorq_r - I/O read
//-------------------------------------------------
-uint8_t tiki100_bus_device::iorq_r(address_space &space, offs_t offset, uint8_t data)
+uint8_t tiki100_bus_device::iorq_r(offs_t offset, uint8_t data)
{
device_tiki100bus_card_interface *entry = m_device_list.first();
while (entry)
{
- data &= entry->iorq_r(space, offset, data);
+ data &= entry->iorq_r(offset, data);
entry = entry->next();
}
@@ -151,13 +151,13 @@ uint8_t tiki100_bus_device::iorq_r(address_space &space, offs_t offset, uint8_t
// iorq_w - I/O write
//-------------------------------------------------
-WRITE8_MEMBER( tiki100_bus_device::iorq_w )
+void tiki100_bus_device::iorq_w(offs_t offset, uint8_t data)
{
device_tiki100bus_card_interface *entry = m_device_list.first();
while (entry)
{
- entry->iorq_w(space, offset, data);
+ entry->iorq_w(offset, data);
entry = entry->next();
}
}
diff --git a/src/devices/bus/tiki100/exp.h b/src/devices/bus/tiki100/exp.h
index a36e0ac3419..9b0375daaa9 100644
--- a/src/devices/bus/tiki100/exp.h
+++ b/src/devices/bus/tiki100/exp.h
@@ -46,12 +46,12 @@ public:
device_tiki100bus_card_interface *next() const { return m_next; }
// memory access
- virtual uint8_t mrq_r(address_space &space, offs_t offset, uint8_t data, bool &mdis) { mdis = 1; return data; }
- virtual void mrq_w(address_space &space, offs_t offset, uint8_t data) { }
+ virtual uint8_t mrq_r(offs_t offset, uint8_t data, bool &mdis) { mdis = 1; return data; }
+ virtual void mrq_w(offs_t offset, uint8_t data) { }
// I/O access
- virtual uint8_t iorq_r(address_space &space, offs_t offset, uint8_t data) { return data; }
- virtual void iorq_w(address_space &space, offs_t offset, uint8_t data) { }
+ virtual uint8_t iorq_r(offs_t offset, uint8_t data) { return data; }
+ virtual void iorq_w(offs_t offset, uint8_t data) { }
virtual void busak_w(int state) { m_busak = state; }
@@ -131,11 +131,11 @@ public:
void add_card(device_tiki100bus_card_interface *card);
// computer interface
- uint8_t mrq_r(address_space &space, offs_t offset, uint8_t data, bool &mdis);
- DECLARE_WRITE8_MEMBER( mrq_w );
+ uint8_t mrq_r(offs_t offset, uint8_t data, bool &mdis);
+ void mrq_w(offs_t offset, uint8_t data);
- uint8_t iorq_r(address_space &space, offs_t offset, uint8_t data);
- DECLARE_WRITE8_MEMBER( iorq_w );
+ uint8_t iorq_r(offs_t offset, uint8_t data);
+ void iorq_w(offs_t offset, uint8_t data);
DECLARE_WRITE_LINE_MEMBER( busak_w );
@@ -143,8 +143,8 @@ public:
DECLARE_WRITE_LINE_MEMBER( irq_w ) { m_irq_cb(state); }
DECLARE_WRITE_LINE_MEMBER( nmi_w ) { m_nmi_cb(state); }
DECLARE_WRITE_LINE_MEMBER( busrq_w ) { m_busrq_cb(state); }
- DECLARE_READ8_MEMBER( exin_mrq_r ) { return m_in_mrq_cb(offset); }
- DECLARE_WRITE8_MEMBER( exin_mrq_w ) { m_out_mrq_cb(offset, data); }
+ uint8_t exin_mrq_r(offs_t offset) { return m_in_mrq_cb(offset); }
+ void exin_mrq_w(offs_t offset, uint8_t data) { m_out_mrq_cb(offset, data); }
protected:
// device-level overrides
diff --git a/src/devices/bus/tiki100/hdc.cpp b/src/devices/bus/tiki100/hdc.cpp
index 9a997119935..a351d83daca 100644
--- a/src/devices/bus/tiki100/hdc.cpp
+++ b/src/devices/bus/tiki100/hdc.cpp
@@ -85,11 +85,11 @@ void tiki100_hdc_device::device_reset()
// tiki100bus_iorq_r - I/O read
//-------------------------------------------------
-uint8_t tiki100_hdc_device::iorq_r(address_space &space, offs_t offset, uint8_t data)
+uint8_t tiki100_hdc_device::iorq_r(offs_t offset, uint8_t data)
{
if ((offset & 0xf8) == 0x20)
{
- data = m_hdc->read(space, offset & 0x07);
+ data = m_hdc->read(offset & 0x07);
}
return data;
@@ -100,10 +100,10 @@ uint8_t tiki100_hdc_device::iorq_r(address_space &space, offs_t offset, uint8_t
// tiki100bus_iorq_w - I/O write
//-------------------------------------------------
-void tiki100_hdc_device::iorq_w(address_space &space, offs_t offset, uint8_t data)
+void tiki100_hdc_device::iorq_w(offs_t offset, uint8_t data)
{
if ((offset & 0xf8) == 0x20)
{
- m_hdc->write(space, offset, data);
+ m_hdc->write(offset, data);
}
}
diff --git a/src/devices/bus/tiki100/hdc.h b/src/devices/bus/tiki100/hdc.h
index 1c0447acff5..d38927ff004 100644
--- a/src/devices/bus/tiki100/hdc.h
+++ b/src/devices/bus/tiki100/hdc.h
@@ -36,8 +36,8 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
// device_tiki100bus_card_interface overrides
- virtual uint8_t iorq_r(address_space &space, offs_t offset, uint8_t data) override;
- virtual void iorq_w(address_space &space, offs_t offset, uint8_t data) override;
+ virtual uint8_t iorq_r(offs_t offset, uint8_t data) override;
+ virtual void iorq_w(offs_t offset, uint8_t data) override;
private:
required_device<wd2010_device> m_hdc;
diff --git a/src/devices/machine/wd2010.cpp b/src/devices/machine/wd2010.cpp
index 59dfd16128d..95bb4803107 100644
--- a/src/devices/machine/wd2010.cpp
+++ b/src/devices/machine/wd2010.cpp
@@ -233,7 +233,7 @@ void wd2010_device::device_reset()
// read -
//-------------------------------------------------
-READ8_MEMBER(wd2010_device::read)
+uint8_t wd2010_device::read(offs_t offset)
{
uint8_t data;
@@ -273,7 +273,7 @@ READ8_MEMBER(wd2010_device::read)
// write -
//-------------------------------------------------
-WRITE8_MEMBER(wd2010_device::write)
+void wd2010_device::write(offs_t offset, uint8_t data)
{
m_task_file[offset] = data;
diff --git a/src/devices/machine/wd2010.h b/src/devices/machine/wd2010.h
index fdfc2c4462c..1617f886ed6 100644
--- a/src/devices/machine/wd2010.h
+++ b/src/devices/machine/wd2010.h
@@ -40,8 +40,8 @@ public:
auto in_tk000_callback() { return m_in_tk000_cb.bind(); }
auto in_sc_callback() { return m_in_sc_cb.bind(); }
- DECLARE_READ8_MEMBER( read );
- DECLARE_WRITE8_MEMBER( write );
+ uint8_t read(offs_t offset);
+ void write(offs_t offset, uint8_t data);
void buffer_ready(bool state);
diff --git a/src/mame/drivers/newbrain.cpp b/src/mame/drivers/newbrain.cpp
index 3147c460c3d..86facbb1a04 100644
--- a/src/mame/drivers/newbrain.cpp
+++ b/src/mame/drivers/newbrain.cpp
@@ -92,7 +92,7 @@ READ8_MEMBER( newbrain_state::mreq_r )
{
bool romov = 1, raminh = 0;
int exrm = 0;
- uint8_t data = m_exp->mreq_r(space, offset, 0xff, romov, exrm, raminh);
+ uint8_t data = m_exp->mreq_r(offset, 0xff, romov, exrm, raminh);
int rom0 = 1, rom1 = 1, rom2 = 1;
int a15_14_13 = romov ? (offset >> 13) : exrm;
@@ -138,7 +138,7 @@ WRITE8_MEMBER( newbrain_state::mreq_w )
{
bool romov = 1, raminh = 0;
int exrm = 0;
- m_exp->mreq_w(space, offset, data, romov, exrm, raminh);
+ m_exp->mreq_w(offset, data, romov, exrm, raminh);
int a15_14_13 = romov ? (offset >> 13) : exrm;
if (!m_pwrup) a15_14_13 = 7;
@@ -158,7 +158,7 @@ WRITE8_MEMBER( newbrain_state::mreq_w )
READ8_MEMBER( newbrain_state::iorq_r )
{
bool prtov = 0;
- uint8_t data = m_exp->iorq_r(space, offset, 0xff, prtov);
+ uint8_t data = m_exp->iorq_r(offset, 0xff, prtov);
if (!prtov)
{
@@ -201,7 +201,7 @@ READ8_MEMBER( newbrain_state::iorq_r )
WRITE8_MEMBER( newbrain_state::iorq_w )
{
bool prtov = 0;
- m_exp->iorq_w(space, offset, 0xff, prtov);
+ m_exp->iorq_w(offset, 0xff, prtov);
if (!prtov)
{
diff --git a/src/mame/drivers/ngen.cpp b/src/mame/drivers/ngen.cpp
index d3f720895d4..07dae5737e0 100644
--- a/src/mame/drivers/ngen.cpp
+++ b/src/mame/drivers/ngen.cpp
@@ -534,7 +534,7 @@ WRITE16_MEMBER(ngen_state::hfd_w)
case 0x16:
case 0x17:
if(ACCESSING_BITS_0_7)
- m_hdc->write(space,offset-0x10,data & 0xff);
+ m_hdc->write(offset-0x10,data & 0xff);
logerror("WD1010 register %i write %02x mask %04x\n",offset-0x10,data & 0xff,mem_mask);
break;
case 0x18:
@@ -583,7 +583,7 @@ READ16_MEMBER(ngen_state::hfd_r)
case 0x16:
case 0x17:
if(ACCESSING_BITS_0_7)
- ret = m_hdc->read(space,offset-0x10);
+ ret = m_hdc->read(offset-0x10);
logerror("WD1010 register %i read, mask %04x\n",offset-0x10,mem_mask);
break;
case 0x18:
diff --git a/src/mame/drivers/rainbow.cpp b/src/mame/drivers/rainbow.cpp
index 3b3e769e4c1..e48152c5f13 100644
--- a/src/mame/drivers/rainbow.cpp
+++ b/src/mame/drivers/rainbow.cpp
@@ -1741,7 +1741,7 @@ WRITE_LINE_MEMBER(rainbow_state::hdc_read_sector)
if (!m_hdc_write_gate) // do not read when WRITE GATE is on
{
- uint8_t sdh = (m_hdc->read(generic_space(), 0x06));
+ uint8_t sdh = (m_hdc->read(0x06));
int drv = (sdh & (8 + 16)) >> 3; // get DRIVE from SDH register
if ((state == 0) && (last_state == 1) && (drv == 0))
@@ -1750,9 +1750,9 @@ WRITE_LINE_MEMBER(rainbow_state::hdc_read_sector)
output().set_value("led1", 0);
switch_off_timer->adjust(attotime::from_msec(500));
- int hi = (m_hdc->read(generic_space(), 0x05)) & 0x07;
- uint16_t cylinder = (m_hdc->read(generic_space(), 0x04)) | (hi << 8);
- uint8_t sector_number = m_hdc->read(generic_space(), 0x03);
+ int hi = (m_hdc->read(0x05)) & 0x07;
+ uint16_t cylinder = (m_hdc->read(0x04)) | (hi << 8);
+ uint8_t sector_number = m_hdc->read(0x03);
hard_disk_file *local_hard_disk;
local_hard_disk = rainbow_hdc_file(0); // one hard disk for now.
@@ -1812,7 +1812,7 @@ WRITE_LINE_MEMBER(rainbow_state::hdc_write_sector)
else
m_hdc_write_gate = true;
- int drv = ((m_hdc->read(generic_space(), 0x06)) & (8 + 16)) >> 3; // get DRIVE from SDH register
+ int drv = ((m_hdc->read(0x06)) & (8 + 16)) >> 3; // get DRIVE from SDH register
if (state == 0 && wg_last == 1 && drv == 0) // Check correct state transition and DRIVE 0 ....
{
@@ -1866,13 +1866,13 @@ int rainbow_state::do_write_sector()
feedback = 10;
output().set_value("led1", 1); // OFF
- uint8_t sdh = (m_hdc->read(generic_space(), 0x06));
+ uint8_t sdh = (m_hdc->read(0x06));
- int hi = (m_hdc->read(generic_space(), 0x05)) & 0x07;
- uint16_t cylinder = (m_hdc->read(generic_space(), 0x04)) | (hi << 8);
+ int hi = (m_hdc->read(0x05)) & 0x07;
+ uint16_t cylinder = (m_hdc->read(0x04)) | (hi << 8);
- int sector_number = m_hdc->read(generic_space(), 0x03);
- int sector_count = m_hdc->read(generic_space(), 0x02); // (1 = single sector)
+ int sector_number = m_hdc->read(0x03);
+ int sector_count = m_hdc->read(0x02); // (1 = single sector)
if (!(cylinder <= info->cylinders && // filter invalid cylinders
SECTOR_SIZES[(sdh >> 5) & 0x03] == info->sectorbytes // 512, may not vary
@@ -1943,7 +1943,7 @@ READ8_MEMBER(rainbow_state::hd_status_68_r)
data = 0xa0; // A0 : OK, DRIVE IS READY (!)
int my_offset = 0x07;
- int stat = m_hdc->read(space, my_offset);
+ int stat = m_hdc->read(my_offset);
// logerror("(x68) WD1010 register %04x (STATUS) read, result : %04x\n", my_offset, stat);
// NOTE: SEEK COMPLETE IS CURRENTLY HARD WIRED / NOT FULLY EMULATED -
@@ -2043,14 +2043,14 @@ positioned over cylinder 0 (the data track furthest away from the spindle).
*/
READ8_MEMBER(rainbow_state::hd_status_69_r)
{
- int hs = m_hdc->read(space, 0x06) & (1 + 2 + 4); // SDH bits 0-2 = HEAD #
+ int hs = m_hdc->read(0x06) & (1 + 2 + 4); // SDH bits 0-2 = HEAD #
// logerror("(x69 READ) %i = HEAD SELECT WD1010\n", hs);
uint8_t data = (hs << 1);
// DRIVE SELECT: 2 bits in SDH register of WDx010 could address 4 drives.
// External circuit supports 1 drive here (DRIVE 0 selected or deselected)
- int drv = ((m_hdc->read(space, 0x06) >> 3) & 0x01); // 0x03 gives error R6 with DIAG.DISK
+ int drv = ((m_hdc->read(0x06) >> 3) & 0x01); // 0x03 gives error R6 with DIAG.DISK
if (drv == 0)
data |= 1; // logerror("(x69 READ) %i = _DRIVE # 0_ SELECT! \n", drv);
@@ -2064,7 +2064,7 @@ READ8_MEMBER(rainbow_state::hd_status_69_r)
data |= 64;
// Fake TRACK 0 signal (normally FROM DRIVE)
- if ((m_hdc->read(space, 0x04) == 0) && (m_hdc->read(space, 0x05) == 0)) // CYL.LO - CYL.HI
+ if ((m_hdc->read(0x04) == 0) && (m_hdc->read(0x05) == 0)) // CYL.LO - CYL.HI
data |= 128; // logerror("(x69 READ) TRACK 00 detected\n");
return data;
diff --git a/src/mame/drivers/tiki100.cpp b/src/mame/drivers/tiki100.cpp
index 846ee267d1c..28c4802139f 100644
--- a/src/mame/drivers/tiki100.cpp
+++ b/src/mame/drivers/tiki100.cpp
@@ -36,7 +36,7 @@ READ8_MEMBER( tiki100_state::mrq_r )
{
bool mdis = 1;
- uint8_t data = m_exp->mrq_r(space, offset, 0xff, mdis);
+ uint8_t data = m_exp->mrq_r(offset, 0xff, mdis);
offs_t prom_addr = mdis << 5 | m_vire << 4 | m_rome << 3 | (offset >> 13);
uint8_t prom = m_prom->base()[prom_addr] ^ 0xff;
@@ -84,12 +84,12 @@ WRITE8_MEMBER( tiki100_state::mrq_w )
m_ram->pointer()[offset] = data;
}
- m_exp->mrq_w(space, offset, data);
+ m_exp->mrq_w(offset, data);
}
READ8_MEMBER( tiki100_state::iorq_r )
{
- uint8_t data = m_exp->iorq_r(space, offset, 0xff);
+ uint8_t data = m_exp->iorq_r(offset, 0xff);
switch ((offset & 0xff) >> 2)
{
@@ -128,7 +128,7 @@ READ8_MEMBER( tiki100_state::iorq_r )
WRITE8_MEMBER( tiki100_state::iorq_w )
{
- m_exp->iorq_w(space, offset, data);
+ m_exp->iorq_w(offset, data);
switch ((offset & 0xff) >> 2)
{