summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/mirage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/mirage.cpp')
-rw-r--r--src/mame/drivers/mirage.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/src/mame/drivers/mirage.cpp b/src/mame/drivers/mirage.cpp
index 46f77095dfa..e4de0aa921a 100644
--- a/src/mame/drivers/mirage.cpp
+++ b/src/mame/drivers/mirage.cpp
@@ -57,7 +57,7 @@ public:
miragemj_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_eeprom(*this, "eeprom"),
m_oki_sfx(*this, "oki_sfx"),
m_oki_bgm(*this, "oki_bgm"),
@@ -77,7 +77,7 @@ private:
/* devices */
required_device<m68000_device> m_maincpu;
- required_device<deco16ic_device> m_deco_tilegen1;
+ required_device<deco16ic_device> m_deco_tilegen;
required_device<eeprom_serial_93cxx_device> m_eeprom;
required_device<okim6295_device> m_oki_sfx;
required_device<okim6295_device> m_oki_bgm;
@@ -107,20 +107,20 @@ void miragemj_state::video_start()
uint32_t miragemj_state::screen_update_mirage(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
address_space &space = machine().dummy_space();
- uint16_t flip = m_deco_tilegen1->pf_control_r(space, 0, 0xffff);
+ uint16_t flip = m_deco_tilegen->pf_control_r(space, 0, 0xffff);
flip_screen_set(BIT(flip, 7));
m_sprgen->set_flip_screen(BIT(flip, 7));
m_sprgen->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400);
- m_deco_tilegen1->pf_update(m_pf1_rowscroll, m_pf2_rowscroll);
+ m_deco_tilegen->pf_update(m_pf1_rowscroll, m_pf2_rowscroll);
bitmap.fill(256, cliprect); /* not verified */
- 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->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0800, 0x0800, 0x200, 0x1ff);
- m_deco_tilegen1->tilemap_1_draw(screen, bitmap, cliprect, 0, 0);
+ m_deco_tilegen->tilemap_1_draw(screen, bitmap, cliprect, 0, 0);
m_sprgen->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0800, 0x200, 0x1ff);
return 0;
@@ -165,8 +165,8 @@ void miragemj_state::mirage_map(address_map &map)
{
map(0x000000, 0x07ffff).rom();
/* tilemaps */
- map(0x100000, 0x101fff).rw(m_deco_tilegen1, FUNC(deco16ic_device::pf1_data_r), FUNC(deco16ic_device::pf1_data_w)); // 0x100000 - 0x101fff tested
- map(0x102000, 0x103fff).rw(m_deco_tilegen1, FUNC(deco16ic_device::pf2_data_r), FUNC(deco16ic_device::pf2_data_w)); // 0x102000 - 0x102fff tested
+ map(0x100000, 0x101fff).rw(m_deco_tilegen, FUNC(deco16ic_device::pf1_data_r), FUNC(deco16ic_device::pf1_data_w)); // 0x100000 - 0x101fff tested
+ map(0x102000, 0x103fff).rw(m_deco_tilegen, FUNC(deco16ic_device::pf2_data_r), FUNC(deco16ic_device::pf2_data_w)); // 0x102000 - 0x102fff tested
/* linescroll */
map(0x110000, 0x110bff).ram().share("pf1_rowscroll");
map(0x112000, 0x112bff).ram().share("pf2_rowscroll");
@@ -175,7 +175,7 @@ void miragemj_state::mirage_map(address_map &map)
map(0x140000, 0x14000f).rw(m_oki_sfx, FUNC(okim6295_device::read), FUNC(okim6295_device::write)).umask16(0x00ff);
map(0x150000, 0x15000f).rw(m_oki_bgm, FUNC(okim6295_device::read), FUNC(okim6295_device::write)).umask16(0x00ff);
map(0x160000, 0x160001).nopw();
- map(0x168000, 0x16800f).w(m_deco_tilegen1, FUNC(deco16ic_device::pf_control_w));
+ map(0x168000, 0x16800f).w(m_deco_tilegen, FUNC(deco16ic_device::pf_control_w));
map(0x16a000, 0x16a001).nopw();
map(0x16c000, 0x16c001).w(FUNC(miragemj_state::okim1_rombank_w));
map(0x16c002, 0x16c003).w(FUNC(miragemj_state::okim0_rombank_w));
@@ -316,25 +316,25 @@ MACHINE_CONFIG_START(miragemj_state::mirage)
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(miragemj_state, bank_callback)
- MCFG_DECO16IC_BANK2_CB(miragemj_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_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(miragemj_state::bank_callback), this);
+ m_deco_tilegen->set_bank2_callback(FUNC(miragemj_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_gfxdecode_tag("gfxdecode");
/* sound hardware */
SPEAKER(config, "mono").front_center();