diff options
Diffstat (limited to 'src/mame/drivers/thief.cpp')
-rw-r--r-- | src/mame/drivers/thief.cpp | 67 |
1 files changed, 35 insertions, 32 deletions
diff --git a/src/mame/drivers/thief.cpp b/src/mame/drivers/thief.cpp index f8b0a22a279..63f3c55cb99 100644 --- a/src/mame/drivers/thief.cpp +++ b/src/mame/drivers/thief.cpp @@ -133,38 +133,41 @@ READ8_MEMBER( thief_state::thief_io_r ) return data; } -ADDRESS_MAP_START(thief_state::sharkatt_main_map) - AM_RANGE(0x0000, 0x7fff) AM_ROM - AM_RANGE(0x8000, 0x8fff) AM_RAM /* 2114 */ - AM_RANGE(0xc000, 0xdfff) AM_READWRITE(thief_videoram_r, thief_videoram_w) /* 4116 */ -ADDRESS_MAP_END - -ADDRESS_MAP_START(thief_state::thief_main_map) - AM_RANGE(0x0000, 0x0000) AM_WRITE(thief_blit_w) - AM_RANGE(0x0000, 0x7fff) AM_ROM - AM_RANGE(0x8000, 0x8fff) AM_RAM /* 2114 */ - AM_RANGE(0xa000, 0xafff) AM_ROM /* NATO Defense diagnostic ROM */ - AM_RANGE(0xc000, 0xdfff) AM_READWRITE(thief_videoram_r, thief_videoram_w) /* 4116 */ - AM_RANGE(0xe000, 0xe008) AM_READWRITE(thief_coprocessor_r, thief_coprocessor_w) - AM_RANGE(0xe010, 0xe02f) AM_ROM - AM_RANGE(0xe080, 0xe0bf) AM_READWRITE(thief_context_ram_r, thief_context_ram_w) - AM_RANGE(0xe0c0, 0xe0c0) AM_WRITE(thief_context_bank_w) -ADDRESS_MAP_END - - -ADDRESS_MAP_START(thief_state::io_map) - ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_WRITENOP /* watchdog */ - AM_RANGE(0x10, 0x10) AM_WRITE(thief_video_control_w) - AM_RANGE(0x30, 0x33) AM_MIRROR(0x0c) AM_DEVREADWRITE("ppi", i8255_device, read, write) - AM_RANGE(0x40, 0x41) AM_DEVWRITE("ay1", ay8910_device, address_data_w) - AM_RANGE(0x41, 0x41) AM_DEVREAD("ay1", ay8910_device, data_r) - AM_RANGE(0x42, 0x43) AM_DEVWRITE("ay2", ay8910_device, address_data_w) - AM_RANGE(0x43, 0x43) AM_DEVREAD("ay2", ay8910_device, data_r) - AM_RANGE(0x50, 0x50) AM_WRITE(thief_color_plane_w) - AM_RANGE(0x60, 0x6f) AM_DEVREADWRITE("tms", tms9927_device, read, write) - AM_RANGE(0x70, 0x7f) AM_WRITE(thief_color_map_w) -ADDRESS_MAP_END +void thief_state::sharkatt_main_map(address_map &map) +{ + map(0x0000, 0x7fff).rom(); + map(0x8000, 0x8fff).ram(); /* 2114 */ + map(0xc000, 0xdfff).rw(this, FUNC(thief_state::thief_videoram_r), FUNC(thief_state::thief_videoram_w)); /* 4116 */ +} + +void thief_state::thief_main_map(address_map &map) +{ + map(0x0000, 0x0000).w(this, FUNC(thief_state::thief_blit_w)); + map(0x0000, 0x7fff).rom(); + map(0x8000, 0x8fff).ram(); /* 2114 */ + map(0xa000, 0xafff).rom(); /* NATO Defense diagnostic ROM */ + map(0xc000, 0xdfff).rw(this, FUNC(thief_state::thief_videoram_r), FUNC(thief_state::thief_videoram_w)); /* 4116 */ + map(0xe000, 0xe008).rw(this, FUNC(thief_state::thief_coprocessor_r), FUNC(thief_state::thief_coprocessor_w)); + map(0xe010, 0xe02f).rom(); + map(0xe080, 0xe0bf).rw(this, FUNC(thief_state::thief_context_ram_r), FUNC(thief_state::thief_context_ram_w)); + map(0xe0c0, 0xe0c0).w(this, FUNC(thief_state::thief_context_bank_w)); +} + + +void thief_state::io_map(address_map &map) +{ + map.global_mask(0xff); + map(0x00, 0x00).nopw(); /* watchdog */ + map(0x10, 0x10).w(this, FUNC(thief_state::thief_video_control_w)); + map(0x30, 0x33).mirror(0x0c).rw("ppi", FUNC(i8255_device::read), FUNC(i8255_device::write)); + map(0x40, 0x41).w("ay1", FUNC(ay8910_device::address_data_w)); + map(0x41, 0x41).r("ay1", FUNC(ay8910_device::data_r)); + map(0x42, 0x43).w("ay2", FUNC(ay8910_device::address_data_w)); + map(0x43, 0x43).r("ay2", FUNC(ay8910_device::data_r)); + map(0x50, 0x50).w(this, FUNC(thief_state::thief_color_plane_w)); + map(0x60, 0x6f).rw(m_tms, FUNC(tms9927_device::read), FUNC(tms9927_device::write)); + map(0x70, 0x7f).w(this, FUNC(thief_state::thief_color_map_w)); +} /**********************************************************/ |