diff options
Diffstat (limited to 'src/mame/drivers/targeth.cpp')
-rw-r--r-- | src/mame/drivers/targeth.cpp | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/src/mame/drivers/targeth.cpp b/src/mame/drivers/targeth.cpp index 092bf3396a4..34f8f08818a 100644 --- a/src/mame/drivers/targeth.cpp +++ b/src/mame/drivers/targeth.cpp @@ -74,19 +74,19 @@ DS5002FP Box contains: #include "speaker.h" -static const gfx_layout tilelayout16_0x080000 = +static const gfx_layout tilelayout = { 16,16, /* 16x16 tiles */ RGN_FRAC(1,4), /* number of tiles */ 4, /* bitplanes */ { RGN_FRAC(3,4), RGN_FRAC(2,4), RGN_FRAC(1,4), RGN_FRAC(0,4) }, /* plane offsets */ - { 0,1,2,3,4,5,6,7, 16*8+0,16*8+1,16*8+2,16*8+3,16*8+4,16*8+5,16*8+6,16*8+7 }, - { 0*8,1*8,2*8,3*8,4*8,5*8,6*8,7*8, 8*8,9*8,10*8,11*8,12*8,13*8,14*8,15*8 }, + { STEP8(0,1), STEP8(16*8,1) }, + { STEP16(0,8) }, 32*8 }; -static GFXDECODE_START( gfx_0x080000 ) - GFXDECODE_ENTRY( "gfx1", 0x000000, tilelayout16_0x080000, 0, 64 ) +static GFXDECODE_START( gfx_targeth ) + GFXDECODE_ENTRY( "gfx1", 0x000000, tilelayout, 0, 64 ) GFXDECODE_END TIMER_CALLBACK_MEMBER(targeth_state::gun1_irq) @@ -103,11 +103,9 @@ TIMER_CALLBACK_MEMBER(targeth_state::gun2_irq) m_gun_irq_timer[1]->adjust( m_screen->time_until_pos(160, 0 ) ); } -WRITE16_MEMBER(targeth_state::OKIM6295_bankswitch_w) +WRITE8_MEMBER(targeth_state::oki_bankswitch_w) { - if (ACCESSING_BITS_0_7){ - membank("okibank")->set_entry(data & 0x0f); - } + m_okibank->set_entry(data & 0x0f); } WRITE16_MEMBER(targeth_state::output_latch_w) @@ -147,7 +145,6 @@ void targeth_state::main_map(address_map &map) { map(0x000000, 0x0fffff).rom(); map(0x100000, 0x103fff).ram().w(FUNC(targeth_state::vram_w)).share("videoram"); /* Video RAM */ - map(0x108000, 0x108007).writeonly().share("vregs"); /* Video Registers */ map(0x108000, 0x108001).portr("GUNX1"); map(0x108002, 0x108003).portr("GUNY1"); map(0x108004, 0x108005).portr("GUNX2"); @@ -161,7 +158,7 @@ void targeth_state::main_map(address_map &map) map(0x700006, 0x700007).portr("SYSTEM"); /* Coins, Start & Fire buttons */ map(0x700008, 0x700009).portr("SERVICE"); /* Service & Guns Reload? */ map(0x70000a, 0x70000b).select(0x000070).w(FUNC(targeth_state::output_latch_w)); - map(0x70000c, 0x70000d).w(FUNC(targeth_state::OKIM6295_bankswitch_w)); /* OKI6295 bankswitch */ + map(0x70000d, 0x70000d).w(FUNC(targeth_state::oki_bankswitch_w)); /* OKI6295 bankswitch */ map(0x70000f, 0x70000f).rw("oki", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); /* OKI6295 status register */ map(0x700010, 0x700011).nopw(); /* ??? Guns reload related? */ map(0xfe0000, 0xfe7fff).ram(); /* Work RAM */ @@ -177,7 +174,7 @@ void targeth_state::oki_map(address_map &map) void targeth_state::machine_start() { - membank("okibank")->configure_entries(0, 16, memregion("oki")->base(), 0x10000); + m_okibank->configure_entries(0, 16, memregion("oki")->base(), 0x10000); m_gun_irq_timer[0] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(targeth_state::gun1_irq), this)); m_gun_irq_timer[1] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(targeth_state::gun2_irq), this)); @@ -294,7 +291,7 @@ MACHINE_CONFIG_START(targeth_state::targeth) MCFG_SCREEN_UPDATE_DRIVER(targeth_state, screen_update) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_0x080000) + MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_targeth) MCFG_PALETTE_ADD("palette", 1024) MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR) |