summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/dgpix.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/dgpix.cpp')
-rw-r--r--src/mame/drivers/dgpix.cpp38
1 files changed, 20 insertions, 18 deletions
diff --git a/src/mame/drivers/dgpix.cpp b/src/mame/drivers/dgpix.cpp
index 5d204a01845..790684a7441 100644
--- a/src/mame/drivers/dgpix.cpp
+++ b/src/mame/drivers/dgpix.cpp
@@ -324,24 +324,26 @@ READ32_MEMBER(dgpix_state::vblank_r)
return m_vblank->read();
}
-ADDRESS_MAP_START(dgpix_state::cpu_map)
- AM_RANGE(0x00000000, 0x007fffff) AM_RAM
- AM_RANGE(0x40000000, 0x4003ffff) AM_READWRITE(vram_r, vram_w)
- AM_RANGE(0xe0000000, 0xe1ffffff) AM_READWRITE(flash_r, flash_w)
- AM_RANGE(0xe2000000, 0xe3ffffff) AM_READWRITE(flash_r, flash_w)
- AM_RANGE(0xffc00000, 0xffffffff) AM_ROM AM_REGION("flash", 0x1c00000) AM_SHARE("nvram")
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(dgpix_state::io_map)
- AM_RANGE(0x0200, 0x0203) AM_READNOP // used to sync with the protecion PIC? tested bits 0 and 1
- AM_RANGE(0x0400, 0x0403) AM_READWRITE(vblank_r, vbuffer_w)
- AM_RANGE(0x0a10, 0x0a13) AM_READ_PORT("INPUTS")
- AM_RANGE(0x0200, 0x0203) AM_WRITE(coin_w)
- AM_RANGE(0x0c00, 0x0c03) AM_WRITENOP // writes only: 1, 0, 1 at startup
- AM_RANGE(0x0c80, 0x0c83) AM_WRITENOP // sound commands / latches
- AM_RANGE(0x0c80, 0x0c83) AM_READNOP //read at startup -> cmp 0xFE
- AM_RANGE(0x0c84, 0x0c87) AM_READNOP // sound status, checks bit 0x40 and 0x80
-ADDRESS_MAP_END
+void dgpix_state::cpu_map(address_map &map)
+{
+ map(0x00000000, 0x007fffff).ram();
+ map(0x40000000, 0x4003ffff).rw(this, FUNC(dgpix_state::vram_r), FUNC(dgpix_state::vram_w));
+ map(0xe0000000, 0xe1ffffff).rw(this, FUNC(dgpix_state::flash_r), FUNC(dgpix_state::flash_w));
+ map(0xe2000000, 0xe3ffffff).rw(this, FUNC(dgpix_state::flash_r), FUNC(dgpix_state::flash_w));
+ map(0xffc00000, 0xffffffff).rom().region("flash", 0x1c00000).share("nvram");
+}
+
+void dgpix_state::io_map(address_map &map)
+{
+ map(0x0200, 0x0203).nopr(); // used to sync with the protecion PIC? tested bits 0 and 1
+ map(0x0400, 0x0403).rw(this, FUNC(dgpix_state::vblank_r), FUNC(dgpix_state::vbuffer_w));
+ map(0x0a10, 0x0a13).portr("INPUTS");
+ map(0x0200, 0x0203).w(this, FUNC(dgpix_state::coin_w));
+ map(0x0c00, 0x0c03).nopw(); // writes only: 1, 0, 1 at startup
+ map(0x0c80, 0x0c83).nopw(); // sound commands / latches
+ map(0x0c80, 0x0c83).nopr(); //read at startup -> cmp 0xFE
+ map(0x0c84, 0x0c87).nopr(); // sound status, checks bit 0x40 and 0x80
+}
static INPUT_PORTS_START( dgpix )