Previous 199869 Revisions Next

r34924 Sunday 8th February, 2015 at 08:43:12 UTC by Osso
taxidriv.c: added save state support (nw)
[src/mame/drivers]taxidriv.c
[src/mame/includes]taxidriv.h
[src/mame/video]taxidriv.c

trunk/src/mame/drivers/taxidriv.c
r243435r243436
1616#include "sound/ay8910.h"
1717
1818
19void taxidriv_state::machine_start()
20{
21   save_item(NAME(m_s1));
22   save_item(NAME(m_s2));
23   save_item(NAME(m_s3));
24   save_item(NAME(m_s4));
25   save_item(NAME(m_latchA));
26   save_item(NAME(m_latchB));
27   save_item(NAME(m_bghide));
28   save_item(NAME(m_spritectrl));
29}
1930
20WRITE8_MEMBER(taxidriv_state::p2a_w){ taxidriv_spritectrl_w(space,0,data); }
21WRITE8_MEMBER(taxidriv_state::p2b_w){ taxidriv_spritectrl_w(space,1,data); }
22WRITE8_MEMBER(taxidriv_state::p2c_w){ taxidriv_spritectrl_w(space,2,data); }
23WRITE8_MEMBER(taxidriv_state::p3a_w){ taxidriv_spritectrl_w(space,3,data); }
24WRITE8_MEMBER(taxidriv_state::p3b_w){ taxidriv_spritectrl_w(space,4,data); }
25WRITE8_MEMBER(taxidriv_state::p3c_w){ taxidriv_spritectrl_w(space,5,data); }
26WRITE8_MEMBER(taxidriv_state::p4a_w){ taxidriv_spritectrl_w(space,6,data); }
27WRITE8_MEMBER(taxidriv_state::p4b_w){ taxidriv_spritectrl_w(space,7,data); }
28WRITE8_MEMBER(taxidriv_state::p4c_w){ taxidriv_spritectrl_w(space,8,data); }
31WRITE8_MEMBER(taxidriv_state::p2a_w){ spritectrl_w(space,0,data); }
32WRITE8_MEMBER(taxidriv_state::p2b_w){ spritectrl_w(space,1,data); }
33WRITE8_MEMBER(taxidriv_state::p2c_w){ spritectrl_w(space,2,data); }
34WRITE8_MEMBER(taxidriv_state::p3a_w){ spritectrl_w(space,3,data); }
35WRITE8_MEMBER(taxidriv_state::p3b_w){ spritectrl_w(space,4,data); }
36WRITE8_MEMBER(taxidriv_state::p3c_w){ spritectrl_w(space,5,data); }
37WRITE8_MEMBER(taxidriv_state::p4a_w){ spritectrl_w(space,6,data); }
38WRITE8_MEMBER(taxidriv_state::p4b_w){ spritectrl_w(space,7,data); }
39WRITE8_MEMBER(taxidriv_state::p4c_w){ spritectrl_w(space,8,data); }
2940
3041
3142READ8_MEMBER(taxidriv_state::p0a_r)
r243435r243436
366377   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
367378   MCFG_SCREEN_SIZE(32*8, 32*8)
368379   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 27*8-1)
369   MCFG_SCREEN_UPDATE_DRIVER(taxidriv_state, screen_update_taxidriv)
380   MCFG_SCREEN_UPDATE_DRIVER(taxidriv_state, screen_update)
370381   MCFG_SCREEN_PALETTE("palette")
371382
372383   MCFG_GFXDECODE_ADD("gfxdecode", "palette", taxidriv)
r243435r243436
432443ROM_END
433444
434445
435GAME( 1984, taxidriv,  0,        taxidriv, taxidriv, driver_device, 0, ROT90, "Graphic Techno", "Taxi Driver", GAME_IMPERFECT_GRAPHICS | GAME_NO_COCKTAIL )
446GAME( 1984, taxidriv,  0,        taxidriv, taxidriv, driver_device, 0, ROT90, "Graphic Techno", "Taxi Driver", GAME_IMPERFECT_GRAPHICS | GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
trunk/src/mame/includes/taxidriv.h
r243435r243436
33public:
44   taxidriv_state(const machine_config &mconfig, device_type type, const char *tag)
55      : driver_device(mconfig, type, tag),
6      m_maincpu(*this, "maincpu"),
7      m_gfxdecode(*this, "gfxdecode"),
8      m_palette(*this, "palette"),
69      m_vram0(*this, "vram0"),
710      m_vram1(*this, "vram1"),
811      m_vram2(*this, "vram2"),
r243435r243436
1114      m_vram5(*this, "vram5"),
1215      m_vram6(*this, "vram6"),
1316      m_vram7(*this, "vram7"),
14      m_scroll(*this, "scroll"),
15      m_maincpu(*this, "maincpu"),
16      m_gfxdecode(*this, "gfxdecode"),
17      m_palette(*this, "palette")  { }
17      m_scroll(*this, "scroll")  { }
1818
19   int m_s1;
20   int m_s2;
21   int m_s3;
22   int m_s4;
23   int m_latchA;
24   int m_latchB;
19   required_device<cpu_device> m_maincpu;
20   required_device<gfxdecode_device> m_gfxdecode;
21   required_device<palette_device> m_palette;
22
2523   required_shared_ptr<UINT8> m_vram0;
2624   required_shared_ptr<UINT8> m_vram1;
2725   required_shared_ptr<UINT8> m_vram2;
r243435r243436
3129   required_shared_ptr<UINT8> m_vram6;
3230   required_shared_ptr<UINT8> m_vram7;
3331   required_shared_ptr<UINT8> m_scroll;
32
33   int m_s1;
34   int m_s2;
35   int m_s3;
36   int m_s4;
37   int m_latchA;
38   int m_latchB;
3439   int m_bghide;
3540   int m_spritectrl[9];
41
3642   DECLARE_WRITE8_MEMBER(p2a_w);
3743   DECLARE_WRITE8_MEMBER(p2b_w);
3844   DECLARE_WRITE8_MEMBER(p2c_w);
r243435r243436
5359   DECLARE_READ8_MEMBER(p8910_0a_r);
5460   DECLARE_READ8_MEMBER(p8910_1a_r);
5561   DECLARE_WRITE8_MEMBER(p8910_0b_w);
56   DECLARE_WRITE8_MEMBER(taxidriv_spritectrl_w);
62   DECLARE_WRITE8_MEMBER(spritectrl_w);
63
64   virtual void machine_start();
5765   DECLARE_PALETTE_INIT(taxidriv);
58   UINT32 screen_update_taxidriv(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
59   required_device<cpu_device> m_maincpu;
60   required_device<gfxdecode_device> m_gfxdecode;
61   required_device<palette_device> m_palette;
66
67   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
6268};
trunk/src/mame/video/taxidriv.c
r243435r243436
22#include "includes/taxidriv.h"
33
44
5WRITE8_MEMBER(taxidriv_state::taxidriv_spritectrl_w)
5WRITE8_MEMBER(taxidriv_state::spritectrl_w)
66{
77   m_spritectrl[offset] = data;
88}
99
1010
1111
12UINT32 taxidriv_state::screen_update_taxidriv(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
12UINT32 taxidriv_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
1313{
1414   int offs;
1515   int sx,sy;


Previous 199869 Revisions Next


© 1997-2024 The MAME Team