Previous 199869 Revisions Next

r34391 Wednesday 14th January, 2015 at 17:47:59 UTC by Osso
stadhero.c: enabled save state support, reduced tagmap lookups (nw)
[src/mame/drivers]stadhero.c
[src/mame/includes]stadhero.h
[src/mame/video]stadhero.c

trunk/src/mame/drivers/stadhero.c
r242902r242903
3535   switch (offset<<1)
3636   {
3737      case 0:
38         return ioport("INPUTS")->read();
38         return m_inputs->read();
3939
4040      case 2:
41         return ioport("COIN")->read();
41         return m_coin->read();
4242
4343      case 4:
44         return ioport("DSW")->read();
44         return m_dsw->read();
4545   }
4646
4747   logerror("CPU #0 PC %06x: warning - read unmapped memory address %06x\n",space.device().safe_pc(),0x30c000+offset);
r242902r242903
305305
306306/******************************************************************************/
307307
308GAME( 1988, stadhero, 0, stadhero, stadhero, driver_device, 0, ROT0, "Data East Corporation", "Stadium Hero (Japan)", 0 )
308GAME( 1988, stadhero, 0, stadhero, stadhero, driver_device, 0, ROT0, "Data East Corporation", "Stadium Hero (Japan)", GAME_SUPPORTS_SAVE )
trunk/src/mame/includes/stadhero.h
r242902r242903
1010      m_audiocpu(*this, "audiocpu"),
1111      m_tilegen1(*this, "tilegen1"),
1212      m_spritegen(*this, "spritegen"),
13      m_gfxdecode(*this, "gfxdecode"),
1314      m_spriteram(*this, "spriteram"),
1415      m_pf1_data(*this, "pf1_data"),
15      m_gfxdecode(*this, "gfxdecode") { }
16      m_inputs(*this, "INPUTS"),
17      m_coin(*this, "COIN"),
18      m_dsw(*this, "DSW") { }
1619
1720   required_device<cpu_device> m_maincpu;
1821   required_device<cpu_device> m_audiocpu;
1922   required_device<deco_bac06_device> m_tilegen1;
2023   required_device<deco_mxc06_device> m_spritegen;
24   required_device<gfxdecode_device> m_gfxdecode;
25   
2126   required_shared_ptr<UINT16> m_spriteram;
2227   required_shared_ptr<UINT16> m_pf1_data;
23   required_device<gfxdecode_device> m_gfxdecode;
28   
29   required_ioport m_inputs;
30   required_ioport m_coin;
31   required_ioport m_dsw;
2432
2533   tilemap_t *m_pf1_tilemap;
26   int m_flipscreen;
34   
2735   DECLARE_READ16_MEMBER(stadhero_control_r);
2836   DECLARE_WRITE16_MEMBER(stadhero_control_w);
2937   DECLARE_WRITE16_MEMBER(stadhero_pf1_data_w);
38   DECLARE_WRITE_LINE_MEMBER(irqhandler);
39   
40   virtual void video_start();
41   
3042   TILE_GET_INFO_MEMBER(get_pf1_tile_info);
31   virtual void video_start();
3243   UINT32 screen_update_stadhero(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
33   DECLARE_WRITE_LINE_MEMBER(irqhandler);
3444};
trunk/src/mame/video/stadhero.c
r242902r242903
2020
2121UINT32 stadhero_state::screen_update_stadhero(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
2222{
23//  machine().tilemap().set_flip_all(m_flipscreen ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0);
24
2523   flip_screen_set(m_tilegen1->get_flip_state());
2624
2725   m_tilegen1->set_bppmultmask(0x8, 0x7);
r242902r242903
5654
5755void stadhero_state::video_start()
5856{
59   m_pf1_tilemap =     &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(stadhero_state::get_pf1_tile_info),this),TILEMAP_SCAN_ROWS, 8, 8,32,32);
57   m_pf1_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(stadhero_state::get_pf1_tile_info),this),TILEMAP_SCAN_ROWS, 8, 8,32,32);
6058   m_pf1_tilemap->set_transparent_pen(0);
6159}
6260


Previous 199869 Revisions Next


© 1997-2024 The MAME Team