diff options
author | 2018-03-13 07:36:43 +0100 | |
---|---|---|
committer | 2018-03-14 14:07:14 +0100 | |
commit | 115bb9936c5cd3faf955d7eb1e251a94e4744b7b (patch) | |
tree | f0230f547f6c750f9974c61479eef28cbe4ad571 /src/mame/drivers/nes.cpp | |
parent | f155992daab88ad024cec995428a67108218b51d (diff) |
Address maps macros removal, pass 1 [O. Galibert]
Diffstat (limited to 'src/mame/drivers/nes.cpp')
-rw-r--r-- | src/mame/drivers/nes.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/mame/drivers/nes.cpp b/src/mame/drivers/nes.cpp index da2ba6a2be3..d99a7e27b80 100644 --- a/src/mame/drivers/nes.cpp +++ b/src/mame/drivers/nes.cpp @@ -26,16 +26,17 @@ WRITE8_MEMBER(nes_state::nes_vh_sprite_dma_w) m_ppu->spriteram_dma(space, data); } -ADDRESS_MAP_START(nes_state::nes_map) - AM_RANGE(0x0000, 0x07ff) AM_RAM AM_MIRROR(0x1800) /* RAM */ - AM_RANGE(0x2000, 0x3fff) AM_DEVREADWRITE("ppu", ppu2c0x_device, read, write) /* PPU registers */ - AM_RANGE(0x4014, 0x4014) AM_WRITE(nes_vh_sprite_dma_w) /* stupid address space hole */ - AM_RANGE(0x4016, 0x4016) AM_READWRITE(nes_in0_r, nes_in0_w) /* IN0 - input port 1 */ - AM_RANGE(0x4017, 0x4017) AM_READ(nes_in1_r) /* IN1 - input port 2 */ +void nes_state::nes_map(address_map &map) +{ + map(0x0000, 0x07ff).ram().mirror(0x1800); /* RAM */ + map(0x2000, 0x3fff).rw(m_ppu, FUNC(ppu2c0x_device::read), FUNC(ppu2c0x_device::write)); /* PPU registers */ + map(0x4014, 0x4014).w(this, FUNC(nes_state::nes_vh_sprite_dma_w)); /* stupid address space hole */ + map(0x4016, 0x4016).rw(this, FUNC(nes_state::nes_in0_r), FUNC(nes_state::nes_in0_w)); /* IN0 - input port 1 */ + map(0x4017, 0x4017).r(this, FUNC(nes_state::nes_in1_r)); /* IN1 - input port 2 */ // 0x4100-0x5fff -> LOW HANDLER defined on a pcb base // 0x6000-0x7fff -> MID HANDLER defined on a pcb base // 0x8000-0xffff -> HIGH HANDLER defined on a pcb base -ADDRESS_MAP_END +} static INPUT_PORTS_START( nes ) // input devices go through slot options |