diff options
Diffstat (limited to 'src/mame/drivers/deco156.cpp')
-rw-r--r-- | src/mame/drivers/deco156.cpp | 102 |
1 files changed, 51 insertions, 51 deletions
diff --git a/src/mame/drivers/deco156.cpp b/src/mame/drivers/deco156.cpp index 57c8db238c0..299811b9bea 100644 --- a/src/mame/drivers/deco156.cpp +++ b/src/mame/drivers/deco156.cpp @@ -36,7 +36,7 @@ public: deco156_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") - , m_deco_tilegen1(*this, "tilegen1") + , m_deco_tilegen(*this, "tilegen") , m_oki1(*this, "oki1") , m_oki2(*this, "oki2") , m_sprgen(*this, "spritegen") @@ -70,7 +70,7 @@ private: /* devices */ required_device<arm_cpu_device> m_maincpu; - required_device<deco16ic_device> m_deco_tilegen1; + required_device<deco16ic_device> m_deco_tilegen; optional_device<okim6295_device> m_oki1; optional_device<okim6295_device> m_oki2; optional_device<decospr_device> m_sprgen; @@ -102,11 +102,11 @@ uint32_t deco156_state::screen_update(screen_device &screen, bitmap_rgb32 &bitma screen.priority().fill(0); bitmap.fill(0); - m_deco_tilegen1->pf_update(m_pf1_rowscroll, m_pf2_rowscroll); + m_deco_tilegen->pf_update(m_pf1_rowscroll, m_pf2_rowscroll); - m_deco_tilegen1->tilemap_2_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); + m_deco_tilegen->tilemap_2_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); m_sprgen->draw_sprites(bitmap, cliprect, m_spriteram.get(), 0x800); - m_deco_tilegen1->tilemap_1_draw(screen, bitmap, cliprect, 0, 0); + m_deco_tilegen->tilemap_1_draw(screen, bitmap, cliprect, 0, 0); return 0; } @@ -145,9 +145,9 @@ void deco156_state::hvysmsh_map(address_map &map) map(0x12000c, 0x12000f).w(FUNC(deco156_state::hvysmsh_oki_0_bank_w)); map(0x140000, 0x140000).rw(m_oki1, FUNC(okim6295_device::read), FUNC(okim6295_device::write)); map(0x160000, 0x160000).rw(m_oki2, FUNC(okim6295_device::read), FUNC(okim6295_device::write)); - map(0x180000, 0x18001f).rw(m_deco_tilegen1, FUNC(deco16ic_device::pf_control_dword_r), FUNC(deco16ic_device::pf_control_dword_w)); - map(0x190000, 0x191fff).rw(m_deco_tilegen1, FUNC(deco16ic_device::pf1_data_dword_r), FUNC(deco16ic_device::pf1_data_dword_w)); - map(0x194000, 0x195fff).rw(m_deco_tilegen1, FUNC(deco16ic_device::pf2_data_dword_r), FUNC(deco16ic_device::pf2_data_dword_w)); + map(0x180000, 0x18001f).rw(m_deco_tilegen, FUNC(deco16ic_device::pf_control_dword_r), FUNC(deco16ic_device::pf_control_dword_w)); + map(0x190000, 0x191fff).rw(m_deco_tilegen, FUNC(deco16ic_device::pf1_data_dword_r), FUNC(deco16ic_device::pf1_data_dword_w)); + map(0x194000, 0x195fff).rw(m_deco_tilegen, FUNC(deco16ic_device::pf2_data_dword_r), FUNC(deco16ic_device::pf2_data_dword_w)); map(0x1a0000, 0x1a0fff).rw(FUNC(deco156_state::pf1_rowscroll_r), FUNC(deco156_state::pf1_rowscroll_w)); map(0x1a4000, 0x1a4fff).rw(FUNC(deco156_state::pf2_rowscroll_r), FUNC(deco156_state::pf2_rowscroll_w)); map(0x1c0000, 0x1c0fff).ram().w(m_palette, FUNC(palette_device::write32)).share("palette"); @@ -158,9 +158,9 @@ void deco156_state::hvysmsh_map(address_map &map) void deco156_state::wcvol95_map(address_map &map) { map(0x000000, 0x0fffff).rom(); - map(0x100000, 0x10001f).rw(m_deco_tilegen1, FUNC(deco16ic_device::pf_control_dword_r), FUNC(deco16ic_device::pf_control_dword_w)); - map(0x110000, 0x111fff).rw(m_deco_tilegen1, FUNC(deco16ic_device::pf1_data_dword_r), FUNC(deco16ic_device::pf1_data_dword_w)); - map(0x114000, 0x115fff).rw(m_deco_tilegen1, FUNC(deco16ic_device::pf2_data_dword_r), FUNC(deco16ic_device::pf2_data_dword_w)); + map(0x100000, 0x10001f).rw(m_deco_tilegen, FUNC(deco16ic_device::pf_control_dword_r), FUNC(deco16ic_device::pf_control_dword_w)); + map(0x110000, 0x111fff).rw(m_deco_tilegen, FUNC(deco16ic_device::pf1_data_dword_r), FUNC(deco16ic_device::pf1_data_dword_w)); + map(0x114000, 0x115fff).rw(m_deco_tilegen, FUNC(deco16ic_device::pf2_data_dword_r), FUNC(deco16ic_device::pf2_data_dword_w)); map(0x120000, 0x120fff).rw(FUNC(deco156_state::pf1_rowscroll_r), FUNC(deco156_state::pf1_rowscroll_w)); map(0x124000, 0x124fff).rw(FUNC(deco156_state::pf2_rowscroll_r), FUNC(deco156_state::pf2_rowscroll_w)); map(0x130000, 0x137fff).ram(); @@ -351,26 +351,26 @@ MACHINE_CONFIG_START(deco156_state::hvysmsh) MCFG_PALETTE_ADD("palette", 1024) MCFG_PALETTE_FORMAT(XBGR) - MCFG_DEVICE_ADD("tilegen1", DECO16IC, 0) - MCFG_DECO16IC_SPLIT(0) - MCFG_DECO16IC_PF1_SIZE(DECO_64x32) - MCFG_DECO16IC_PF2_SIZE(DECO_64x32) - MCFG_DECO16IC_PF1_TRANS_MASK(0x0f) - MCFG_DECO16IC_PF2_TRANS_MASK(0x0f) - MCFG_DECO16IC_PF1_COL_BANK(0x00) - MCFG_DECO16IC_PF2_COL_BANK(0x10) - MCFG_DECO16IC_PF1_COL_MASK(0x0f) - MCFG_DECO16IC_PF2_COL_MASK(0x0f) - MCFG_DECO16IC_BANK1_CB(deco156_state, bank_callback) - MCFG_DECO16IC_BANK2_CB(deco156_state, bank_callback) - MCFG_DECO16IC_PF12_8X8_BANK(0) - MCFG_DECO16IC_PF12_16X16_BANK(1) - MCFG_DECO16IC_GFXDECODE("gfxdecode") - - MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0) - MCFG_DECO_SPRITE_GFX_REGION(2) - MCFG_DECO_SPRITE_PRIORITY_CB(deco156_state, pri_callback) - MCFG_DECO_SPRITE_GFXDECODE("gfxdecode") + DECO16IC(config, m_deco_tilegen, 0); + m_deco_tilegen->set_split(0); + m_deco_tilegen->set_pf1_size(DECO_64x32); + m_deco_tilegen->set_pf2_size(DECO_64x32); + m_deco_tilegen->set_pf1_trans_mask(0x0f); + m_deco_tilegen->set_pf2_trans_mask(0x0f); + m_deco_tilegen->set_pf1_col_bank(0x00); + m_deco_tilegen->set_pf2_col_bank(0x10); + m_deco_tilegen->set_pf1_col_mask(0x0f); + m_deco_tilegen->set_pf2_col_mask(0x0f); + m_deco_tilegen->set_bank1_callback(FUNC(deco156_state::bank_callback), this); + m_deco_tilegen->set_bank2_callback(FUNC(deco156_state::bank_callback), this); + m_deco_tilegen->set_pf12_8x8_bank(0); + m_deco_tilegen->set_pf12_16x16_bank(1); + m_deco_tilegen->set_gfxdecode_tag("gfxdecode"); + + DECO_SPRITE(config, m_sprgen, 0); + m_sprgen->set_gfx_region(2); + m_sprgen->set_pri_callback(FUNC(deco156_state::pri_callback), this); + m_sprgen->set_gfxdecode_tag("gfxdecode"); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); @@ -405,26 +405,26 @@ MACHINE_CONFIG_START(deco156_state::wcvol95) MCFG_PALETTE_ADD("palette", 1024) MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR) - MCFG_DEVICE_ADD("tilegen1", DECO16IC, 0) - MCFG_DECO16IC_SPLIT(0) - MCFG_DECO16IC_PF1_SIZE(DECO_64x32) - MCFG_DECO16IC_PF2_SIZE(DECO_64x32) - MCFG_DECO16IC_PF1_TRANS_MASK(0x0f) - MCFG_DECO16IC_PF2_TRANS_MASK(0x0f) - MCFG_DECO16IC_PF1_COL_BANK(0x00) - MCFG_DECO16IC_PF2_COL_BANK(0x10) - MCFG_DECO16IC_PF1_COL_MASK(0x0f) - MCFG_DECO16IC_PF2_COL_MASK(0x0f) - MCFG_DECO16IC_BANK1_CB(deco156_state, bank_callback) - MCFG_DECO16IC_BANK2_CB(deco156_state, bank_callback) - MCFG_DECO16IC_PF12_8X8_BANK(0) - MCFG_DECO16IC_PF12_16X16_BANK(1) - MCFG_DECO16IC_GFXDECODE("gfxdecode") - - MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0) - MCFG_DECO_SPRITE_GFX_REGION(2) - MCFG_DECO_SPRITE_PRIORITY_CB(deco156_state, pri_callback) - MCFG_DECO_SPRITE_GFXDECODE("gfxdecode") + DECO16IC(config, m_deco_tilegen, 0); + m_deco_tilegen->set_split(0); + m_deco_tilegen->set_pf1_size(DECO_64x32); + m_deco_tilegen->set_pf2_size(DECO_64x32); + m_deco_tilegen->set_pf1_trans_mask(0x0f); + m_deco_tilegen->set_pf2_trans_mask(0x0f); + m_deco_tilegen->set_pf1_col_bank(0x00); + m_deco_tilegen->set_pf2_col_bank(0x10); + m_deco_tilegen->set_pf1_col_mask(0x0f); + m_deco_tilegen->set_pf2_col_mask(0x0f); + m_deco_tilegen->set_bank1_callback(FUNC(deco156_state::bank_callback), this); + m_deco_tilegen->set_bank2_callback(FUNC(deco156_state::bank_callback), this); + m_deco_tilegen->set_pf12_8x8_bank(0); + m_deco_tilegen->set_pf12_16x16_bank(1); + m_deco_tilegen->set_gfxdecode_tag("gfxdecode"); + + DECO_SPRITE(config, m_sprgen, 0); + m_sprgen->set_gfx_region(2); + m_sprgen->set_pri_callback(FUNC(deco156_state::pri_callback), this); + m_sprgen->set_gfxdecode_tag("gfxdecode"); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); |