diff options
author | R. Belmont <rb6502@users.noreply.github.com> | 2019-04-05 16:46:04 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-05 16:46:04 -0400 |
commit | 6281fb3cab0c6b6383116626c7b418817ea71c3a (patch) | |
tree | 59aeac6cddb67269a417787f7d5813550b4abce9 | |
parent | 1ff2bb92d4cdaf2991db3ada366c67be0cc99297 (diff) | |
parent | 97b8e4cc7988061fd93d31adfc011392b6d5a59c (diff) |
Merge pull request #4852 from cam900/tc0100scn_args
tc0100scn.cpp : Updates
-rw-r--r-- | src/mame/drivers/asuka.cpp | 18 | ||||
-rw-r--r-- | src/mame/drivers/galastrm.cpp | 4 | ||||
-rw-r--r-- | src/mame/drivers/groundfx.cpp | 4 | ||||
-rw-r--r-- | src/mame/drivers/ninjaw.cpp | 34 | ||||
-rw-r--r-- | src/mame/drivers/othunder.cpp | 4 | ||||
-rw-r--r-- | src/mame/drivers/taito_f2.cpp | 115 | ||||
-rw-r--r-- | src/mame/drivers/taito_z.cpp | 36 | ||||
-rw-r--r-- | src/mame/drivers/undrfire.cpp | 8 | ||||
-rw-r--r-- | src/mame/drivers/warriorb.cpp | 20 | ||||
-rw-r--r-- | src/mame/drivers/wgp.cpp | 4 | ||||
-rw-r--r-- | src/mame/includes/taito_f2.h | 3 | ||||
-rw-r--r-- | src/mame/video/groundfx.cpp | 3 | ||||
-rw-r--r-- | src/mame/video/taito_f2.cpp | 17 | ||||
-rw-r--r-- | src/mame/video/tc0100scn.cpp | 123 | ||||
-rw-r--r-- | src/mame/video/tc0100scn.h | 60 |
15 files changed, 209 insertions, 244 deletions
diff --git a/src/mame/drivers/asuka.cpp b/src/mame/drivers/asuka.cpp index 4e6dabd9abc..a052ebc3508 100644 --- a/src/mame/drivers/asuka.cpp +++ b/src/mame/drivers/asuka.cpp @@ -336,8 +336,8 @@ void asuka_state::bonzeadv_map(address_map &map) map(0x3e0003, 0x3e0003).rw("tc0140syt", FUNC(tc0140syt_device::master_comm_r), FUNC(tc0140syt_device::master_comm_w)); map(0x800000, 0x8007ff).rw(m_cchip, FUNC(taito_cchip_device::mem68_r), FUNC(taito_cchip_device::mem68_w)).umask16(0x00ff); map(0x800800, 0x800fff).rw(m_cchip, FUNC(taito_cchip_device::asic_r), FUNC(taito_cchip_device::asic68_w)).umask16(0x00ff); - map(0xc00000, 0xc0ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ - map(0xc20000, 0xc2000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0xc00000, 0xc0ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ + map(0xc20000, 0xc2000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0xd00000, 0xd03fff).rw(m_pc090oj, FUNC(pc090oj_device::word_r), FUNC(pc090oj_device::word_w)); /* sprite ram */ } @@ -352,9 +352,9 @@ void asuka_state::asuka_map(address_map &map) map(0x3e0001, 0x3e0001).w("ciu", FUNC(pc060ha_device::master_port_w)); map(0x3e0003, 0x3e0003).rw("ciu", FUNC(pc060ha_device::master_comm_r), FUNC(pc060ha_device::master_comm_w)); map(0x400000, 0x40000f).rw(m_tc0220ioc, FUNC(tc0220ioc_device::read), FUNC(tc0220ioc_device::write)).umask16(0x00ff); - map(0xc00000, 0xc0ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ + map(0xc00000, 0xc0ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ map(0xc10000, 0xc103ff).nopw(); /* error in Asuka init code */ - map(0xc20000, 0xc2000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0xc20000, 0xc2000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0xd00000, 0xd03fff).rw(m_pc090oj, FUNC(pc090oj_device::word_r), FUNC(pc090oj_device::word_w)); /* sprite ram */ } @@ -370,8 +370,8 @@ void asuka_state::cadash_map(address_map &map) map(0x900000, 0x90000f).rw(m_tc0220ioc, FUNC(tc0220ioc_device::read), FUNC(tc0220ioc_device::write)).umask16(0x00ff); map(0xa00000, 0xa0000f).rw(m_tc0110pcr, FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_4bpg_word_w)); map(0xb00000, 0xb03fff).rw(m_pc090oj, FUNC(pc090oj_device::word_r), FUNC(pc090oj_device::word_w)); /* sprite ram */ - map(0xc00000, 0xc0ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ - map(0xc20000, 0xc2000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0xc00000, 0xc0ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ + map(0xc20000, 0xc2000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); } void asuka_state::eto_map(address_map &map) @@ -385,10 +385,10 @@ void asuka_state::eto_map(address_map &map) map(0x4e0000, 0x4e0001).nopr(); map(0x4e0001, 0x4e0001).w("ciu", FUNC(pc060ha_device::master_port_w)); map(0x4e0003, 0x4e0003).rw("ciu", FUNC(pc060ha_device::master_comm_r), FUNC(pc060ha_device::master_comm_w)); - map(0xc00000, 0xc0ffff).w(m_tc0100scn, FUNC(tc0100scn_device::word_w)); + map(0xc00000, 0xc0ffff).w(m_tc0100scn, FUNC(tc0100scn_device::ram_w)); map(0xc00000, 0xc03fff).rw(m_pc090oj, FUNC(pc090oj_device::word_r), FUNC(pc090oj_device::word_w)); /* sprite ram */ - map(0xd00000, 0xd0ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ - map(0xd20000, 0xd2000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0xd00000, 0xd0ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ + map(0xd20000, 0xd2000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); } diff --git a/src/mame/drivers/galastrm.cpp b/src/mame/drivers/galastrm.cpp index ee1805e76db..40b7019d296 100644 --- a/src/mame/drivers/galastrm.cpp +++ b/src/mame/drivers/galastrm.cpp @@ -102,8 +102,8 @@ void galastrm_state::main_map(address_map &map) map(0x900000, 0x900003).rw(m_tc0110pcr, FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_rbswap_word_w)); /* TC0110PCR */ map(0xb00000, 0xb00003).w(FUNC(galastrm_state::tc0610_w<0>)); /* TC0610 */ map(0xc00000, 0xc00003).w(FUNC(galastrm_state::tc0610_w<1>)); - map(0xd00000, 0xd0ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::long_r), FUNC(tc0100scn_device::long_w)); /* piv tilemaps */ - map(0xd20000, 0xd2000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_long_r), FUNC(tc0100scn_device::ctrl_long_w)); + map(0xd00000, 0xd0ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* piv tilemaps */ + map(0xd20000, 0xd2000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); } /*********************************************************** diff --git a/src/mame/drivers/groundfx.cpp b/src/mame/drivers/groundfx.cpp index 7116d27e1df..77ead18f89c 100644 --- a/src/mame/drivers/groundfx.cpp +++ b/src/mame/drivers/groundfx.cpp @@ -139,8 +139,8 @@ void groundfx_state::groundfx_map(address_map &map) map(0x700000, 0x7007ff).rw("taito_en:dpram", FUNC(mb8421_device::left_r), FUNC(mb8421_device::left_w)); map(0x800000, 0x80ffff).rw(m_tc0480scp, FUNC(tc0480scp_device::ram_r), FUNC(tc0480scp_device::ram_w)); /* tilemaps */ map(0x830000, 0x83002f).rw(m_tc0480scp, FUNC(tc0480scp_device::ctrl_r), FUNC(tc0480scp_device::ctrl_w)); // debugging - map(0x900000, 0x90ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::long_r), FUNC(tc0100scn_device::long_w)); /* 6bpp tilemaps */ - map(0x920000, 0x92000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_long_r), FUNC(tc0100scn_device::ctrl_long_w)); + map(0x900000, 0x90ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* 6bpp tilemaps */ + map(0x920000, 0x92000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0xa00000, 0xa0ffff).ram().w(m_palette, FUNC(palette_device::write32)).share("palette"); map(0xb00000, 0xb003ff).ram(); // ?? single bytes, blending ?? map(0xc00000, 0xc00007).nopr(); /* Network? */ diff --git a/src/mame/drivers/ninjaw.cpp b/src/mame/drivers/ninjaw.cpp index 74d8f249111..40f6665145a 100644 --- a/src/mame/drivers/ninjaw.cpp +++ b/src/mame/drivers/ninjaw.cpp @@ -390,9 +390,9 @@ void ninjaw_state::pancontrol_w(offs_t offset, u8 data) WRITE16_MEMBER(ninjaw_state::tc0100scn_triple_screen_w) { - m_tc0100scn[0]->word_w(space, offset, data, mem_mask); - m_tc0100scn[1]->word_w(space, offset, data, mem_mask); - m_tc0100scn[2]->word_w(space, offset, data, mem_mask); + m_tc0100scn[0]->ram_w(offset, data, mem_mask); + m_tc0100scn[1]->ram_w(offset, data, mem_mask); + m_tc0100scn[2]->ram_w(offset, data, mem_mask); } /*********************************************************** @@ -409,12 +409,12 @@ void ninjaw_state::ninjaw_master_map(address_map &map) map(0x220003, 0x220003).rw(m_tc0140syt, FUNC(tc0140syt_device::master_comm_r), FUNC(tc0140syt_device::master_comm_w)); map(0x240000, 0x24ffff).ram().share("share1"); map(0x260000, 0x263fff).ram().share("spriteram"); - map(0x280000, 0x293fff).r(m_tc0100scn[0], FUNC(tc0100scn_device::word_r)).w(FUNC(ninjaw_state::tc0100scn_triple_screen_w)); /* tilemaps (1st screen/all screens) */ - map(0x2a0000, 0x2a000f).rw(m_tc0100scn[0], FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); - map(0x2c0000, 0x2d3fff).rw(m_tc0100scn[1], FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps (2nd screen) */ - map(0x2e0000, 0x2e000f).rw(m_tc0100scn[1], FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); - map(0x300000, 0x313fff).rw(m_tc0100scn[2], FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps (3rd screen) */ - map(0x320000, 0x32000f).rw(m_tc0100scn[2], FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x280000, 0x293fff).r(m_tc0100scn[0], FUNC(tc0100scn_device::ram_r)).w(FUNC(ninjaw_state::tc0100scn_triple_screen_w)); /* tilemaps (1st screen/all screens) */ + map(0x2a0000, 0x2a000f).rw(m_tc0100scn[0], FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); + map(0x2c0000, 0x2d3fff).rw(m_tc0100scn[1], FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps (2nd screen) */ + map(0x2e0000, 0x2e000f).rw(m_tc0100scn[1], FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); + map(0x300000, 0x313fff).rw(m_tc0100scn[2], FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps (3rd screen) */ + map(0x320000, 0x32000f).rw(m_tc0100scn[2], FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0x340000, 0x340007).rw(m_tc0110pcr[0], FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (1st screen) */ map(0x350000, 0x350007).rw(m_tc0110pcr[1], FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (2nd screen) */ map(0x360000, 0x360007).rw(m_tc0110pcr[2], FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (3rd screen) */ @@ -430,7 +430,7 @@ void ninjaw_state::ninjaw_slave_map(address_map &map) map(0x200000, 0x200003).rw("tc0040ioc", FUNC(tc0040ioc_device::read), FUNC(tc0040ioc_device::write)).umask16(0x00ff); map(0x240000, 0x24ffff).ram().share("share1"); map(0x260000, 0x263fff).ram().share("spriteram"); - map(0x280000, 0x293fff).r(m_tc0100scn[0], FUNC(tc0100scn_device::word_r)).w(FUNC(ninjaw_state::tc0100scn_triple_screen_w)); /* tilemaps (1st screen/all screens) */ + map(0x280000, 0x293fff).r(m_tc0100scn[0], FUNC(tc0100scn_device::ram_r)).w(FUNC(ninjaw_state::tc0100scn_triple_screen_w)); /* tilemaps (1st screen/all screens) */ map(0x340000, 0x340007).rw(m_tc0110pcr[0], FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (1st screen) */ map(0x350000, 0x350007).rw(m_tc0110pcr[1], FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (2nd screen) */ map(0x360000, 0x360007).rw(m_tc0110pcr[2], FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (3rd screen) */ @@ -446,12 +446,12 @@ void ninjaw_state::darius2_master_map(address_map &map) map(0x220003, 0x220003).rw(m_tc0140syt, FUNC(tc0140syt_device::master_comm_r), FUNC(tc0140syt_device::master_comm_w)); map(0x240000, 0x24ffff).ram().share("share1"); map(0x260000, 0x263fff).ram().share("spriteram"); - map(0x280000, 0x293fff).r(m_tc0100scn[0], FUNC(tc0100scn_device::word_r)).w(FUNC(ninjaw_state::tc0100scn_triple_screen_w)); /* tilemaps (1st screen/all screens) */ - map(0x2a0000, 0x2a000f).rw(m_tc0100scn[0], FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); - map(0x2c0000, 0x2d3fff).rw(m_tc0100scn[1], FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps (2nd screen) */ - map(0x2e0000, 0x2e000f).rw(m_tc0100scn[1], FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); - map(0x300000, 0x313fff).rw(m_tc0100scn[2], FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps (3rd screen) */ - map(0x320000, 0x32000f).rw(m_tc0100scn[2], FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x280000, 0x293fff).r(m_tc0100scn[0], FUNC(tc0100scn_device::ram_r)).w(FUNC(ninjaw_state::tc0100scn_triple_screen_w)); /* tilemaps (1st screen/all screens) */ + map(0x2a0000, 0x2a000f).rw(m_tc0100scn[0], FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); + map(0x2c0000, 0x2d3fff).rw(m_tc0100scn[1], FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps (2nd screen) */ + map(0x2e0000, 0x2e000f).rw(m_tc0100scn[1], FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); + map(0x300000, 0x313fff).rw(m_tc0100scn[2], FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps (3rd screen) */ + map(0x320000, 0x32000f).rw(m_tc0100scn[2], FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0x340000, 0x340007).rw(m_tc0110pcr[0], FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (1st screen) */ map(0x350000, 0x350007).rw(m_tc0110pcr[1], FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (2nd screen) */ map(0x360000, 0x360007).rw(m_tc0110pcr[2], FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (3rd screen) */ @@ -464,7 +464,7 @@ void ninjaw_state::darius2_slave_map(address_map &map) map(0x200000, 0x200003).rw("tc0040ioc", FUNC(tc0040ioc_device::read), FUNC(tc0040ioc_device::write)).umask16(0x00ff); map(0x240000, 0x24ffff).ram().share("share1"); map(0x260000, 0x263fff).ram().share("spriteram"); - map(0x280000, 0x293fff).r(m_tc0100scn[0], FUNC(tc0100scn_device::word_r)).w(FUNC(ninjaw_state::tc0100scn_triple_screen_w)); /* tilemaps (1st screen/all screens) */ + map(0x280000, 0x293fff).r(m_tc0100scn[0], FUNC(tc0100scn_device::ram_r)).w(FUNC(ninjaw_state::tc0100scn_triple_screen_w)); /* tilemaps (1st screen/all screens) */ } diff --git a/src/mame/drivers/othunder.cpp b/src/mame/drivers/othunder.cpp index 2504120feb5..f6c684fedb0 100644 --- a/src/mame/drivers/othunder.cpp +++ b/src/mame/drivers/othunder.cpp @@ -411,8 +411,8 @@ void othunder_state::othunder_map(address_map &map) map(0x090000, 0x09000f).rw(m_tc0220ioc, FUNC(tc0220ioc_device::read), FUNC(tc0220ioc_device::write)).umask16(0x00ff); // AM_RANGE(0x09000c, 0x09000d) AM_WRITENOP /* ?? (keeps writing 0x77) */ map(0x100000, 0x100007).rw(m_tc0110pcr, FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_rbswap_word_w)); /* palette */ - map(0x200000, 0x20ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ - map(0x220000, 0x22000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x200000, 0x20ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ + map(0x220000, 0x22000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0x300001, 0x300001).w(m_tc0140syt, FUNC(tc0140syt_device::master_port_w)); map(0x300003, 0x300003).rw(m_tc0140syt, FUNC(tc0140syt_device::master_comm_r), FUNC(tc0140syt_device::master_comm_w)); map(0x400000, 0x4005ff).ram().share("spriteram"); diff --git a/src/mame/drivers/taito_f2.cpp b/src/mame/drivers/taito_f2.cpp index feab3c403b3..fea661d9614 100644 --- a/src/mame/drivers/taito_f2.cpp +++ b/src/mame/drivers/taito_f2.cpp @@ -638,9 +638,9 @@ void taitof2_state::finalb_map(address_map &map) map(0x300000, 0x30000f).rw(m_tc0220ioc, FUNC(tc0220ioc_device::read), FUNC(tc0220ioc_device::write)).umask16(0x00ff); map(0x320001, 0x320001).w("tc0140syt", FUNC(tc0140syt_device::master_port_w)); map(0x320003, 0x320003).rw("tc0140syt", FUNC(tc0140syt_device::master_comm_r), FUNC(tc0140syt_device::master_comm_w)); - map(0x800000, 0x80ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ + map(0x800000, 0x80ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ map(0x810000, 0x81ffff).nopw(); /* error in game init code ? */ - map(0x820000, 0x82000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x820000, 0x82000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0x900000, 0x90ffff).ram().share("spriteram"); map(0xb00002, 0xb00003).nopw(); /* ?? */ } @@ -653,8 +653,8 @@ void taitof2_state::dondokod_map(address_map &map) map(0x300000, 0x30000f).rw(m_tc0220ioc, FUNC(tc0220ioc_device::read), FUNC(tc0220ioc_device::write)).umask16(0x00ff); map(0x320000, 0x320000).w("tc0140syt", FUNC(tc0140syt_device::master_port_w)); map(0x320002, 0x320002).rw("tc0140syt", FUNC(tc0140syt_device::master_comm_r), FUNC(tc0140syt_device::master_comm_w)); - map(0x800000, 0x80ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ - map(0x820000, 0x82000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x800000, 0x80ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ + map(0x820000, 0x82000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0x900000, 0x90ffff).ram().share("spriteram"); map(0xa00000, 0xa01fff).rw(m_tc0280grd, FUNC(tc0280grd_device::tc0280grd_word_r), FUNC(tc0280grd_device::tc0280grd_word_w)); /* ROZ tilemap */ map(0xa02000, 0xa0200f).w(m_tc0280grd, FUNC(tc0280grd_device::tc0280grd_ctrl_word_w)); @@ -672,9 +672,9 @@ void taitof2_state::megab_map(address_map &map) map(0x200000, 0x20ffff).ram(); map(0x300000, 0x301fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); map(0x400000, 0x40001f).w(m_tc0360pri, FUNC(tc0360pri_device::write)).umask16(0x00ff); /* ?? */ - map(0x600000, 0x60ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ + map(0x600000, 0x60ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ map(0x610000, 0x61ffff).ram(); /* unused? */ - map(0x620000, 0x62000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x620000, 0x62000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0x800000, 0x80ffff).ram().share("spriteram"); } @@ -686,10 +686,10 @@ void taitof2_state::thundfox_map(address_map &map) map(0x220000, 0x220000).w("tc0140syt", FUNC(tc0140syt_device::master_port_w)); map(0x220002, 0x220002).rw("tc0140syt", FUNC(tc0140syt_device::master_comm_r), FUNC(tc0140syt_device::master_comm_w)); map(0x300000, 0x30ffff).ram(); - map(0x400000, 0x40ffff).rw(m_tc0100scn_1, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ - map(0x420000, 0x42000f).rw(m_tc0100scn_1, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); - map(0x500000, 0x50ffff).rw(m_tc0100scn_2, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ - map(0x520000, 0x52000f).rw(m_tc0100scn_2, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x400000, 0x40ffff).rw(m_tc0100scn_1, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ + map(0x420000, 0x42000f).rw(m_tc0100scn_1, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); + map(0x500000, 0x50ffff).rw(m_tc0100scn_2, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ + map(0x520000, 0x52000f).rw(m_tc0100scn_2, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0x600000, 0x60ffff).ram().share("spriteram"); map(0x800000, 0x80001f).w(m_tc0360pri, FUNC(tc0360pri_device::write)).umask16(0xff00); } @@ -703,8 +703,8 @@ void taitof2_state::cameltry_map(address_map &map) map(0x300018, 0x30001f).r(FUNC(taitof2_state::cameltry_paddle_r)); map(0x320000, 0x320000).w("tc0140syt", FUNC(tc0140syt_device::master_port_w)); map(0x320002, 0x320002).rw("tc0140syt", FUNC(tc0140syt_device::master_comm_r), FUNC(tc0140syt_device::master_comm_w)); - map(0x800000, 0x813fff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ - map(0x820000, 0x82000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x800000, 0x813fff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ + map(0x820000, 0x82000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0x900000, 0x90ffff).ram().share("spriteram"); map(0xa00000, 0xa01fff).rw(m_tc0280grd, FUNC(tc0280grd_device::tc0280grd_word_r), FUNC(tc0280grd_device::tc0280grd_word_w)); /* ROZ tilemap */ map(0xa02000, 0xa0200f).w(m_tc0280grd, FUNC(tc0280grd_device::tc0280grd_ctrl_word_w)); @@ -720,8 +720,8 @@ void taitof2_state::cameltrya_map(address_map &map) map(0x300018, 0x30001f).r(FUNC(taitof2_state::cameltry_paddle_r)); map(0x320000, 0x320000).w("ciu", FUNC(pc060ha_device::master_port_w)); map(0x320002, 0x320002).rw("ciu", FUNC(pc060ha_device::master_comm_r), FUNC(pc060ha_device::master_comm_w)); - map(0x800000, 0x813fff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ - map(0x820000, 0x82000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x800000, 0x813fff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ + map(0x820000, 0x82000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0x900000, 0x90ffff).ram().share("spriteram"); map(0xa00000, 0xa01fff).rw(m_tc0280grd, FUNC(tc0280grd_device::tc0280grd_word_r), FUNC(tc0280grd_device::tc0280grd_word_w)); /* ROZ tilemap */ map(0xa02000, 0xa0200f).w(m_tc0280grd, FUNC(tc0280grd_device::tc0280grd_ctrl_word_w)); @@ -736,8 +736,8 @@ void taitof2_state::qtorimon_map(address_map &map) map(0x500000, 0x50000f).rw(m_tc0220ioc, FUNC(tc0220ioc_device::read), FUNC(tc0220ioc_device::write)).umask16(0x00ff); map(0x600000, 0x600000).w("tc0140syt", FUNC(tc0140syt_device::master_port_w)); map(0x600002, 0x600002).rw("tc0140syt", FUNC(tc0140syt_device::master_comm_r), FUNC(tc0140syt_device::master_comm_w)); - map(0x800000, 0x80ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ - map(0x820000, 0x82000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x800000, 0x80ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ + map(0x820000, 0x82000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0x900000, 0x90ffff).ram().share("spriteram"); map(0x910000, 0x9120ff).nopw(); /* error in init code ? */ } @@ -750,8 +750,8 @@ void taitof2_state::liquidk_map(address_map &map) map(0x300000, 0x30000f).rw(m_tc0220ioc, FUNC(tc0220ioc_device::read), FUNC(tc0220ioc_device::write)).umask16(0x00ff); map(0x320001, 0x320001).w("tc0140syt", FUNC(tc0140syt_device::master_port_w)); map(0x320003, 0x320003).rw("tc0140syt", FUNC(tc0140syt_device::master_comm_r), FUNC(tc0140syt_device::master_comm_w)); - map(0x800000, 0x80ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ - map(0x820000, 0x82000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x800000, 0x80ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ + map(0x820000, 0x82000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0x900000, 0x90ffff).ram().share("spriteram"); map(0xb00000, 0xb0001f).w(m_tc0360pri, FUNC(tc0360pri_device::write)).umask16(0x00ff); /* ?? */ } @@ -772,9 +772,9 @@ void taitof2_state::quizhq_map(address_map &map) map(0x600001, 0x600001).w("tc0140syt", FUNC(tc0140syt_device::master_port_w)); map(0x600003, 0x600003).rw("tc0140syt", FUNC(tc0140syt_device::master_comm_r), FUNC(tc0140syt_device::master_comm_w)); map(0x680000, 0x680001).nopw(); /* ??? */ - map(0x800000, 0x80ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ + map(0x800000, 0x80ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ map(0x810000, 0x81ffff).nopw(); /* error in init code ? */ - map(0x820000, 0x82000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x820000, 0x82000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0x900000, 0x90ffff).ram().share("spriteram"); } @@ -787,8 +787,8 @@ void taitof2_state::ssi_map(address_map &map) map(0x400000, 0x400000).w("tc0140syt", FUNC(tc0140syt_device::master_port_w)); map(0x400002, 0x400002).rw("tc0140syt", FUNC(tc0140syt_device::master_comm_r), FUNC(tc0140syt_device::master_comm_w)); // AM_RANGE(0x500000, 0x500001) AM_WRITENOP /* ?? */ - map(0x600000, 0x60ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps (not used) */ - map(0x620000, 0x62000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x600000, 0x60ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps (not used) */ + map(0x620000, 0x62000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0x800000, 0x80ffff).ram().share("spriteram"); /* sprite ram */ } @@ -800,8 +800,8 @@ void taitof2_state::gunfront_map(address_map &map) map(0x300000, 0x30000f).rw(m_tc0510nio, FUNC(tc0510nio_device::halfword_wordswap_r), FUNC(tc0510nio_device::halfword_wordswap_w)); map(0x320000, 0x320000).w("tc0140syt", FUNC(tc0140syt_device::master_port_w)); map(0x320002, 0x320002).rw("tc0140syt", FUNC(tc0140syt_device::master_comm_r), FUNC(tc0140syt_device::master_comm_w)); - map(0x800000, 0x80ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ - map(0x820000, 0x82000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x800000, 0x80ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ + map(0x820000, 0x82000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0x900000, 0x90ffff).ram().share("spriteram"); // AM_RANGE(0xa00000, 0xa00001) AM_WRITENOP /* ?? */ map(0xb00000, 0xb0001f).w(m_tc0360pri, FUNC(tc0360pri_device::write)).umask16(0x00ff); /* ?? */ @@ -825,8 +825,8 @@ void taitof2_state::growl_map(address_map &map) map(0x504000, 0x504001).nopw(); /* unknown... various values */ map(0x508000, 0x50800f).portr("IN3"); map(0x50c000, 0x50c00f).portr("IN4"); - map(0x800000, 0x80ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ - map(0x820000, 0x82000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x800000, 0x80ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ + map(0x820000, 0x82000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0x900000, 0x90ffff).ram().share("spriteram"); map(0xb00000, 0xb0001f).w(m_tc0360pri, FUNC(tc0360pri_device::write)).umask16(0x00ff); /* ?? */ } @@ -844,9 +844,9 @@ void taitof2_state::mjnquest_map(address_map &map) map(0x350000, 0x350001).nopw(); /* watchdog ? */ map(0x360000, 0x360000).w("tc0140syt", FUNC(tc0140syt_device::master_port_w)); map(0x360002, 0x360002).rw("tc0140syt", FUNC(tc0140syt_device::master_comm_r), FUNC(tc0140syt_device::master_comm_w)); - map(0x380000, 0x380001).w(m_tc0100scn, FUNC(tc0100scn_device::gfxbank_w)); /* scr gfx bank select */ - map(0x400000, 0x40ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ - map(0x420000, 0x42000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x380001, 0x380001).w(FUNC(taitof2_state::mjnquest_gfxbank_w)); /* scr gfx bank select */ + map(0x400000, 0x40ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ + map(0x420000, 0x42000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0x500000, 0x50ffff).ram().share("spriteram"); } @@ -874,8 +874,8 @@ void taitof2_state::koshien_map(address_map &map) map(0x300000, 0x30000f).rw(m_tc0510nio, FUNC(tc0510nio_device::halfword_r), FUNC(tc0510nio_device::halfword_w)); map(0x320000, 0x320000).w("tc0140syt", FUNC(tc0140syt_device::master_port_w)); map(0x320002, 0x320002).rw("tc0140syt", FUNC(tc0140syt_device::master_comm_r), FUNC(tc0140syt_device::master_comm_w)); - map(0x800000, 0x80ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ - map(0x820000, 0x82000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x800000, 0x80ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ + map(0x820000, 0x82000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0x900000, 0x90ffff).ram().share("spriteram"); map(0xa20000, 0xa20001).w(FUNC(taitof2_state::koshien_spritebank_w)); map(0xb00000, 0xb0001f).w(m_tc0360pri, FUNC(tc0360pri_device::write)).umask16(0xff00); @@ -887,8 +887,8 @@ void taitof2_state::yuyugogo_map(address_map &map) map(0x200000, 0x20000f).rw(m_tc0510nio, FUNC(tc0510nio_device::halfword_r), FUNC(tc0510nio_device::halfword_w)); map(0x400000, 0x400000).w("tc0140syt", FUNC(tc0140syt_device::master_port_w)); map(0x400002, 0x400002).rw("tc0140syt", FUNC(tc0140syt_device::master_comm_r), FUNC(tc0140syt_device::master_comm_w)); - map(0x800000, 0x80ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ - map(0x820000, 0x82000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x800000, 0x80ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ + map(0x820000, 0x82000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0x900000, 0x90ffff).ram().share("spriteram"); map(0xa00000, 0xa01fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); map(0xb00000, 0xb10fff).ram(); /* deliberate writes to $b10xxx, I think */ @@ -906,8 +906,8 @@ void taitof2_state::ninjak_map(address_map &map) map(0x400000, 0x400000).w("tc0140syt", FUNC(tc0140syt_device::master_port_w)); map(0x400002, 0x400002).rw("tc0140syt", FUNC(tc0140syt_device::master_comm_r), FUNC(tc0140syt_device::master_comm_w)); map(0x600000, 0x60000f).w(FUNC(taitof2_state::taitof2_spritebank_w)); - map(0x800000, 0x80ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ - map(0x820000, 0x82000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x800000, 0x80ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ + map(0x820000, 0x82000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0x900000, 0x90ffff).ram().share("spriteram"); map(0xb00000, 0xb0001f).w(m_tc0360pri, FUNC(tc0360pri_device::write)).umask16(0x00ff); /* b00002 written like a watchdog?! */ } @@ -928,8 +928,8 @@ void taitof2_state::solfigtr_map(address_map &map) map(0x400002, 0x400002).rw("tc0140syt", FUNC(tc0140syt_device::master_comm_r), FUNC(tc0140syt_device::master_comm_w)); map(0x500000, 0x50000f).w(FUNC(taitof2_state::taitof2_spritebank_w)); map(0x504000, 0x504001).nopw(); /* unknown... various values */ - map(0x800000, 0x80ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ - map(0x820000, 0x82000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x800000, 0x80ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ + map(0x820000, 0x82000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0x900000, 0x90ffff).ram().share("spriteram"); map(0xb00000, 0xb0001f).w(m_tc0360pri, FUNC(tc0360pri_device::write)).umask16(0x00ff); /* ?? */ } @@ -943,8 +943,8 @@ void taitof2_state::qzquest_map(address_map &map) map(0x400000, 0x401fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); map(0x500000, 0x50ffff).ram(); map(0x600000, 0x60ffff).ram().share("spriteram"); - map(0x700000, 0x70ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ - map(0x720000, 0x72000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x700000, 0x70ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ + map(0x720000, 0x72000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); } void taitof2_state::pulirula_map(address_map &map) @@ -958,8 +958,8 @@ void taitof2_state::pulirula_map(address_map &map) // AM_RANGE(0x500000, 0x500001) AM_WRITENOP /* ??? */ map(0x600000, 0x603fff).w(FUNC(taitof2_state::taitof2_sprite_extension_w)).share("sprite_ext"); map(0x700000, 0x701fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); - map(0x800000, 0x80ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ - map(0x820000, 0x82000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x800000, 0x80ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ + map(0x820000, 0x82000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0x900000, 0x90ffff).ram().share("spriteram"); map(0xa00000, 0xa0001f).w(m_tc0360pri, FUNC(tc0360pri_device::write)).umask16(0xff00); map(0xb00000, 0xb0000f).rw(m_tc0510nio, FUNC(tc0510nio_device::halfword_r), FUNC(tc0510nio_device::halfword_w)); @@ -990,8 +990,8 @@ void taitof2_state::qzchikyu_map(address_map &map) map(0x400000, 0x401fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); map(0x500000, 0x50ffff).ram(); map(0x600000, 0x60ffff).ram().share("spriteram"); - map(0x700000, 0x70ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ - map(0x720000, 0x72000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x700000, 0x70ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ + map(0x720000, 0x72000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); } void taitof2_state::yesnoj_map(address_map &map) @@ -999,8 +999,8 @@ void taitof2_state::yesnoj_map(address_map &map) map(0x000000, 0x07ffff).rom(); map(0x200000, 0x20ffff).ram(); map(0x400000, 0x40ffff).ram().share("spriteram"); - map(0x500000, 0x50ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ - map(0x520000, 0x52000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x500000, 0x50ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ + map(0x520000, 0x52000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0x600000, 0x601fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); map(0x700000, 0x70001f).rw("rtc", FUNC(tc8521_device::read), FUNC(tc8521_device::write)).umask16(0x00ff); map(0x800000, 0x800000).w("tc0140syt", FUNC(tc0140syt_device::master_port_w)); @@ -1040,8 +1040,8 @@ void taitof2_state::dinorex_map(address_map &map) map(0x600000, 0x60ffff).ram(); map(0x700000, 0x70001f).w(m_tc0360pri, FUNC(tc0360pri_device::write)).umask16(0x00ff); /* ?? */ map(0x800000, 0x80ffff).ram().share("spriteram"); - map(0x900000, 0x90ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ - map(0x920000, 0x92000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x900000, 0x90ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ + map(0x920000, 0x92000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0xa00000, 0xa00000).w("tc0140syt", FUNC(tc0140syt_device::master_port_w)); map(0xa00002, 0xa00002).rw("tc0140syt", FUNC(tc0140syt_device::master_comm_r), FUNC(tc0140syt_device::master_comm_w)); map(0xb00000, 0xb00001).nopw(); /* watchdog? */ @@ -1056,8 +1056,8 @@ void taitof2_state::qjinsei_map(address_map &map) map(0x500000, 0x500001).nopw(); /* watchdog ? */ map(0x600000, 0x603fff).w(FUNC(taitof2_state::taitof2_sprite_extension_w)).share("sprite_ext"); map(0x700000, 0x701fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); - map(0x800000, 0x80ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ - map(0x820000, 0x82000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x800000, 0x80ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ + map(0x820000, 0x82000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0x900000, 0x90ffff).ram().share("spriteram"); map(0xa00000, 0xa0001f).w(m_tc0360pri, FUNC(tc0360pri_device::write)).umask16(0x00ff); /* ?? */ map(0xb00000, 0xb0000f).rw(m_tc0510nio, FUNC(tc0510nio_device::halfword_r), FUNC(tc0510nio_device::halfword_w)); @@ -1074,8 +1074,8 @@ void taitof2_state::qcrayon_map(address_map &map) map(0x600000, 0x603fff).w(FUNC(taitof2_state::taitof2_sprite_extension_w)).share("sprite_ext"); map(0x700000, 0x701fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); map(0x800000, 0x80ffff).ram().share("spriteram"); - map(0x900000, 0x90ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ - map(0x920000, 0x92000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x900000, 0x90ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ + map(0x920000, 0x92000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0xa00000, 0xa0000f).rw(m_tc0510nio, FUNC(tc0510nio_device::halfword_r), FUNC(tc0510nio_device::halfword_w)); map(0xb00000, 0xb0001f).w(m_tc0360pri, FUNC(tc0360pri_device::write)).umask16(0x00ff); /* ?? */ } @@ -1086,8 +1086,8 @@ void taitof2_state::qcrayon2_map(address_map &map) map(0x200000, 0x20ffff).ram(); map(0x300000, 0x301fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); map(0x400000, 0x40ffff).ram().share("spriteram"); - map(0x500000, 0x50ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ - map(0x520000, 0x52000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x500000, 0x50ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ + map(0x520000, 0x52000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0x600000, 0x67ffff).rom().region("extra", 0); /* extra data rom */ map(0x700000, 0x70000f).rw(m_tc0510nio, FUNC(tc0510nio_device::halfword_r), FUNC(tc0510nio_device::halfword_w)); map(0x900000, 0x90001f).w(m_tc0360pri, FUNC(tc0360pri_device::write)).umask16(0x00ff); /* ?? */ @@ -1105,8 +1105,8 @@ void taitof2_state::driftout_map(address_map &map) map(0x400000, 0x401fff).rw(m_tc0430grw, FUNC(tc0280grd_device::tc0430grw_word_r), FUNC(tc0280grd_device::tc0430grw_word_w)); /* ROZ tilemap */ map(0x402000, 0x40200f).w(m_tc0430grw, FUNC(tc0280grd_device::tc0430grw_ctrl_word_w)); map(0x700000, 0x701fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); - map(0x800000, 0x80ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ - map(0x820000, 0x82000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x800000, 0x80ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ + map(0x820000, 0x82000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0x900000, 0x90ffff).ram().share("spriteram"); map(0xa00000, 0xa0001f).w(m_tc0360pri, FUNC(tc0360pri_device::write)).umask16(0xff00); map(0xb00000, 0xb0000f).rw(m_tc0510nio, FUNC(tc0510nio_device::halfword_r), FUNC(tc0510nio_device::halfword_w)); @@ -1123,8 +1123,8 @@ void taitof2_state::driveout_map(address_map &map) map(0x400000, 0x401fff).rw(m_tc0430grw, FUNC(tc0280grd_device::tc0430grw_word_r), FUNC(tc0280grd_device::tc0430grw_word_w)); /* ROZ tilemap */ map(0x402000, 0x40200f).w(m_tc0430grw, FUNC(tc0280grd_device::tc0430grw_ctrl_word_w)); map(0x700000, 0x701fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); - map(0x800000, 0x80ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ - map(0x820000, 0x82000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x800000, 0x80ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ + map(0x820000, 0x82000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0x900000, 0x90ffff).ram().share("spriteram"); map(0xa00000, 0xa0001f).w(m_tc0360pri, FUNC(tc0360pri_device::write)).umask16(0xff00); map(0xb00000, 0xb0000f).rw(m_tc0510nio, FUNC(tc0510nio_device::halfword_r), FUNC(tc0510nio_device::halfword_w)); @@ -3223,6 +3223,7 @@ void taitof2_state::mjnquest(machine_config &config) m_tc0100scn->set_tx_region(2); m_tc0100scn->set_gfxdecode_tag(m_gfxdecode); m_tc0100scn->set_palette_tag(m_palette); + m_tc0100scn->set_tile_callback(FUNC(taitof2_state::mjnquest_tmap_cb), this); TC0110PCR(config, m_tc0110pcr, 0, m_palette); } diff --git a/src/mame/drivers/taito_z.cpp b/src/mame/drivers/taito_z.cpp index 133ad12c2fb..7f86e225126 100644 --- a/src/mame/drivers/taito_z.cpp +++ b/src/mame/drivers/taito_z.cpp @@ -1616,8 +1616,8 @@ void taitoz_state::contcirc_map(address_map &map) map(0x084000, 0x087fff).ram().share("share1"); map(0x090000, 0x090001).w(FUNC(taitoz_state::contcirc_out_w)); /* road palette bank, sub CPU reset, 3d glasses control */ map(0x100000, 0x100007).rw(m_tc0110pcr, FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_rbswap_word_w)); /* palette */ - map(0x200000, 0x20ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ - map(0x220000, 0x22000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x200000, 0x20ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ + map(0x220000, 0x22000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0x300000, 0x301fff).rw(m_tc0150rod, FUNC(tc0150rod_device::word_r), FUNC(tc0150rod_device::word_w)); /* "root ram" */ map(0x400000, 0x4006ff).ram().share("spriteram"); } @@ -1646,8 +1646,8 @@ void taitoz_state::chasehq_map(address_map &map) map(0x820001, 0x820001).w(m_tc0140syt, FUNC(tc0140syt_device::master_port_w)); map(0x820003, 0x820003).rw(m_tc0140syt, FUNC(tc0140syt_device::master_comm_r), FUNC(tc0140syt_device::master_comm_w)); map(0xa00000, 0xa00007).rw(m_tc0110pcr, FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette */ - map(0xc00000, 0xc0ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ - map(0xc20000, 0xc2000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0xc00000, 0xc0ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ + map(0xc20000, 0xc2000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0xd00000, 0xd007ff).ram().share("spriteram"); map(0xe00000, 0xe003ff).rw(FUNC(taitoz_state::chasehq_motor_r), FUNC(taitoz_state::chasehq_motor_w)); /* motor cpu */ } @@ -1670,8 +1670,8 @@ void taitoz_state::enforce_map(address_map &map) map(0x300000, 0x3006ff).ram().share("spriteram"); map(0x400000, 0x401fff).rw(m_tc0150rod, FUNC(tc0150rod_device::word_r), FUNC(tc0150rod_device::word_w)); /* "root ram" ??? */ map(0x500000, 0x500007).rw(m_tc0110pcr, FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_rbswap_word_w)); /* palette */ - map(0x600000, 0x60ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ - map(0x620000, 0x62000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x600000, 0x60ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ + map(0x620000, 0x62000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); } void taitoz_state::enforce_cpub_map(address_map &map) @@ -1695,8 +1695,8 @@ void taitoz_state::bshark_map(address_map &map) map(0x800000, 0x80000f).rw("adc", FUNC(adc0808_device::data_r), FUNC(adc0808_device::address_offset_start_w)).umask16(0x00ff); map(0xa00000, 0xa01fff).ram().w("palette", FUNC(palette_device::write16)).share("palette"); map(0xc00000, 0xc00fff).ram().share("spriteram"); - map(0xd00000, 0xd0ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ - map(0xd20000, 0xd2000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0xd00000, 0xd0ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ + map(0xd20000, 0xd2000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); } void taitoz_state::bsharkjjs_map(address_map &map) @@ -1709,8 +1709,8 @@ void taitoz_state::bsharkjjs_map(address_map &map) // map(0x800000, 0x80000f) // No analog stick, this is the Joystick version map(0xa00000, 0xa01fff).ram().w("palette", FUNC(palette_device::write16)).share("palette"); map(0xc00000, 0xc00fff).ram().share("spriteram"); - map(0xd00000, 0xd0ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ - map(0xd20000, 0xd2000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0xd00000, 0xd0ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ + map(0xd20000, 0xd2000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); } void taitoz_state::bshark_cpub_map(address_map &map) @@ -1739,8 +1739,8 @@ void taitoz_state::sci_map(address_map &map) map(0x420001, 0x420001).w(m_tc0140syt, FUNC(tc0140syt_device::master_port_w)); map(0x420003, 0x420003).rw(m_tc0140syt, FUNC(tc0140syt_device::master_comm_r), FUNC(tc0140syt_device::master_comm_w)); map(0x800000, 0x801fff).ram().w("palette", FUNC(palette_device::write16)).share("palette"); - map(0xa00000, 0xa0ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ - map(0xa20000, 0xa2000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0xa00000, 0xa0ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ + map(0xa20000, 0xa2000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0xc00000, 0xc03fff).ram().share("spriteram"); map(0xc08000, 0xc08001).rw(FUNC(taitoz_state::sci_spriteframe_r), FUNC(taitoz_state::sci_spriteframe_w)); } @@ -1764,8 +1764,8 @@ void taitoz_state::nightstr_map(address_map &map) map(0x820001, 0x820001).w(m_tc0140syt, FUNC(tc0140syt_device::master_port_w)); map(0x820003, 0x820003).rw(m_tc0140syt, FUNC(tc0140syt_device::master_comm_r), FUNC(tc0140syt_device::master_comm_w)); map(0xa00000, 0xa00007).rw(m_tc0110pcr, FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette */ - map(0xc00000, 0xc0ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ - map(0xc20000, 0xc2000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0xc00000, 0xc0ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ + map(0xc20000, 0xc2000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0xd00000, 0xd007ff).ram().share("spriteram"); map(0xe00000, 0xe00011).w(FUNC(taitoz_state::nightstr_motor_w)); /* Motor outputs */ map(0xe40000, 0xe4000f).rw("adc", FUNC(adc0808_device::data_r), FUNC(adc0808_device::address_offset_start_w)).umask16(0x00ff); @@ -1788,8 +1788,8 @@ void taitoz_state::aquajack_map(address_map &map) map(0x200000, 0x200001).w(FUNC(taitoz_state::cpua_ctrl_w)); // not needed, but it's probably like the others map(0x300000, 0x300007).rw(m_tc0110pcr, FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette */ map(0x800000, 0x801fff).rw(m_tc0150rod, FUNC(tc0150rod_device::word_r), FUNC(tc0150rod_device::word_w)); - map(0xa00000, 0xa0ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ - map(0xa20000, 0xa2000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0xa00000, 0xa0ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ + map(0xa20000, 0xa2000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0xc40000, 0xc403ff).ram().share("spriteram"); } @@ -1813,8 +1813,8 @@ void taitoz_state::spacegun_map(address_map &map) map(0x30c000, 0x30ffff).ram(); map(0x310000, 0x31ffff).ram().share("share1"); map(0x500000, 0x5005ff).ram().share("spriteram"); - map(0x900000, 0x90ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ - map(0x920000, 0x92000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x900000, 0x90ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ + map(0x920000, 0x92000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0xb00000, 0xb00007).rw(m_tc0110pcr, FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_rbswap_word_w)); /* palette */ } diff --git a/src/mame/drivers/undrfire.cpp b/src/mame/drivers/undrfire.cpp index e46d25f884a..61c2bb1a7f2 100644 --- a/src/mame/drivers/undrfire.cpp +++ b/src/mame/drivers/undrfire.cpp @@ -354,8 +354,8 @@ void undrfire_state::undrfire_map(address_map &map) map(0x700000, 0x7007ff).rw("taito_en:dpram", FUNC(mb8421_device::left_r), FUNC(mb8421_device::left_w)); map(0x800000, 0x80ffff).rw(m_tc0480scp, FUNC(tc0480scp_device::ram_r), FUNC(tc0480scp_device::ram_w)); /* tilemaps */ map(0x830000, 0x83002f).rw(m_tc0480scp, FUNC(tc0480scp_device::ctrl_r), FUNC(tc0480scp_device::ctrl_w)); - map(0x900000, 0x90ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::long_r), FUNC(tc0100scn_device::long_w)); /* 6bpp tilemaps */ - map(0x920000, 0x92000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_long_r), FUNC(tc0100scn_device::ctrl_long_w)); + map(0x900000, 0x90ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* 6bpp tilemaps */ + map(0x920000, 0x92000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0xa00000, 0xa0ffff).ram().w(m_palette, FUNC(palette_device::write32)).share("palette"); map(0xb00000, 0xb003ff).ram(); /* single bytes, blending ??? */ map(0xd00000, 0xd00003).w(FUNC(undrfire_state::rotate_control_w)); /* perhaps port based rotate control? */ @@ -374,8 +374,8 @@ void undrfire_state::cbombers_cpua_map(address_map &map) map(0x700000, 0x7007ff).rw("taito_en:dpram", FUNC(mb8421_device::left_r), FUNC(mb8421_device::left_w)); map(0x800000, 0x80ffff).rw(m_tc0480scp, FUNC(tc0480scp_device::ram_r), FUNC(tc0480scp_device::ram_w)); /* tilemaps */ map(0x830000, 0x83002f).rw(m_tc0480scp, FUNC(tc0480scp_device::ctrl_r), FUNC(tc0480scp_device::ctrl_w)); - map(0x900000, 0x90ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::long_r), FUNC(tc0100scn_device::long_w)); /* 6bpp tilemaps */ - map(0x920000, 0x92000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_long_r), FUNC(tc0100scn_device::ctrl_long_w)); + map(0x900000, 0x90ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* 6bpp tilemaps */ + map(0x920000, 0x92000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0xa00000, 0xa0ffff).ram().w(m_palette, FUNC(palette_device::write32)).share("palette"); map(0xb00000, 0xb0000f).ram(); /* TC0360PRI */ map(0xc00000, 0xc00007).ram(); /* LAN controller? */ diff --git a/src/mame/drivers/warriorb.cpp b/src/mame/drivers/warriorb.cpp index 562b620ad5f..2044fdd5196 100644 --- a/src/mame/drivers/warriorb.cpp +++ b/src/mame/drivers/warriorb.cpp @@ -199,8 +199,8 @@ void warriorb_state::pancontrol_w(offs_t offset, u8 data) WRITE16_MEMBER(warriorb_state::tc0100scn_dual_screen_w) { - m_tc0100scn[0]->word_w(space, offset, data, mem_mask); - m_tc0100scn[1]->word_w(space, offset, data, mem_mask); + m_tc0100scn[0]->ram_w(offset, data, mem_mask); + m_tc0100scn[1]->ram_w(offset, data, mem_mask); } /*********************************************************** @@ -211,11 +211,11 @@ void warriorb_state::darius2d_map(address_map &map) { map(0x000000, 0x0fffff).rom(); map(0x100000, 0x10ffff).ram(); /* main ram */ - map(0x200000, 0x213fff).r(m_tc0100scn[0], FUNC(tc0100scn_device::word_r)).w(FUNC(warriorb_state::tc0100scn_dual_screen_w)); /* tilemaps (all screens) */ + map(0x200000, 0x213fff).r(m_tc0100scn[0], FUNC(tc0100scn_device::ram_r)).w(FUNC(warriorb_state::tc0100scn_dual_screen_w)); /* tilemaps (all screens) */ map(0x214000, 0x2141ff).nopw(); /* error in screen clearing code ? */ - map(0x220000, 0x22000f).rw(m_tc0100scn[0], FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); - map(0x240000, 0x253fff).rw(m_tc0100scn[1], FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps (2nd screen) */ - map(0x260000, 0x26000f).rw(m_tc0100scn[1], FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x220000, 0x22000f).rw(m_tc0100scn[0], FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); + map(0x240000, 0x253fff).rw(m_tc0100scn[1], FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps (2nd screen) */ + map(0x260000, 0x26000f).rw(m_tc0100scn[1], FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0x400000, 0x400007).rw(m_tc0110pcr[0], FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (1st screen) */ map(0x420000, 0x420007).rw(m_tc0110pcr[1], FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (2nd screen) */ map(0x600000, 0x6013ff).ram().share("spriteram"); @@ -229,10 +229,10 @@ void warriorb_state::warriorb_map(address_map &map) { map(0x000000, 0x1fffff).rom(); map(0x200000, 0x213fff).ram(); - map(0x300000, 0x313fff).r(m_tc0100scn[0], FUNC(tc0100scn_device::word_r)).w(FUNC(warriorb_state::tc0100scn_dual_screen_w)); /* tilemaps (all screens) */ - map(0x320000, 0x32000f).rw(m_tc0100scn[0], FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); - map(0x340000, 0x353fff).rw(m_tc0100scn[1], FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps (2nd screen) */ - map(0x360000, 0x36000f).rw(m_tc0100scn[1], FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x300000, 0x313fff).r(m_tc0100scn[0], FUNC(tc0100scn_device::ram_r)).w(FUNC(warriorb_state::tc0100scn_dual_screen_w)); /* tilemaps (all screens) */ + map(0x320000, 0x32000f).rw(m_tc0100scn[0], FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); + map(0x340000, 0x353fff).rw(m_tc0100scn[1], FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps (2nd screen) */ + map(0x360000, 0x36000f).rw(m_tc0100scn[1], FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0x400000, 0x400007).rw(m_tc0110pcr[0], FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (1st screen) */ map(0x420000, 0x420007).rw(m_tc0110pcr[1], FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_word_w)); /* palette (2nd screen) */ map(0x600000, 0x6013ff).ram().share("spriteram"); diff --git a/src/mame/drivers/wgp.cpp b/src/mame/drivers/wgp.cpp index f8e49803b0b..f9e12bc6b52 100644 --- a/src/mame/drivers/wgp.cpp +++ b/src/mame/drivers/wgp.cpp @@ -617,8 +617,8 @@ void wgp_state::main_map(address_map &map) map(0x180000, 0x18000f).rw(m_tc0220ioc, FUNC(tc0220ioc_device::read), FUNC(tc0220ioc_device::write)).umask16(0xff00); map(0x1c0000, 0x1c0001).w(FUNC(wgp_state::cpua_ctrl_w)); map(0x200000, 0x20000f).rw(FUNC(wgp_state::adinput_r), FUNC(wgp_state::adinput_w)); - map(0x300000, 0x30ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */ - map(0x320000, 0x32000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w)); + map(0x300000, 0x30ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::ram_r), FUNC(tc0100scn_device::ram_w)); /* tilemaps */ + map(0x320000, 0x32000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_r), FUNC(tc0100scn_device::ctrl_w)); map(0x400000, 0x40bfff).ram().share("spritemap"); /* sprite tilemaps */ map(0x40c000, 0x40dfff).ram().share("spriteram"); /* sprite ram */ map(0x40fff0, 0x40fff1).nopw(); /* ?? (writes 0x8000 and 0 alternately - Wgp2 just 0) */ diff --git a/src/mame/includes/taito_f2.h b/src/mame/includes/taito_f2.h index 899ee6da7b9..52dc8146e05 100644 --- a/src/mame/includes/taito_f2.h +++ b/src/mame/includes/taito_f2.h @@ -142,6 +142,7 @@ protected: uint8_t m_spriteblendmode; // todo - move into taitoic.c int m_prepare_sprites; + uint8_t m_gfxbank; /* misc */ int32_t m_mjnquest_input; @@ -186,6 +187,8 @@ protected: DECLARE_WRITE16_MEMBER(taitof2_spritebank_w); DECLARE_WRITE16_MEMBER(koshien_spritebank_w); DECLARE_WRITE8_MEMBER(cameltrya_porta_w); + void mjnquest_gfxbank_w(u8 data); + TC0100SCN_CB_MEMBER(mjnquest_tmap_cb); DECLARE_MACHINE_START(f2); DECLARE_VIDEO_START(taitof2_default); diff --git a/src/mame/video/groundfx.cpp b/src/mame/video/groundfx.cpp index 6c238525507..bf956f6913c 100644 --- a/src/mame/video/groundfx.cpp +++ b/src/mame/video/groundfx.cpp @@ -198,7 +198,6 @@ void groundfx_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap,co uint32_t groundfx_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - address_space &space = machine().dummy_space(); uint8_t layer[5]; uint8_t scclayer[3]; uint16_t priority; @@ -240,7 +239,7 @@ uint32_t groundfx_state::screen_update(screen_device &screen, bitmap_ind16 &bitm it's contents the usual way. */ - if (m_tc0100scn->long_r(space, 0x4090 / 4, 0xffffffff) || + if (m_tc0100scn->ram_r(0x4090 / 2) || m_tc0100scn->ram_r(0x4092 / 2) || ((m_tc0480scp->ram_r(0x20 / 2) == 0x24) && (m_tc0480scp->ram_r(0x22 / 2) == 0x0866))) /* Anything in text layer - really stupid hack */ { m_tc0480scp->tilemap_draw(screen, bitmap, cliprect, layer[1], 0, 2); diff --git a/src/mame/video/taito_f2.cpp b/src/mame/video/taito_f2.cpp index 730500fb725..3589d96f804 100644 --- a/src/mame/video/taito_f2.cpp +++ b/src/mame/video/taito_f2.cpp @@ -28,6 +28,20 @@ enum /***********************************************************************************/ +TC0100SCN_CB_MEMBER(taitof2_state::mjnquest_tmap_cb) +{ + *code = (*code & 0x7fff) | (m_gfxbank << 15); +} + +void taitof2_state::mjnquest_gfxbank_w(u8 data) +{ + if ((data ^ m_gfxbank) & 1) + { + m_gfxbank = data & 1; + m_tc0100scn->tilemap_set_dirty(); + } +} + void taitof2_state::taitof2_core_vh_start (int sprite_type, int hide, int flip_hide ) { int i; @@ -139,8 +153,6 @@ VIDEO_START_MEMBER(taitof2_state,taitof2_thundfox) VIDEO_START_MEMBER(taitof2_state,taitof2_mjnquest) { taitof2_core_vh_start(0, 0, 0); - - m_tc0100scn->set_bg_tilemask(0x7fff); } VIDEO_START_MEMBER(taitof2_state,taitof2_footchmp) @@ -208,7 +220,6 @@ VIDEO_START_MEMBER(taitof2_state,taitof2_driftout) taitof2_core_vh_start(0, 3, 3); } - /******************************************************** SPRITE READ AND WRITE HANDLERS diff --git a/src/mame/video/tc0100scn.cpp b/src/mame/video/tc0100scn.cpp index 6016594f76a..6c8d8000def 100644 --- a/src/mame/video/tc0100scn.cpp +++ b/src/mame/video/tc0100scn.cpp @@ -149,7 +149,7 @@ the wide tilemap mode) DEFINE_DEVICE_TYPE(TC0100SCN, tc0100scn_device, "tc0100scn", "Taito TC0100SCN") -tc0100scn_device::tc0100scn_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tc0100scn_device::tc0100scn_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, TC0100SCN, tag, owner, clock), m_ram(nullptr), m_bg_ram(nullptr), @@ -163,12 +163,11 @@ tc0100scn_device::tc0100scn_device(const machine_config &mconfig, const char *ta m_bgscrolly(0), m_fgscrollx(0), m_fgscrolly(0), - m_bg_tilemask(0), - m_gfxbank(0), m_bg0_colbank(0), m_bg1_colbank(0), m_tx_colbank(0), m_dblwidth(0), + m_dirty(false), m_gfxnum(0), m_txnum(0), m_x_offset(0), @@ -190,6 +189,9 @@ tc0100scn_device::tc0100scn_device(const machine_config &mconfig, const char *ta void tc0100scn_device::device_start() { + // bind callbacks + m_tc0100scn_cb.bind_relative_to(*owner()); + static const gfx_layout tc0100scn_charlayout = { 8,8, /* 8*8 characters */ @@ -263,14 +265,12 @@ void tc0100scn_device::device_start() m_tilemap[0][1]->set_scroll_rows(512); m_tilemap[1][1]->set_scroll_rows(512); - m_bg_tilemask = 0xffff; /* Mjnquest has 0x7fff tilemask */ - - m_ram = make_unique_clear<uint16_t[]>(TC0100SCN_RAM_SIZE / 2); + m_ram = make_unique_clear<u16[]>(TC0100SCN_RAM_SIZE / 2); set_layer_ptrs(); /* create the char set (gfx will then be updated dynamically from RAM) */ - m_gfxdecode->set_gfx(m_txnum, std::make_unique<gfx_element>(m_palette, tc0100scn_charlayout, (uint8_t *)m_char_ram, NATIVE_ENDIAN_VALUE_LE_BE(8,0), 256, 0)); + m_gfxdecode->set_gfx(m_txnum, std::make_unique<gfx_element>(m_palette, tc0100scn_charlayout, (u8 *)m_char_ram, NATIVE_ENDIAN_VALUE_LE_BE(8,0), 256, 0)); gfx_element *gfx = m_gfxdecode->gfx(m_gfxnum); gfx_element *txt = m_gfxdecode->gfx(m_txnum); @@ -286,7 +286,6 @@ void tc0100scn_device::device_start() save_pointer(NAME(m_ram), TC0100SCN_RAM_SIZE / 2); save_item(NAME(m_ctrl)); save_item(NAME(m_dblwidth)); - save_item(NAME(m_gfxbank)); } //------------------------------------------------- @@ -296,7 +295,6 @@ void tc0100scn_device::device_start() void tc0100scn_device::device_reset() { m_dblwidth = 0; - m_gfxbank = 0; /* Mjnquest uniquely banks tiles */ for (auto & elem : m_ctrl) elem = 0; @@ -307,21 +305,15 @@ void tc0100scn_device::device_reset() DEVICE HANDLERS *****************************************************************************/ -void tc0100scn_device::common_get_tile_info( tile_data &tileinfo, int tile_index, uint16_t *ram, int colbank ) +void tc0100scn_device::common_get_tile_info( tile_data &tileinfo, int tile_index, u16 *ram, int colbank ) { - int code, attr; + u32 code = ram[2 * tile_index + 1]; + const u16 attr = ram[2 * tile_index]; + u16 color = attr & 0xff; - if (!m_dblwidth) - { - /* Mahjong Quest (F2 system) inexplicably has a banking feature */ - code = (ram[2 * tile_index + 1] & m_bg_tilemask) + (m_gfxbank << 15); - attr = ram[2 * tile_index]; - } - else - { - code = ram[2 * tile_index + 1] & m_bg_tilemask; - attr = ram[2 * tile_index]; - } + /* Mahjong Quest (F2 system) inexplicably has a banking feature */ + if (!m_tc0100scn_cb.isnull()) + m_tc0100scn_cb(&code, &color); SET_TILE_INFO_MEMBER(m_gfxnum, code, @@ -356,14 +348,10 @@ void tc0100scn_device::set_colbanks( int bg0, int bg1, int tx ) m_tx_colbank = tx; } -void tc0100scn_device::set_bg_tilemask( int mask ) +void tc0100scn_device::tilemap_set_dirty() { - m_bg_tilemask = mask; -} - -WRITE16_MEMBER( tc0100scn_device::gfxbank_w ) /* Mjnquest banks its 2 sets of scr tiles */ -{ - m_gfxbank = (data & 0x1); + if (!m_dirty) + m_dirty = true; } void tc0100scn_device::set_layer_ptrs() @@ -429,7 +417,7 @@ void tc0100scn_device::device_post_load() set_layer_ptrs(); restore_scroll(); - m_gfxdecode->gfx(m_txnum)->set_source((uint8_t *)m_char_ram); + m_gfxdecode->gfx(m_txnum)->set_source((u8 *)m_char_ram); m_tilemap[0][0]->mark_all_dirty(); m_tilemap[1][0]->mark_all_dirty(); @@ -439,12 +427,12 @@ void tc0100scn_device::device_post_load() m_tilemap[2][1]->mark_all_dirty(); } -READ16_MEMBER( tc0100scn_device::word_r ) +u16 tc0100scn_device::ram_r(offs_t offset) { return m_ram[offset]; } -WRITE16_MEMBER( tc0100scn_device::word_w ) +void tc0100scn_device::ram_w(offs_t offset, u16 data, u16 mem_mask) { COMBINE_DATA(&m_ram[offset]); if (!m_dblwidth) @@ -471,12 +459,12 @@ WRITE16_MEMBER( tc0100scn_device::word_w ) } } -READ16_MEMBER( tc0100scn_device::ctrl_word_r ) +u16 tc0100scn_device::ctrl_r(offs_t offset) { return m_ctrl[offset]; } -WRITE16_MEMBER( tc0100scn_device::ctrl_word_w ) +void tc0100scn_device::ctrl_w(offs_t offset, u16 data, u16 mem_mask) { COMBINE_DATA(&m_ctrl[offset]); @@ -524,7 +512,7 @@ WRITE16_MEMBER( tc0100scn_device::ctrl_word_w ) dirty_tilemaps(); /* reset the pointer to the text characters (and dirty them all) */ - m_gfxdecode->gfx(m_txnum)->set_source((uint8_t *)m_char_ram); + m_gfxdecode->gfx(m_txnum)->set_source((u8 *)m_char_ram); } break; @@ -547,51 +535,20 @@ WRITE16_MEMBER( tc0100scn_device::ctrl_word_w ) } -READ32_MEMBER( tc0100scn_device::ctrl_long_r ) -{ - return (ctrl_word_r(space, offset * 2, 0xffff) << 16) | ctrl_word_r(space, offset * 2 + 1, 0xffff); -} - -WRITE32_MEMBER( tc0100scn_device::ctrl_long_w ) -{ - if (ACCESSING_BITS_16_31) - ctrl_word_w(space, offset * 2, data >> 16, mem_mask >> 16); - if (ACCESSING_BITS_0_15) - ctrl_word_w(space, (offset * 2) + 1, data & 0xffff, mem_mask & 0xffff); -} - -READ32_MEMBER( tc0100scn_device::long_r ) -{ - return (word_r(space, offset * 2, 0xffff) << 16) | word_r(space, offset * 2 + 1, 0xffff); -} - -WRITE32_MEMBER( tc0100scn_device::long_w ) +void tc0100scn_device::tilemap_update() { - if (ACCESSING_BITS_16_31) - { - int oldword = word_r(space, offset * 2, 0xffff); - int newword = data >> 16; - if (!ACCESSING_BITS_16_23) - newword |= (oldword & 0x00ff); - if (!ACCESSING_BITS_24_31) - newword |= (oldword & 0xff00); - word_w(space, offset * 2, newword, 0xffff); - } - if (ACCESSING_BITS_0_15) + if (m_dirty) { - int oldword = word_r(space, (offset * 2) + 1, 0xffff); - int newword = data& 0xffff; - if (!ACCESSING_BITS_0_7) - newword |= (oldword & 0x00ff); - if (!ACCESSING_BITS_8_15) - newword |= (oldword & 0xff00); - word_w(space, (offset * 2) + 1, newword, 0xffff); + for (int i = 0; i < 2; i++) + { + for (int j = 0; j < 2; j++) + { + m_tilemap[i][j]->mark_all_dirty(); + } + } + m_dirty = false; } -} - -void tc0100scn_device::tilemap_update() -{ int j; m_tilemap[0][m_dblwidth]->set_scrolly(0, m_bgscrolly); @@ -603,7 +560,7 @@ void tc0100scn_device::tilemap_update() m_tilemap[1][m_dblwidth]->set_scrollx((j + m_fgscrolly) & 0x1ff, m_fgscrollx - m_fgscroll_ram[j]); } -void tc0100scn_device::tilemap_draw_fg( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, tilemap_t* tmap, int flags, uint32_t priority ) +void tc0100scn_device::tilemap_draw_fg( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, tilemap_t* tmap, int flags, u32 priority, u8 pmask ) { const bitmap_ind16 &src_bitmap = tmap->pixmap(); int width_mask, height_mask, x, y, p; @@ -638,8 +595,8 @@ void tc0100scn_device::tilemap_draw_fg( screen_device &screen, bitmap_ind16 &bit bitmap.pix16(y, x + cliprect.min_x) = p; if (screen.priority().valid()) { - uint8_t *pri = &screen.priority().pix8(y); - pri[x + cliprect.min_x] |= priority; + u8 *pri = &screen.priority().pix8(y); + pri[x + cliprect.min_x] = (pri[x + cliprect.min_x] & pmask) | priority; } } src_x = (src_x + 1) & width_mask; @@ -648,7 +605,7 @@ void tc0100scn_device::tilemap_draw_fg( screen_device &screen, bitmap_ind16 &bit } } -int tc0100scn_device::tilemap_draw( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int layer, int flags, uint32_t priority ) +int tc0100scn_device::tilemap_draw( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int layer, int flags, u32 priority, u8 pmask ) { int disable = m_ctrl[6] & 0xf7; rectangle clip = cliprect; @@ -664,17 +621,17 @@ if (disable != 0 && disable != 3 && disable != 7) case 0: if (disable & 0x01) return 1; - m_tilemap[0][m_dblwidth]->draw(screen, bitmap, clip, flags, priority); + m_tilemap[0][m_dblwidth]->draw(screen, bitmap, clip, flags, priority, pmask); break; case 1: if (disable & 0x02) return 1; - tilemap_draw_fg(screen, bitmap, clip, m_tilemap[1][m_dblwidth], flags, priority); + tilemap_draw_fg(screen, bitmap, clip, m_tilemap[1][m_dblwidth], flags, priority, pmask); break; case 2: if (disable & 0x04) return 1; - m_tilemap[2][m_dblwidth]->draw(screen, bitmap, clip, flags, priority); + m_tilemap[2][m_dblwidth]->draw(screen, bitmap, clip, flags, priority, pmask); break; } return 0; diff --git a/src/mame/video/tc0100scn.h b/src/mame/video/tc0100scn.h index 8bd82a48773..5f61ce72440 100644 --- a/src/mame/video/tc0100scn.h +++ b/src/mame/video/tc0100scn.h @@ -7,14 +7,18 @@ #include "emupal.h" +typedef device_delegate<void (u32 *code, u16 *color)> tc0100scn_cb_delegate; +#define TC0100SCN_CB_MEMBER(_name) void _name(u32 *code, u16 *color) + class tc0100scn_device : public device_t { public: - tc0100scn_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tc0100scn_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); // configuration template <typename T> void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward<T>(tag)); } template <typename T> void set_palette_tag(T &&tag) { m_palette.set_tag(std::forward<T>(tag)); } + template <typename... T> void set_tile_callback(T &&... args) { m_tc0100scn_cb = tc0100scn_cb_delegate(std::forward<T>(args)...); } void set_gfx_region(int gfxregion) { m_gfxnum = gfxregion; } void set_tx_region(int txregion) { m_txnum = txregion; } void set_multiscr_xoffs(int xoffs) { m_multiscrn_xoffs = xoffs; } @@ -41,25 +45,14 @@ public: To change from the default (0,0,0) use after calling TC0100SCN_vh_start */ void set_colbanks(int bg0, int bg1, int tx); - /* Function to set bg tilemask < 0xffff */ - void set_bg_tilemask(int mask); - - /* Function to for Mjnquest to select gfx bank */ - DECLARE_WRITE16_MEMBER(gfxbank_w); - - DECLARE_READ16_MEMBER(word_r); - DECLARE_WRITE16_MEMBER(word_w); - DECLARE_READ16_MEMBER(ctrl_word_r); - DECLARE_WRITE16_MEMBER(ctrl_word_w); - - /* Functions for use with 68020 (Under Fire) */ - DECLARE_READ32_MEMBER(long_r); - DECLARE_WRITE32_MEMBER(long_w); - DECLARE_READ32_MEMBER(ctrl_long_r); - DECLARE_WRITE32_MEMBER(ctrl_long_w); + u16 ram_r(offs_t offset); + void ram_w(offs_t offset, u16 data, u16 mem_mask = ~0); + u16 ctrl_r(offs_t offset); + void ctrl_w(offs_t offset, u16 data, u16 mem_mask = ~0); void tilemap_update(); - int tilemap_draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int layer, int flags, uint32_t priority); + int tilemap_draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int layer, int flags, u32 priority, u8 pmask = 0xff); + void tilemap_set_dirty(); /* returns 0 or 1 depending on the lowest priority tilemap set in the internal register. Use this function to draw tilemaps in the correct order. */ @@ -73,26 +66,27 @@ protected: private: // internal state - uint16_t m_ctrl[8]; + tc0100scn_cb_delegate m_tc0100scn_cb; + + u16 m_ctrl[8]; - std::unique_ptr<uint16_t[]> m_ram; - uint16_t * m_bg_ram; - uint16_t * m_fg_ram; - uint16_t * m_tx_ram; - uint16_t * m_char_ram; - uint16_t * m_bgscroll_ram; - uint16_t * m_fgscroll_ram; - uint16_t * m_colscroll_ram; + std::unique_ptr<u16[]> m_ram; + u16 * m_bg_ram; + u16 * m_fg_ram; + u16 * m_tx_ram; + u16 * m_char_ram; + u16 * m_bgscroll_ram; + u16 * m_fgscroll_ram; + u16 * m_colscroll_ram; int m_bgscrollx, m_bgscrolly, m_fgscrollx, m_fgscrolly; /* We keep two tilemaps for each of the 3 actual tilemaps: one at standard width, one double */ - tilemap_t *m_tilemap[3][2]; + tilemap_t *m_tilemap[3][2]; - int m_bg_tilemask; - int32_t m_gfxbank; - int32_t m_bg0_colbank, m_bg1_colbank, m_tx_colbank; + s32 m_bg0_colbank, m_bg1_colbank, m_tx_colbank; int m_dblwidth; + bool m_dirty; int m_gfxnum; int m_txnum; @@ -109,9 +103,9 @@ private: TILE_GET_INFO_MEMBER(get_fg_tile_info); TILE_GET_INFO_MEMBER(get_tx_tile_info); - void common_get_tile_info(tile_data &tileinfo, int tile_index, uint16_t *ram, int colbank); + void common_get_tile_info(tile_data &tileinfo, int tile_index, u16 *ram, int colbank); - void tilemap_draw_fg(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, tilemap_t* tmap, int flags, uint32_t priority); + void tilemap_draw_fg(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, tilemap_t* tmap, int flags, u32 priority, u8 pmask = 0xff); void set_layer_ptrs(); void dirty_tilemaps(); void restore_scroll(); |