Previous 199869 Revisions Next

r19071 Tuesday 20th November, 2012 at 16:58:22 UTC by hap
added jumper for disabling nmi
[src/mame/drivers]starfire.c
[src/mame/includes]starfire.h

trunk/src/mame/includes/starfire.h
r19070r19071
1/***************************************************************************
12
3    Star Fire/Fire One system
4
5***************************************************************************/
6
27#define STARFIRE_MASTER_CLOCK   (20000000)
38#define STARFIRE_CPU_CLOCK      (STARFIRE_MASTER_CLOCK / 8)
49#define STARFIRE_PIXEL_CLOCK   (STARFIRE_MASTER_CLOCK / 4)
r19070r19071
1419{
1520public:
1621   starfire_state(const machine_config &mconfig, device_type type, const char *tag)
17      : driver_device(mconfig, type, tag) ,
22      : driver_device(mconfig, type, tag),
1823      m_starfire_colorram(*this, "colorram"),
19      m_starfire_videoram(*this, "videoram"){ }
24      m_starfire_videoram(*this, "videoram")
25   { }
2026
2127    read8_delegate m_input_read;
2228
r19070r19071
4551   virtual void video_start();
4652   UINT32 screen_update_starfire(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
4753   TIMER_CALLBACK_MEMBER(starfire_scanline_callback);
54   INTERRUPT_GEN_MEMBER(vblank_int);
4855};
trunk/src/mame/drivers/starfire.c
r19070r19071
5757
5858WRITE8_MEMBER(starfire_state::starfire_scratch_w)
5959{
60
6160    /* A12 and A3 select video control registers */
6261   if ((offset & 0x1008) == 0x1000)
6362   {
r19070r19071
6968            /* Sounds */
7069            m_fireone_select = (data & 0x8) ? 0 : 1;
7170            break;
71         default: break;
7272      }
7373   }
7474
r19070r19071
8080
8181READ8_MEMBER(starfire_state::starfire_scratch_r)
8282{
83
8483    /* A11 selects input ports */
8584   if (offset & 0x800)
8685      return m_input_read(space, offset, 0xff);
r19070r19071
204203
205204   PORT_START("STICKZ")   /* IN4 */ /* throttle */
206205   PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Z ) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) PORT_REVERSE
206
207   PORT_START("NMI")
208   PORT_CONFNAME( 0x01, 0x01, "Jumper J6/4G: Enable NMI" )
209   PORT_CONFSETTING(    0x00, DEF_STR( No ) )
210   PORT_CONFSETTING(    0x01, DEF_STR( Yes ) )
207211INPUT_PORTS_END
208212
209213
r19070r19071
258262 *
259263 *************************************/
260264
265INTERRUPT_GEN_MEMBER(starfire_state::vblank_int)
266{
267   // starfire has a jumper for disabling NMI, used to do a complete RAM test
268   if (ioport("NMI")->read_safe(0x01))
269      device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
270}
271
261272static MACHINE_CONFIG_START( starfire, starfire_state )
262273
263274   /* basic machine hardware */
264275   MCFG_CPU_ADD("maincpu", Z80, STARFIRE_CPU_CLOCK)
265276   MCFG_CPU_PROGRAM_MAP(main_map)
266   MCFG_CPU_VBLANK_INT_DRIVER("screen", starfire_state, nmi_line_pulse)
277   MCFG_CPU_VBLANK_INT_DRIVER("screen", starfire_state, vblank_int)
267278
268279   /* video hardware */
269280   MCFG_SCREEN_ADD("screen", RASTER)
270281   MCFG_SCREEN_RAW_PARAMS(STARFIRE_PIXEL_CLOCK, STARFIRE_HTOTAL, STARFIRE_HBEND, STARFIRE_HBSTART, STARFIRE_VTOTAL, STARFIRE_VBEND, STARFIRE_VBSTART)
271282   MCFG_SCREEN_UPDATE_DRIVER(starfire_state, screen_update_starfire)
272283
273
274284   /* audio hardware */
275285MACHINE_CONFIG_END
276286
r19070r19071
371381
372382DRIVER_INIT_MEMBER(starfire_state,starfire)
373383{
374
375384   m_input_read = read8_delegate(FUNC(starfire_state::starfire_input_r),this);
376385}
377386
378387DRIVER_INIT_MEMBER(starfire_state,fireone)
379388{
380
381389   m_input_read = read8_delegate(FUNC(starfire_state::fireone_input_r),this);
382390
383391   /* register for state saving */
r19070r19071
394402
395403GAME( 1979, starfire, 0,        starfire, starfire, starfire_state, starfire, ROT0, "Exidy", "Star Fire (set 1)", GAME_NO_SOUND | GAME_SUPPORTS_SAVE )
396404GAME( 1979, starfirea,starfire, starfire, starfire, starfire_state, starfire, ROT0, "Exidy", "Star Fire (set 2)", GAME_NO_SOUND | GAME_SUPPORTS_SAVE )
397GAME( 1979, fireone,  0,        starfire, fireone, starfire_state, fireone,  ROT0, "Exidy", "Fire One", GAME_NO_SOUND | GAME_SUPPORTS_SAVE )
405GAME( 1979, fireone,  0,        starfire, fireone, starfire_state, fireone,  ROT0, "Exidy", "Fire One", GAME_NO_SOUND | GAME_SUPPORTS_SAVE )
398406GAME( 1979, starfir2, 0,        starfire, starfire, starfire_state, starfire, ROT0, "Exidy", "Star Fire 2", GAME_NO_SOUND | GAME_SUPPORTS_SAVE )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team