Previous 199869 Revisions Next

r22862 Thursday 16th May, 2013 at 22:20:09 UTC by Phil Bennett
Fix skullxbo.c regression -nw-
[src/mame/drivers]skullxbo.c
[src/mame/includes]skullxbo.h

trunk/src/mame/drivers/skullxbo.c
r22861r22862
3939}
4040
4141
42void skullxbo_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
42TIMER_DEVICE_CALLBACK_MEMBER(skullxbo_state::scanline_timer)
4343{
44   switch (id)
45   {
46   case TIMER_IRQ_GEN:
47      scanline_int_gen(m_maincpu);
48      break;
49   default:
50      assert_always(FALSE, "Unknown id in skullxbo_state::device_timer");
51   }
44   scanline_int_gen(m_maincpu);
5245}
5346
5447
r22861r22862
6255   {
6356      int width = screen.width();
6457      attotime period = screen.time_until_pos(screen.vpos() + 6, width * 0.9);
65      timer_set(period, TIMER_IRQ_GEN);
58      m_scanline_timer->adjust(period);
6659   }
6760
6861   /* update the playfield and motion objects */
r22861r22862
256249   MCFG_CPU_PROGRAM_MAP(main_map)
257250   MCFG_DEVICE_VBLANK_INT_DRIVER("screen", atarigen_state, video_int_gen)
258251
252   MCFG_TIMER_DRIVER_ADD("scan_timer", skullxbo_state, scanline_timer)
259253   MCFG_MACHINE_RESET_OVERRIDE(skullxbo_state,skullxbo)
260254   MCFG_NVRAM_ADD_1FILL("eeprom")
261255
trunk/src/mame/includes/skullxbo.h
r22861r22862
99class skullxbo_state : public atarigen_state
1010{
1111public:
12   enum
13   {
14      TIMER_IRQ_GEN
15   };
16
1712   skullxbo_state(const machine_config &mconfig, device_type type, const char *tag)
18      : atarigen_state(mconfig, type, tag) { }
13      : atarigen_state(mconfig, type, tag),
14         m_scanline_timer(*this, "scan_timer") { }
15
16   required_device<timer_device> m_scanline_timer;
17
1918   virtual void update_interrupts();
2019   virtual void scanline_update(screen_device &screen, int scanline);
2120   DECLARE_WRITE16_MEMBER(skullxbo_halt_until_hblank_0_w);
r22861r22862
2827   DECLARE_MACHINE_RESET(skullxbo);
2928   DECLARE_VIDEO_START(skullxbo);
3029   UINT32 screen_update_skullxbo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
30   TIMER_DEVICE_CALLBACK_MEMBER(scanline_timer);
3131   void skullxbo_scanline_update(int scanline);
3232   DECLARE_WRITE16_MEMBER( skullxbo_playfieldlatch_w );
3333   DECLARE_WRITE16_MEMBER( skullxbo_xscroll_w );
3434   DECLARE_WRITE16_MEMBER( skullxbo_yscroll_w );
3535   DECLARE_WRITE16_MEMBER( skullxbo_mobmsb_w );
36
37protected:
38   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
3936};

Previous 199869 Revisions Next


© 1997-2024 The MAME Team