summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/swtpc09.cpp
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2018-03-13 07:36:43 +0100
committer Olivier Galibert <galibert@pobox.com>2018-03-14 14:07:14 +0100
commit115bb9936c5cd3faf955d7eb1e251a94e4744b7b (patch)
treef0230f547f6c750f9974c61479eef28cbe4ad571 /src/mame/drivers/swtpc09.cpp
parentf155992daab88ad024cec995428a67108218b51d (diff)
Address maps macros removal, pass 1 [O. Galibert]
Diffstat (limited to 'src/mame/drivers/swtpc09.cpp')
-rw-r--r--src/mame/drivers/swtpc09.cpp125
1 files changed, 65 insertions, 60 deletions
diff --git a/src/mame/drivers/swtpc09.cpp b/src/mame/drivers/swtpc09.cpp
index 40a4946b743..fb7db1e60f8 100644
--- a/src/mame/drivers/swtpc09.cpp
+++ b/src/mame/drivers/swtpc09.cpp
@@ -60,77 +60,82 @@
/* Address map is dynamically setup when DAT memory is written to */
/* only ROM from FF00-FFFF and DAT memory at FFF0-FFFF (write only) is guaranteed always*/
-ADDRESS_MAP_START(swtpc09_state::mp09_mem)
- AM_RANGE(0x0000, 0xfeff) AM_READWRITE(main_r, main_w)
- AM_RANGE(0xff00, 0xffff) AM_ROM AM_REGION("maincpu", 0xff00)
- AM_RANGE(0xff00, 0xff0f) AM_MIRROR(0xf0) AM_WRITEONLY AM_SHARE("dat")
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(swtpc09_state::flex_dmf2_mem)
- AM_RANGE(0x00000, 0xfffff) AM_RAM AM_SHARE("mainram") // by default everything is ram, 1MB ram emulated
- AM_RANGE(0xe000, 0xe003) AM_MIRROR(0xf0000) AM_NOP
- AM_RANGE(0xe004, 0xe005) AM_MIRROR(0xf0000) AM_DEVREADWRITE("acia", acia6850_device, read, write)
- AM_RANGE(0xe080, 0xe083) AM_MIRROR(0xf000c) AM_DEVREADWRITE("pia", pia6821_device, read, write)
- AM_RANGE(0xe090, 0xe097) AM_MIRROR(0xf0008) AM_DEVREADWRITE("ptm", ptm6840_device, read, write)
- AM_RANGE(0xe0a0, 0xefff) AM_MIRROR(0xf0000) AM_NOP
- AM_RANGE(0xf000, 0xf01f) AM_MIRROR(0xf0000) AM_READWRITE(m6844_r, m6844_w)
- AM_RANGE(0xf020, 0xf023) AM_MIRROR(0xf0000) AM_DEVREADWRITE("fdc", fd1793_device, read, write)
- AM_RANGE(0xf024, 0xf03f) AM_MIRROR(0xf0000) AM_READWRITE(dmf2_control_reg_r, dmf2_control_reg_w)
+void swtpc09_state::mp09_mem(address_map &map)
+{
+ map(0x0000, 0xfeff).rw(this, FUNC(swtpc09_state::main_r), FUNC(swtpc09_state::main_w));
+ map(0xff00, 0xffff).rom().region("maincpu", 0xff00);
+ map(0xff00, 0xff0f).mirror(0xf0).writeonly().share("dat");
+}
+
+void swtpc09_state::flex_dmf2_mem(address_map &map)
+{
+ map(0x00000, 0xfffff).ram().share("mainram"); // by default everything is ram, 1MB ram emulated
+ map(0xe000, 0xe003).mirror(0xf0000).noprw();
+ map(0xe004, 0xe005).mirror(0xf0000).rw(m_acia, FUNC(acia6850_device::read), FUNC(acia6850_device::write));
+ map(0xe080, 0xe083).mirror(0xf000c).rw(m_pia, FUNC(pia6821_device::read), FUNC(pia6821_device::write));
+ map(0xe090, 0xe097).mirror(0xf0008).rw(m_ptm, FUNC(ptm6840_device::read), FUNC(ptm6840_device::write));
+ map(0xe0a0, 0xefff).mirror(0xf0000).noprw();
+ map(0xf000, 0xf01f).mirror(0xf0000).rw(this, FUNC(swtpc09_state::m6844_r), FUNC(swtpc09_state::m6844_w));
+ map(0xf020, 0xf023).mirror(0xf0000).rw(m_fdc, FUNC(fd1793_device::read), FUNC(fd1793_device::write));
+ map(0xf024, 0xf03f).mirror(0xf0000).rw(this, FUNC(swtpc09_state::dmf2_control_reg_r), FUNC(swtpc09_state::dmf2_control_reg_w));
//AM_RANGE(0xf042, 0xf7ff) AM_MIRROR(0xf0000) AM_NOP
- AM_RANGE(0xf800, 0xffff) AM_MIRROR(0xf0000) AM_ROM AM_REGION("maincpu", 0xf800)
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(swtpc09_state::flex_dc4_piaide_mem)
- AM_RANGE(0x00000, 0xfffff) AM_RAM AM_SHARE("mainram") // by default everything is ram, 1MB ram emulated
- AM_RANGE(0xe000, 0xe003) AM_MIRROR(0xf0000) AM_NOP
- AM_RANGE(0xe004, 0xe005) AM_MIRROR(0xf0000) AM_DEVREADWRITE("acia", acia6850_device, read, write)
- AM_RANGE(0xe014, 0xe014) AM_MIRROR(0xf0000) AM_WRITE(dc4_control_reg_w)
- AM_RANGE(0xe018, 0xe01b) AM_MIRROR(0xf0000) AM_DEVREADWRITE("fdc", fd1793_device, read, write)
+ map(0xf800, 0xffff).mirror(0xf0000).rom().region("maincpu", 0xf800);
+}
+
+void swtpc09_state::flex_dc4_piaide_mem(address_map &map)
+{
+ map(0x00000, 0xfffff).ram().share("mainram"); // by default everything is ram, 1MB ram emulated
+ map(0xe000, 0xe003).mirror(0xf0000).noprw();
+ map(0xe004, 0xe005).mirror(0xf0000).rw(m_acia, FUNC(acia6850_device::read), FUNC(acia6850_device::write));
+ map(0xe014, 0xe014).mirror(0xf0000).w(this, FUNC(swtpc09_state::dc4_control_reg_w));
+ map(0xe018, 0xe01b).mirror(0xf0000).rw(m_fdc, FUNC(fd1793_device::read), FUNC(fd1793_device::write));
//AM_RANGE(0xe01c, 0xe05f) AM_MIRROR(0xf0000) AM_NOP
- AM_RANGE(0xe060, 0xe063) AM_MIRROR(0xf000c) AM_DEVREADWRITE("piaide", pia6821_device, read, write)
+ map(0xe060, 0xe063).mirror(0xf000c).rw(m_piaide, FUNC(pia6821_device::read), FUNC(pia6821_device::write));
//AM_RANGE(0xe070, 0xe07f) AM_MIRROR(0xf0000) AM_NOP
- AM_RANGE(0xe080, 0xe083) AM_MIRROR(0xf000c) AM_DEVREADWRITE("pia", pia6821_device, read, write)
- AM_RANGE(0xe090, 0xe097) AM_MIRROR(0xf0008) AM_DEVREADWRITE("ptm", ptm6840_device, read, write)
+ map(0xe080, 0xe083).mirror(0xf000c).rw(m_pia, FUNC(pia6821_device::read), FUNC(pia6821_device::write));
+ map(0xe090, 0xe097).mirror(0xf0008).rw(m_ptm, FUNC(ptm6840_device::read), FUNC(ptm6840_device::write));
//AM_RANGE(0xe0a0, 0xe7ff) AM_MIRROR(0xf0000) AM_NOP
- AM_RANGE(0xe800, 0xefff) AM_MIRROR(0xf0000) AM_ROM AM_REGION("maincpu", 0xe800) //piaide rom
+ map(0xe800, 0xefff).mirror(0xf0000).rom().region("maincpu", 0xe800); //piaide rom
//AM_RANGE(0xf000, 0xf01f) AM_MIRROR(0xf0000) AM_READWRITE(m6844_r, m6844_w)
//AM_RANGE(0xf020, 0xf023) AM_MIRROR(0xf0000) AM_DEVREADWRITE("fdc", fd1793_device, read, write)
//AM_RANGE(0xf024, 0xf03f) AM_MIRROR(0xf0000) AM_READWRITE(dmf2_control_reg_r, dmf2_control_reg_w)
//AM_RANGE(0xf040, 0xf041) AM_MIRROR(0xf0000) AM_READWRITE(dmf2_dma_address_reg_r, dmf2_dma_address_reg_w)
- AM_RANGE(0xf000, 0xf7ff) AM_MIRROR(0xf0000) AM_RAM AM_SHARE("s09ram") // 2k ram for piaide on s09 board
- AM_RANGE(0xf800, 0xffff) AM_MIRROR(0xf0000) AM_ROM AM_REGION("maincpu", 0xf800)
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(swtpc09_state::uniflex_dmf2_mem)
- AM_RANGE(0x00000, 0xfffff) AM_RAM AM_SHARE("mainram") // by default everything is ram, 1MB ram emulated
- AM_RANGE(0xe000, 0xe001) AM_MIRROR(0xf0000) AM_DEVREADWRITE("acia", acia6850_device, read, write)
- AM_RANGE(0xe002, 0xe07f) AM_MIRROR(0xf0000) AM_NOP
- AM_RANGE(0xe080, 0xe083) AM_MIRROR(0xf000c) AM_DEVREADWRITE("pia", pia6821_device, read, write)
- AM_RANGE(0xe090, 0xe097) AM_MIRROR(0xf0008) AM_DEVREADWRITE("ptm", ptm6840_device, read, write)
- AM_RANGE(0xe0a0, 0xefff) AM_MIRROR(0xf0000) AM_NOP
- AM_RANGE(0xf000, 0xf01f) AM_MIRROR(0xf0000) AM_READWRITE(m6844_r, m6844_w)
- AM_RANGE(0xf020, 0xf023) AM_MIRROR(0xf0000) AM_DEVREADWRITE("fdc", fd1793_device, read, write)
- AM_RANGE(0xf024, 0xf03f) AM_MIRROR(0xf0000) AM_READWRITE(dmf2_control_reg_r, dmf2_control_reg_w)
+ map(0xf000, 0xf7ff).mirror(0xf0000).ram().share("s09ram"); // 2k ram for piaide on s09 board
+ map(0xf800, 0xffff).mirror(0xf0000).rom().region("maincpu", 0xf800);
+}
+
+void swtpc09_state::uniflex_dmf2_mem(address_map &map)
+{
+ map(0x00000, 0xfffff).ram().share("mainram"); // by default everything is ram, 1MB ram emulated
+ map(0xe000, 0xe001).mirror(0xf0000).rw(m_acia, FUNC(acia6850_device::read), FUNC(acia6850_device::write));
+ map(0xe002, 0xe07f).mirror(0xf0000).noprw();
+ map(0xe080, 0xe083).mirror(0xf000c).rw(m_pia, FUNC(pia6821_device::read), FUNC(pia6821_device::write));
+ map(0xe090, 0xe097).mirror(0xf0008).rw(m_ptm, FUNC(ptm6840_device::read), FUNC(ptm6840_device::write));
+ map(0xe0a0, 0xefff).mirror(0xf0000).noprw();
+ map(0xf000, 0xf01f).mirror(0xf0000).rw(this, FUNC(swtpc09_state::m6844_r), FUNC(swtpc09_state::m6844_w));
+ map(0xf020, 0xf023).mirror(0xf0000).rw(m_fdc, FUNC(fd1793_device::read), FUNC(fd1793_device::write));
+ map(0xf024, 0xf03f).mirror(0xf0000).rw(this, FUNC(swtpc09_state::dmf2_control_reg_r), FUNC(swtpc09_state::dmf2_control_reg_w));
//AM_RANGE(0xf042, 0xf7ff) AM_MIRROR(0xf0000) AM_NOP
- AM_RANGE(0xf800, 0xffff) AM_MIRROR(0xf0000) AM_ROM AM_REGION("maincpu", 0xf800)
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(swtpc09_state::uniflex_dmf3_mem)
- AM_RANGE(0x00000, 0xfffff) AM_RAM AM_SHARE("mainram") // by default everything is ram, 1MB ram emulated
- AM_RANGE(0xe000, 0xe001) AM_MIRROR(0xf0000) AM_DEVREADWRITE("acia", acia6850_device, read, write)
- AM_RANGE(0xe002, 0xe07f) AM_MIRROR(0xf0000) AM_NOP
- AM_RANGE(0xe080, 0xe083) AM_MIRROR(0xf000c) AM_DEVREADWRITE("pia", pia6821_device, read, write)
- AM_RANGE(0xe090, 0xe097) AM_MIRROR(0xf0008) AM_DEVREADWRITE("ptm", ptm6840_device, read, write)
- AM_RANGE(0xe0a0, 0xefff) AM_MIRROR(0xf0000) AM_NOP
- AM_RANGE(0xf000, 0xf01f) AM_MIRROR(0xf0000) AM_READWRITE(m6844_r, m6844_w)
- AM_RANGE(0xf020, 0xf023) AM_MIRROR(0xf0000) AM_DEVREADWRITE("fdc", fd1793_device, read, write)
- AM_RANGE(0xf024, 0xf024) AM_MIRROR(0xf0000) AM_READWRITE(dmf3_control_reg_r, dmf3_control_reg_w)
- AM_RANGE(0xf025, 0xf025) AM_MIRROR(0xf0000) AM_READWRITE(dmf3_dma_address_reg_r, dmf3_dma_address_reg_w)
+ map(0xf800, 0xffff).mirror(0xf0000).rom().region("maincpu", 0xf800);
+}
+
+void swtpc09_state::uniflex_dmf3_mem(address_map &map)
+{
+ map(0x00000, 0xfffff).ram().share("mainram"); // by default everything is ram, 1MB ram emulated
+ map(0xe000, 0xe001).mirror(0xf0000).rw(m_acia, FUNC(acia6850_device::read), FUNC(acia6850_device::write));
+ map(0xe002, 0xe07f).mirror(0xf0000).noprw();
+ map(0xe080, 0xe083).mirror(0xf000c).rw(m_pia, FUNC(pia6821_device::read), FUNC(pia6821_device::write));
+ map(0xe090, 0xe097).mirror(0xf0008).rw(m_ptm, FUNC(ptm6840_device::read), FUNC(ptm6840_device::write));
+ map(0xe0a0, 0xefff).mirror(0xf0000).noprw();
+ map(0xf000, 0xf01f).mirror(0xf0000).rw(this, FUNC(swtpc09_state::m6844_r), FUNC(swtpc09_state::m6844_w));
+ map(0xf020, 0xf023).mirror(0xf0000).rw(m_fdc, FUNC(fd1793_device::read), FUNC(fd1793_device::write));
+ map(0xf024, 0xf024).mirror(0xf0000).rw(this, FUNC(swtpc09_state::dmf3_control_reg_r), FUNC(swtpc09_state::dmf3_control_reg_w));
+ map(0xf025, 0xf025).mirror(0xf0000).rw(this, FUNC(swtpc09_state::dmf3_dma_address_reg_r), FUNC(swtpc09_state::dmf3_dma_address_reg_w));
//AM_RANGE(0xf030, 0xf03f) AM_MIRROR(0xf0000) AM_NOP
- AM_RANGE(0xf040, 0xf04f) AM_MIRROR(0xf0000) AM_DEVREADWRITE("via", via6522_device, read, write)
+ map(0xf040, 0xf04f).mirror(0xf0000).rw(m_via, FUNC(via6522_device::read), FUNC(via6522_device::write));
//AM_RANGE(0xf050, 0xf7ff) AM_MIRROR(0xf0000) AM_NOP
- AM_RANGE(0xf800, 0xffff) AM_MIRROR(0xf0000) AM_ROM AM_REGION("maincpu", 0xf800)
-ADDRESS_MAP_END
+ map(0xf800, 0xffff).mirror(0xf0000).rom().region("maincpu", 0xf800);
+}
/* Input ports */