summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/barata.cpp
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2018-02-27 22:21:06 -0500
committer AJR <ajrhacker@users.noreply.github.com>2018-02-27 22:21:06 -0500
commit5e3a7e9bf04044e4b1326203d3de213326f2627e (patch)
treef583f78b68e1d7a4e18e386cf9080afcdd20ee57 /src/mame/drivers/barata.cpp
parent81fa4120669622146f0dce93bb357f85c7274b4e (diff)
mcs51: Use callbacks for parallel ports (nw)
Diffstat (limited to 'src/mame/drivers/barata.cpp')
-rw-r--r--src/mame/drivers/barata.cpp18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/mame/drivers/barata.cpp b/src/mame/drivers/barata.cpp
index 7979c669b43..f992add66ed 100644
--- a/src/mame/drivers/barata.cpp
+++ b/src/mame/drivers/barata.cpp
@@ -57,7 +57,6 @@ public:
required_device<cpu_device> m_maincpu;
void barata(machine_config &config);
- void i8051_io_port(address_map &map);
private:
unsigned char row_selection;
};
@@ -291,17 +290,6 @@ READ8_MEMBER(barata_state::port2_r)
return 0;
}
-/*************************
-* Memory Map Information *
-*************************/
-
-ADDRESS_MAP_START(barata_state::i8051_io_port)
- AM_RANGE(MCS51_PORT_P0, MCS51_PORT_P0 ) AM_WRITE(port0_w)
- AM_RANGE(MCS51_PORT_P1, MCS51_PORT_P1 ) AM_READ_PORT("PORT1")
- AM_RANGE(MCS51_PORT_P2, MCS51_PORT_P2 ) AM_READWRITE(port2_r, port2_w)
- AM_RANGE(MCS51_PORT_P3, MCS51_PORT_P3 ) AM_WRITE(fpga_w)
-ADDRESS_MAP_END
-
/************************
* Machine Drivers *
************************/
@@ -309,7 +297,11 @@ ADDRESS_MAP_END
MACHINE_CONFIG_START(barata_state::barata)
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", I8051, CPU_CLOCK)
- MCFG_CPU_IO_MAP(i8051_io_port)
+ MCFG_MCS51_PORT_P0_OUT_CB(WRITE8(barata_state, port0_w))
+ MCFG_MCS51_PORT_P1_IN_CB(IOPORT("PORT1"))
+ MCFG_MCS51_PORT_P2_IN_CB(READ8(barata_state, port2_r))
+ MCFG_MCS51_PORT_P2_OUT_CB(WRITE8(barata_state, port2_w))
+ MCFG_MCS51_PORT_P3_OUT_CB(WRITE8(barata_state, fpga_w))
MCFG_DEFAULT_LAYOUT( layout_barata )