diff options
author | 2016-02-27 09:28:04 +0100 | |
---|---|---|
committer | 2016-02-27 09:28:04 +0100 | |
commit | 25712408ae9970574f9940cf5258f337238500d0 (patch) | |
tree | 035c5fe1b06c12f6b60265c4ae162f067b994fcf /src | |
parent | 04d1948ee8506f8508a24c1d73bf9027b52d920a (diff) |
gaelco.cpp, targeth.cpp: oki memory map instead of memcpy (nw)
Diffstat (limited to 'src')
-rw-r--r-- | src/mame/drivers/gaelco.cpp | 38 | ||||
-rw-r--r-- | src/mame/drivers/targeth.cpp | 34 | ||||
-rw-r--r-- | src/mame/includes/gaelco.h | 24 | ||||
-rw-r--r-- | src/mame/includes/targeth.h | 28 | ||||
-rw-r--r-- | src/mame/video/gaelco.cpp | 2 | ||||
-rw-r--r-- | src/mame/video/targeth.cpp | 15 |
6 files changed, 78 insertions, 63 deletions
diff --git a/src/mame/drivers/gaelco.cpp b/src/mame/drivers/gaelco.cpp index 56063dc3bed..6b78d61595d 100644 --- a/src/mame/drivers/gaelco.cpp +++ b/src/mame/drivers/gaelco.cpp @@ -62,11 +62,9 @@ WRITE16_MEMBER(gaelco_state::bigkarnk_coin_w) WRITE16_MEMBER(gaelco_state::OKIM6295_bankswitch_w) { - UINT8 *RAM = memregion("oki")->base(); - if (ACCESSING_BITS_0_7) { - memcpy(&RAM[0x30000], &RAM[0x40000 + (data & 0x0f) * 0x10000], 0x10000); + membank("okibank")->set_entry(data & 0x0f); } } @@ -192,6 +190,12 @@ static ADDRESS_MAP_START( thoop_map, AS_PROGRAM, 16, gaelco_state ) ADDRESS_MAP_END +static ADDRESS_MAP_START( oki_map, AS_0, 8, gaelco_state ) + AM_RANGE(0x00000, 0x2ffff) AM_ROM + AM_RANGE(0x30000, 0x3ffff) AM_ROMBANK("okibank") +ADDRESS_MAP_END + + /************************************* * * Input ports @@ -494,7 +498,9 @@ GFXDECODEINFO(0x100000,64) void gaelco_state::machine_start() { -} + if (memregion("oki")->bytes() > 0x040000) //bigkarnk oki isn't banked + membank("okibank")->configure_entries(0, 16, memregion("oki")->base(), 0x10000); +} static MACHINE_CONFIG_START( bigkarnk, gaelco_state ) @@ -561,6 +567,7 @@ static MACHINE_CONFIG_START( maniacsq, gaelco_state ) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_OKIM6295_ADD("oki", 1056000, OKIM6295_PIN7_HIGH) // clock frequency & pin 7 not verified + MCFG_DEVICE_ADDRESS_MAP(AS_0, oki_map) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) MACHINE_CONFIG_END @@ -593,6 +600,7 @@ static MACHINE_CONFIG_START( squash, gaelco_state ) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_OKIM6295_ADD("oki", 1056000, OKIM6295_PIN7_HIGH) // clock frequency & pin 7 not verified + MCFG_DEVICE_ADDRESS_MAP(AS_0, oki_map) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) MACHINE_CONFIG_END @@ -625,6 +633,7 @@ static MACHINE_CONFIG_START( thoop, gaelco_state ) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_OKIM6295_ADD("oki", 1056000, OKIM6295_PIN7_HIGH) // clock frequency & pin 7 not verified + MCFG_DEVICE_ADDRESS_MAP(AS_0, oki_map) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) MACHINE_CONFIG_END @@ -676,11 +685,9 @@ ROM_START( maniacsp ) /* PCB - REF 922804/2 */ ROM_RELOAD( 0x380000, 0x040000 ) /* 0x340000-0x37ffff and 0x3c0000-0x3fffff empty */ - ROM_REGION( 0x140000, "oki", 0 ) /* ADPCM samples - sound chip is OKIM6295 */ + ROM_REGION( 0x080000, "oki", 0 ) /* ADPCM samples - sound chip is OKIM6295 */ ROM_LOAD( "c1", 0x000000, 0x080000, CRC(2557f2d6) SHA1(3a99388f2d845281f73a427d6dc797dce87b2f82) ) /* 0x00000-0x2ffff is fixed, 0x30000-0x3ffff is bank switched from all the ROMs */ - ROM_RELOAD( 0x040000, 0x080000 ) - ROM_RELOAD( 0x0c0000, 0x080000 ) ROM_END @@ -708,11 +715,10 @@ ROM_START( biomtoy ) /* PCB - REF 922804/2 */ ROM_LOAD( "j10", 0x300000, 0x040000, CRC(8e3e96cc) SHA1(761009f3f32b18139e98f20a22c433b6a49d9168) ) ROM_CONTINUE( 0x380000, 0x040000 ) - ROM_REGION( 0x140000, "oki", 0 ) /* ADPCM samples - sound chip is OKIM6295 */ + ROM_REGION( 0x100000, "oki", 0 ) /* ADPCM samples - sound chip is OKIM6295 */ ROM_LOAD( "c1", 0x000000, 0x080000, CRC(0f02de7e) SHA1(a8779370cc36290616794ff11eb3eebfdea5b1a9) ) /* 0x00000-0x2ffff is fixed, 0x30000-0x3ffff is bank switched from all the ROMs */ - ROM_RELOAD( 0x040000, 0x080000 ) - ROM_LOAD( "c3", 0x0c0000, 0x080000, CRC(914e4bbc) SHA1(ca82b7481621a119f05992ed093b963da70d748a) ) + ROM_LOAD( "c3", 0x080000, 0x080000, CRC(914e4bbc) SHA1(ca82b7481621a119f05992ed093b963da70d748a) ) ROM_END @@ -741,11 +747,10 @@ ROM_START( biomtoya ) /* PCB - REF 922804/2 */ ROM_CONTINUE( 0x380000, 0x040000 ) // using the same samples as the parent set causes bad sounds for most of the game - ROM_REGION( 0x140000, "oki", 0 ) /* ADPCM samples - sound chip is OKIM6295 */ + ROM_REGION( 0x100000, "oki", 0 ) /* ADPCM samples - sound chip is OKIM6295 */ ROM_LOAD( "c1", 0x000000, 0x080000, BAD_DUMP CRC(0f02de7e) SHA1(a8779370cc36290616794ff11eb3eebfdea5b1a9) ) /* 0x00000-0x2ffff is fixed, 0x30000-0x3ffff is bank switched from all the ROMs */ - ROM_RELOAD( 0x040000, 0x080000 ) - ROM_LOAD( "c3", 0x0c0000, 0x080000, BAD_DUMP CRC(914e4bbc) SHA1(ca82b7481621a119f05992ed093b963da70d748a) ) + ROM_LOAD( "c3", 0x080000, 0x080000, BAD_DUMP CRC(914e4bbc) SHA1(ca82b7481621a119f05992ed093b963da70d748a) ) ROM_END @@ -812,11 +817,9 @@ ROM_START( squash ) ROM_LOAD( "squash.c12", 0x000000, 0x80000, CRC(5c440645) SHA1(4f2fc1647ffc549fa079f2dc0aaaceb447afdf44) ) /* encrypted video ram */ ROM_RELOAD( 0x080000, 0x80000 ) - ROM_REGION( 0x140000, "oki", 0 ) /* ADPCM samples - sound chip is OKIM6295 */ + ROM_REGION( 0x80000, "oki", 0 ) /* ADPCM samples - sound chip is OKIM6295 */ ROM_LOAD( "squash.d01", 0x000000, 0x80000, CRC(a1b9651b) SHA1(a396ba94889f70ea06d6330e3606b0f2497ff6ce) ) /* 0x00000-0x2ffff is fixed, 0x30000-0x3ffff is bank switched from all the ROMs */ - ROM_RELOAD( 0x040000, 0x080000 ) - ROM_RELOAD( 0x0c0000, 0x080000 ) ROM_END @@ -843,10 +846,9 @@ ROM_START( thoop ) ROM_CONTINUE( 0x040000, 0x040000 ) ROM_CONTINUE( 0x0c0000, 0x040000 ) - ROM_REGION( 0x140000, "oki", 0 ) /* ADPCM samples - sound chip is OKIM6295 */ + ROM_REGION( 0x100000, "oki", 0 ) /* ADPCM samples - sound chip is OKIM6295 */ ROM_LOAD( "sound", 0x000000, 0x100000, CRC(99f80961) SHA1(de3a514a8f46dffd5f762e52aac1f4c3b08e2e18) ) /* 0x00000-0x2ffff is fixed, 0x30000-0x3ffff is bank switched from all the ROMs */ - ROM_RELOAD( 0x040000, 0x100000 ) ROM_END diff --git a/src/mame/drivers/targeth.cpp b/src/mame/drivers/targeth.cpp index 89c800b1581..81d810a1211 100644 --- a/src/mame/drivers/targeth.cpp +++ b/src/mame/drivers/targeth.cpp @@ -31,7 +31,7 @@ static GFXDECODE_START( 0x080000 ) GFXDECODE_END -TIMER_DEVICE_CALLBACK_MEMBER(targeth_state::targeth_interrupt) +TIMER_DEVICE_CALLBACK_MEMBER(targeth_state::interrupt) { int scanline = param; @@ -52,21 +52,19 @@ TIMER_DEVICE_CALLBACK_MEMBER(targeth_state::targeth_interrupt) WRITE16_MEMBER(targeth_state::OKIM6295_bankswitch_w) { - UINT8 *RAM = memregion("oki")->base(); - if (ACCESSING_BITS_0_7){ - memcpy(&RAM[0x30000], &RAM[0x40000 + (data & 0x0f)*0x10000], 0x10000); + membank("okibank")->set_entry(data & 0x0f); } } -WRITE16_MEMBER(targeth_state::targeth_coin_counter_w) +WRITE16_MEMBER(targeth_state::coin_counter_w) { machine().bookkeeping().coin_counter_w((offset >> 3) & 0x01, data & 0x01); } static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, targeth_state ) AM_RANGE(0x000000, 0x0fffff) AM_ROM - AM_RANGE(0x100000, 0x103fff) AM_RAM_WRITE(targeth_vram_w) AM_SHARE("videoram") /* Video RAM */ + AM_RANGE(0x100000, 0x103fff) AM_RAM_WRITE(vram_w) AM_SHARE("videoram") /* Video RAM */ AM_RANGE(0x108000, 0x108007) AM_WRITEONLY AM_SHARE("vregs") /* Video Registers */ AM_RANGE(0x108000, 0x108001) AM_READ_PORT("GUNX1") AM_RANGE(0x108002, 0x108003) AM_READ_PORT("GUNY1") @@ -83,10 +81,17 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, targeth_state ) AM_RANGE(0x70000c, 0x70000d) AM_WRITE(OKIM6295_bankswitch_w) /* OKI6295 bankswitch */ AM_RANGE(0x70000e, 0x70000f) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff) /* OKI6295 status register */ AM_RANGE(0x700010, 0x70001b) AM_WRITENOP /* ??? Guns reload related? */ - AM_RANGE(0x70002a, 0x70003b) AM_WRITE(targeth_coin_counter_w) /* Coin counters */ + AM_RANGE(0x70002a, 0x70003b) AM_WRITE(coin_counter_w) /* Coin counters */ AM_RANGE(0xfe0000, 0xfeffff) AM_RAM /* Work RAM (partially shared with DS5002FP) */ ADDRESS_MAP_END + +static ADDRESS_MAP_START( oki_map, AS_0, 8, targeth_state ) + AM_RANGE(0x00000, 0x2ffff) AM_ROM + AM_RANGE(0x30000, 0x3ffff) AM_ROMBANK("okibank") +ADDRESS_MAP_END + + static INPUT_PORTS_START( targeth ) PORT_START("GUNX1") PORT_BIT( 0x01ff, 200, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.05, -0.028, 0) PORT_MINMAX( 0, 400 + 4) PORT_SENSITIVITY(100) PORT_KEYDELTA(20) PORT_PLAYER(1) @@ -177,7 +182,7 @@ static MACHINE_CONFIG_START( targeth, targeth_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000,24000000/2) /* 12 MHz */ MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", targeth_state, targeth_interrupt, "screen", 0, 1) + MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", targeth_state, interrupt, "screen", 0, 1) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -185,7 +190,7 @@ static MACHINE_CONFIG_START( targeth, targeth_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) MCFG_SCREEN_SIZE(64*16, 32*16) /* 1024x512 */ MCFG_SCREEN_VISIBLE_AREA(0, 24*16-1, 16, 16*16-1) /* 400x240 */ - MCFG_SCREEN_UPDATE_DRIVER(targeth_state, screen_update_targeth) + MCFG_SCREEN_UPDATE_DRIVER(targeth_state, screen_update) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", 0x080000) @@ -196,6 +201,7 @@ static MACHINE_CONFIG_START( targeth, targeth_state ) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_OKIM6295_ADD("oki", 1056000, OKIM6295_PIN7_HIGH) // clock frequency & pin 7 not verified + MCFG_DEVICE_ADDRESS_MAP(AS_0, oki_map) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) MACHINE_CONFIG_END @@ -213,11 +219,10 @@ ROM_START( targeth ) ROM_LOAD( "targeth.i9", 0x100000, 0x080000, CRC(0e922c1c) SHA1(6920e345c82e76f7e0af6101f39eb65ac1f112b9) ) ROM_LOAD( "targeth.i7", 0x180000, 0x080000, CRC(d8b41000) SHA1(cbe91eb91bdc7a60b2333c6bea37d08a57902669) ) - ROM_REGION( 0x140000, "oki", 0 ) /* ADPCM samples - sound chip is OKIM6295 */ + ROM_REGION( 0x100000, "oki", 0 ) /* ADPCM samples - sound chip is OKIM6295 */ ROM_LOAD( "targeth.c1", 0x000000, 0x080000, CRC(d6c9dfbc) SHA1(3ec70dea94fc89df933074012a52de6034571e87) ) /* 0x00000-0x2ffff is fixed, 0x30000-0x3ffff is bank switched from all the ROMs */ - ROM_RELOAD( 0x040000, 0x080000 ) - ROM_LOAD( "targeth.c3", 0x0c0000, 0x080000, CRC(d4c771df) SHA1(7cc0a86ef6aa3d26ab8f19d198f62112bf012870) ) + ROM_LOAD( "targeth.c3", 0x080000, 0x080000, CRC(d4c771df) SHA1(7cc0a86ef6aa3d26ab8f19d198f62112bf012870) ) ROM_END ROM_START( targetha ) @@ -234,11 +239,10 @@ ROM_START( targetha ) ROM_LOAD( "targeth.i9", 0x100000, 0x080000, CRC(0e922c1c) SHA1(6920e345c82e76f7e0af6101f39eb65ac1f112b9) ) ROM_LOAD( "targeth.i7", 0x180000, 0x080000, CRC(d8b41000) SHA1(cbe91eb91bdc7a60b2333c6bea37d08a57902669) ) - ROM_REGION( 0x140000, "oki", 0 ) /* ADPCM samples - sound chip is OKIM6295 */ + ROM_REGION( 0x100000, "oki", 0 ) /* ADPCM samples - sound chip is OKIM6295 */ ROM_LOAD( "targeth.c1", 0x000000, 0x080000, CRC(d6c9dfbc) SHA1(3ec70dea94fc89df933074012a52de6034571e87) ) /* 0x00000-0x2ffff is fixed, 0x30000-0x3ffff is bank switched from all the ROMs */ - ROM_RELOAD( 0x040000, 0x080000 ) - ROM_LOAD( "targeth.c3", 0x0c0000, 0x080000, CRC(d4c771df) SHA1(7cc0a86ef6aa3d26ab8f19d198f62112bf012870) ) + ROM_LOAD( "targeth.c3", 0x080000, 0x080000, CRC(d4c771df) SHA1(7cc0a86ef6aa3d26ab8f19d198f62112bf012870) ) ROM_END GAME( 1994, targeth, 0, targeth, targeth, driver_device, 0, ROT0, "Gaelco", "Target Hits (ver 1.1)", MACHINE_UNEMULATED_PROTECTION ) diff --git a/src/mame/includes/gaelco.h b/src/mame/includes/gaelco.h index ea275b50248..57c1478304b 100644 --- a/src/mame/includes/gaelco.h +++ b/src/mame/includes/gaelco.h @@ -11,14 +11,20 @@ class gaelco_state : public driver_device public: gaelco_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_gfxdecode(*this, "gfxdecode"), + m_palette(*this, "palette"), + m_audiocpu(*this, "audiocpu"), m_videoram(*this, "videoram"), m_vregs(*this, "vregs"), m_spriteram(*this, "spriteram"), - m_screenram(*this, "screenram"), - m_audiocpu(*this, "audiocpu"), - m_maincpu(*this, "maincpu"), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") { } + m_screenram(*this, "screenram") { } + + /* devices */ + required_device<cpu_device> m_maincpu; + required_device<gfxdecode_device> m_gfxdecode; + required_device<palette_device> m_palette; + optional_device<cpu_device> m_audiocpu; /* memory pointers */ required_shared_ptr<UINT16> m_videoram; @@ -29,8 +35,6 @@ public: /* video-related */ tilemap_t *m_tilemap[2]; - /* devices */ - optional_device<cpu_device> m_audiocpu; DECLARE_WRITE16_MEMBER(bigkarnk_sound_command_w); DECLARE_WRITE16_MEMBER(bigkarnk_coin_w); DECLARE_WRITE16_MEMBER(OKIM6295_bankswitch_w); @@ -39,15 +43,15 @@ public: DECLARE_WRITE16_MEMBER(thoop_vram_encrypted_w); DECLARE_WRITE16_MEMBER(thoop_encrypted_w); DECLARE_WRITE16_MEMBER(gaelco_vram_w); + TILE_GET_INFO_MEMBER(get_tile_info_gaelco_screen0); TILE_GET_INFO_MEMBER(get_tile_info_gaelco_screen1); + virtual void machine_start() override; DECLARE_VIDEO_START(bigkarnk); DECLARE_VIDEO_START(maniacsq); + UINT32 screen_update_bigkarnk(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_maniacsq(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect ); - required_device<cpu_device> m_maincpu; - required_device<gfxdecode_device> m_gfxdecode; - required_device<palette_device> m_palette; }; diff --git a/src/mame/includes/targeth.h b/src/mame/includes/targeth.h index 946f95325c6..9bdeebbadf5 100644 --- a/src/mame/includes/targeth.h +++ b/src/mame/includes/targeth.h @@ -6,27 +6,33 @@ public: targeth_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this,"maincpu"), + m_gfxdecode(*this, "gfxdecode"), + m_palette(*this, "palette"), m_videoram(*this, "videoram"), m_vregs(*this, "vregs"), - m_spriteram(*this, "spriteram"), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") { } + m_spriteram(*this, "spriteram") { } required_device<cpu_device> m_maincpu; + required_device<gfxdecode_device> m_gfxdecode; + required_device<palette_device> m_palette; + required_shared_ptr<UINT16> m_videoram; required_shared_ptr<UINT16> m_vregs; required_shared_ptr<UINT16> m_spriteram; - required_device<gfxdecode_device> m_gfxdecode; - required_device<palette_device> m_palette; + tilemap_t *m_pant[2]; DECLARE_WRITE16_MEMBER(OKIM6295_bankswitch_w); - DECLARE_WRITE16_MEMBER(targeth_coin_counter_w); - DECLARE_WRITE16_MEMBER(targeth_vram_w); - TILE_GET_INFO_MEMBER(get_tile_info_targeth_screen0); - TILE_GET_INFO_MEMBER(get_tile_info_targeth_screen1); + DECLARE_WRITE16_MEMBER(coin_counter_w); + DECLARE_WRITE16_MEMBER(vram_w); + + TILE_GET_INFO_MEMBER(get_tile_info_screen0); + TILE_GET_INFO_MEMBER(get_tile_info_screen1); + virtual void video_start() override; - UINT32 screen_update_targeth(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - TIMER_DEVICE_CALLBACK_MEMBER(targeth_interrupt); + + TIMER_DEVICE_CALLBACK_MEMBER(interrupt); + + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); }; diff --git a/src/mame/video/gaelco.cpp b/src/mame/video/gaelco.cpp index ebcd8b2dead..75f01e38ac4 100644 --- a/src/mame/video/gaelco.cpp +++ b/src/mame/video/gaelco.cpp @@ -114,7 +114,7 @@ VIDEO_START_MEMBER(gaelco_state,maniacsq) 1 | xxxxxxxx xxxxxxxx | not used 2 | -------x xxxxxxxx | x position 2 | -xxxxxx- -------- | sprite color - 3 | -------- ------xx | sprite code (8x8 cuadrant) + 3 | -------- ------xx | sprite code (8x8 quadrant) 3 | xxxxxxxx xxxxxx-- | sprite code */ diff --git a/src/mame/video/targeth.cpp b/src/mame/video/targeth.cpp index 1341680752d..5b3eafe14b1 100644 --- a/src/mame/video/targeth.cpp +++ b/src/mame/video/targeth.cpp @@ -34,7 +34,7 @@ 1 | xxxxxxxx x------- | not used? */ -TILE_GET_INFO_MEMBER(targeth_state::get_tile_info_targeth_screen0) +TILE_GET_INFO_MEMBER(targeth_state::get_tile_info_screen0) { int data = m_videoram[tile_index << 1]; int data2 = m_videoram[(tile_index << 1) + 1]; @@ -43,7 +43,7 @@ TILE_GET_INFO_MEMBER(targeth_state::get_tile_info_targeth_screen0) SET_TILE_INFO_MEMBER(0, code, data2 & 0x1f, TILE_FLIPXY((data2 >> 5) & 0x03)); } -TILE_GET_INFO_MEMBER(targeth_state::get_tile_info_targeth_screen1) +TILE_GET_INFO_MEMBER(targeth_state::get_tile_info_screen1) { int data = m_videoram[(0x2000/2) + (tile_index << 1)]; int data2 = m_videoram[(0x2000/2) + (tile_index << 1) + 1]; @@ -58,7 +58,7 @@ TILE_GET_INFO_MEMBER(targeth_state::get_tile_info_targeth_screen1) ***************************************************************************/ -WRITE16_MEMBER(targeth_state::targeth_vram_w) +WRITE16_MEMBER(targeth_state::vram_w) { m_videoram[offset] = data; m_pant[(offset & 0x1fff) >> 12]->mark_tile_dirty(((offset << 1) & 0x1fff) >> 2); @@ -73,8 +73,8 @@ WRITE16_MEMBER(targeth_state::targeth_vram_w) void targeth_state::video_start() { - m_pant[0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(targeth_state::get_tile_info_targeth_screen0),this),TILEMAP_SCAN_ROWS,16,16,64,32); - m_pant[1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(targeth_state::get_tile_info_targeth_screen1),this),TILEMAP_SCAN_ROWS,16,16,64,32); + m_pant[0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(targeth_state::get_tile_info_screen0),this),TILEMAP_SCAN_ROWS,16,16,64,32); + m_pant[1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(targeth_state::get_tile_info_screen1),this),TILEMAP_SCAN_ROWS,16,16,64,32); m_pant[0]->set_transparent_pen(0); } @@ -105,10 +105,9 @@ void targeth_state::video_start() void targeth_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect) { - int i; gfx_element *gfx = m_gfxdecode->gfx(0); - for (i = 3; i < (0x1000 - 6)/2; i += 4){ + for (int i = 3; i < (0x1000 - 6)/2; i += 4){ int sx = m_spriteram[i+2] & 0x03ff; int sy = (240 - (m_spriteram[i] & 0x00ff)) & 0x00ff; int number = m_spriteram[i+3] & 0x3fff; @@ -130,7 +129,7 @@ void targeth_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect ***************************************************************************/ -UINT32 targeth_state::screen_update_targeth(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +UINT32 targeth_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { /* set scroll registers */ m_pant[0]->set_scrolly(0, m_vregs[0]); |