summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/progolf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/progolf.cpp')
-rw-r--r--src/mame/drivers/progolf.cpp50
1 files changed, 26 insertions, 24 deletions
diff --git a/src/mame/drivers/progolf.cpp b/src/mame/drivers/progolf.cpp
index b4d8f0b3d1c..626d87251ac 100644
--- a/src/mame/drivers/progolf.cpp
+++ b/src/mame/drivers/progolf.cpp
@@ -261,31 +261,33 @@ WRITE8_MEMBER(progolf_state::videoram_w)
m_videoram[offset] = data;
}
-ADDRESS_MAP_START(progolf_state::main_cpu)
- AM_RANGE(0x0000, 0x5fff) AM_RAM
- AM_RANGE(0x6000, 0x7fff) AM_RAM_WRITE(charram_w) AM_SHARE("fbram")
- AM_RANGE(0x8000, 0x8fff) AM_READWRITE(videoram_r, videoram_w) AM_SHARE("videoram")
- AM_RANGE(0x9000, 0x9000) AM_READ_PORT("IN2") AM_WRITE(char_vregs_w)
- AM_RANGE(0x9200, 0x9200) AM_READ_PORT("P1") AM_WRITE(scrollx_hi_w) //p1 inputs
- AM_RANGE(0x9400, 0x9400) AM_READ_PORT("P2") AM_WRITE(scrollx_lo_w) //p2 inputs
- AM_RANGE(0x9600, 0x9600) AM_READ_PORT("IN0") AM_WRITE(flip_screen_w) /* VBLANK */
- AM_RANGE(0x9800, 0x9800) AM_READ_PORT("DSW1")
- AM_RANGE(0x9800, 0x9800) AM_DEVWRITE("crtc", mc6845_device, address_w)
- AM_RANGE(0x9801, 0x9801) AM_DEVWRITE("crtc", mc6845_device, register_w)
- AM_RANGE(0x9a00, 0x9a00) AM_READ_PORT("DSW2") AM_DEVWRITE("soundlatch", generic_latch_8_device, write)
+void progolf_state::main_cpu(address_map &map)
+{
+ map(0x0000, 0x5fff).ram();
+ map(0x6000, 0x7fff).ram().w(this, FUNC(progolf_state::charram_w)).share("fbram");
+ map(0x8000, 0x8fff).rw(this, FUNC(progolf_state::videoram_r), FUNC(progolf_state::videoram_w)).share("videoram");
+ map(0x9000, 0x9000).portr("IN2").w(this, FUNC(progolf_state::char_vregs_w));
+ map(0x9200, 0x9200).portr("P1").w(this, FUNC(progolf_state::scrollx_hi_w)); //p1 inputs
+ map(0x9400, 0x9400).portr("P2").w(this, FUNC(progolf_state::scrollx_lo_w)); //p2 inputs
+ map(0x9600, 0x9600).portr("IN0").w(this, FUNC(progolf_state::flip_screen_w)); /* VBLANK */
+ map(0x9800, 0x9800).portr("DSW1");
+ map(0x9800, 0x9800).w("crtc", FUNC(mc6845_device::address_w));
+ map(0x9801, 0x9801).w("crtc", FUNC(mc6845_device::register_w));
+ map(0x9a00, 0x9a00).portr("DSW2").w("soundlatch", FUNC(generic_latch_8_device::write));
// AM_RANGE(0x9e00, 0x9e00) AM_WRITENOP
- AM_RANGE(0xb000, 0xffff) AM_ROM
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(progolf_state::sound_cpu)
- AM_RANGE(0x0000, 0x0fff) AM_RAM
- AM_RANGE(0x4000, 0x4fff) AM_DEVREADWRITE("ay1", ay8910_device, data_r, data_w)
- AM_RANGE(0x5000, 0x5fff) AM_DEVWRITE("ay1", ay8910_device, address_w)
- AM_RANGE(0x6000, 0x6fff) AM_DEVREADWRITE("ay2", ay8910_device, data_r, data_w)
- AM_RANGE(0x7000, 0x7fff) AM_DEVWRITE("ay2", ay8910_device, address_w)
- AM_RANGE(0x8000, 0x8fff) AM_DEVREADWRITE("soundlatch", generic_latch_8_device, read, acknowledge_w)
- AM_RANGE(0xf000, 0xffff) AM_ROM
-ADDRESS_MAP_END
+ map(0xb000, 0xffff).rom();
+}
+
+void progolf_state::sound_cpu(address_map &map)
+{
+ map(0x0000, 0x0fff).ram();
+ map(0x4000, 0x4fff).rw("ay1", FUNC(ay8910_device::data_r), FUNC(ay8910_device::data_w));
+ map(0x5000, 0x5fff).w("ay1", FUNC(ay8910_device::address_w));
+ map(0x6000, 0x6fff).rw("ay2", FUNC(ay8910_device::data_r), FUNC(ay8910_device::data_w));
+ map(0x7000, 0x7fff).w("ay2", FUNC(ay8910_device::address_w));
+ map(0x8000, 0x8fff).rw("soundlatch", FUNC(generic_latch_8_device::read), FUNC(generic_latch_8_device::acknowledge_w));
+ map(0xf000, 0xffff).rom();
+}
INPUT_CHANGED_MEMBER(progolf_state::coin_inserted)