Previous 199869 Revisions Next

r36343 Monday 9th March, 2015 at 17:08:49 UTC by Osso
tgtpanic.c, xtheball.c: added save state support (nw)
[src/mame/drivers]tgtpanic.c xtheball.c

trunk/src/mame/drivers/tgtpanic.c
r244854r244855
1818public:
1919   tgtpanic_state(const machine_config &mconfig, device_type type, const char *tag)
2020      : driver_device(mconfig, type, tag),
21      m_ram(*this, "ram"),
2221      m_maincpu(*this, "maincpu"),
23      m_screen(*this, "screen") { }
22      m_screen(*this, "screen"),
23      m_ram(*this, "ram") { }
2424
25   required_device<cpu_device> m_maincpu;
26   required_device<screen_device> m_screen;
27   
2528   required_shared_ptr<UINT8> m_ram;
29   
2630   UINT8 m_color;
31   
2732   DECLARE_WRITE8_MEMBER(color_w);
28   UINT32 screen_update_tgtpanic(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
29   required_device<cpu_device> m_maincpu;
30   required_device<screen_device> m_screen;
33   
34   virtual void machine_start();
35   
36   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
3137};
3238
3339
40void tgtpanic_state::machine_start()
41{
42   save_item(NAME(m_color));
43}
44
3445/*************************************
3546 *
3647 *  Video hardware
3748 *
3849 *************************************/
3950
40UINT32 tgtpanic_state::screen_update_tgtpanic(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
51UINT32 tgtpanic_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
4152{
4253   UINT32 colors[4];
4354   UINT32 offs;
r244854r244855
146157   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* Unverified */
147158   MCFG_SCREEN_SIZE(256, 256)
148159   MCFG_SCREEN_VISIBLE_AREA(0, 192 - 1, 0, 192 - 1)
149   MCFG_SCREEN_UPDATE_DRIVER(tgtpanic_state, screen_update_tgtpanic)
160   MCFG_SCREEN_UPDATE_DRIVER(tgtpanic_state, screen_update)
150161MACHINE_CONFIG_END
151162
152163
r244854r244855
168179 *
169180 *************************************/
170181
171GAME( 1996, tgtpanic, 0, tgtpanic, tgtpanic, driver_device, 0, ROT0, "Konami", "Target Panic", GAME_NO_SOUND_HW )
182GAME( 1996, tgtpanic, 0, tgtpanic, tgtpanic, driver_device, 0, ROT0, "Konami", "Target Panic", GAME_NO_SOUND_HW | GAME_SUPPORTS_SAVE )
trunk/src/mame/drivers/xtheball.c
r244854r244855
3030
3131   required_device<cpu_device> m_maincpu;
3232   required_device<tlc34076_device> m_tlc34076;
33   
3334   required_shared_ptr<UINT16> m_vram_bg;
3435   required_shared_ptr<UINT16> m_vram_fg;
36   
3537   required_ioport m_analog_x;
3638   required_ioport m_analog_y;
39   
3740   UINT8 m_bitvals[32];
41   
3842   DECLARE_WRITE16_MEMBER(bit_controls_w);
3943   DECLARE_READ16_MEMBER(analogx_r);
4044   DECLARE_READ16_MEMBER(analogy_watchdog_r);
45   
46   virtual void machine_start();
47   
4148   TMS340X0_TO_SHIFTREG_CB_MEMBER(to_shiftreg);
4249   TMS340X0_FROM_SHIFTREG_CB_MEMBER(from_shiftreg);
4350   TMS340X0_SCANLINE_RGB32_CB_MEMBER(scanline_update);
4451};
4552
4653
54void xtheball_state::machine_start()
55{
56   save_item(NAME(m_bitvals));
57}
4758
48
4959/*************************************
5060 *
5161 *  Video update
r244854r244855
108118   else if (address >= 0x02000000 && address <= 0x020fffff)
109119      memcpy(shiftreg, &m_vram_fg[TOWORD(address & 0xff000)], TOBYTE(0x1000));
110120   else
111      logerror("%s:xtheball_to_shiftreg(%08X)\n", space.machine().describe_context(), address);
121      logerror("%s:to_shiftreg(%08X)\n", space.machine().describe_context(), address);
112122}
113123
114124
r244854r244855
119129   else if (address >= 0x02000000 && address <= 0x020fffff)
120130      memcpy(&m_vram_fg[TOWORD(address & 0xff000)], shiftreg, TOBYTE(0x1000));
121131   else
122      logerror("%s:xtheball_from_shiftreg(%08X)\n", space.machine().describe_context(), address);
132      logerror("%s:from_shiftreg(%08X)\n", space.machine().describe_context(), address);
123133}
124134
125135
r244854r244855
381391 *
382392 *************************************/
383393
384GAME( 1991, xtheball, 0, xtheball, xtheball, driver_device, 0,  ROT0, "Rare", "X the Ball", 0 )
394GAME( 1991, xtheball, 0, xtheball, xtheball, driver_device, 0,  ROT0, "Rare", "X the Ball", GAME_SUPPORTS_SAVE )


Previous 199869 Revisions Next


© 1997-2024 The MAME Team