Ejemplo n.º 1
0
Archivo: fk1.c Proyecto: cdenix/psmame
	//logerror("fk1_ppi_1_a_r\n");
	return 0xff;
}
static READ8_DEVICE_HANDLER (fk1_ppi_1_b_r )
{
//  logerror("fk1_ppi_1_b_r\n");
	return 0;
}
static READ8_DEVICE_HANDLER (fk1_ppi_1_c_r )
{
//  logerror("fk1_ppi_1_c_r\n");
	return 0;
}
static I8255A_INTERFACE( fk1_ppi8255_interface_1 )
{
	DEVCB_HANDLER(fk1_ppi_1_a_r),
	DEVCB_HANDLER(fk1_ppi_1_b_r),
	DEVCB_HANDLER(fk1_ppi_1_c_r),
	DEVCB_HANDLER(fk1_ppi_1_a_w),
	DEVCB_HANDLER(fk1_ppi_1_b_w),
	DEVCB_HANDLER(fk1_ppi_1_c_w)
};

/*
Port A:
    Writing data to disk
Port B:
    Reading data from disk
Port C:
    READING:
        7 - / OF A data write to disk,
Ejemplo n.º 2
0
	DEVCB_LINE(vdp_interrupt)
};

static WRITE8_DEVICE_HANDLER( sg1000a_coin_counter_w )
{
	coin_counter_w(device->machine(), 0, data & 0x01);
}

static I8255_INTERFACE( ppi8255_intf )
{
	DEVCB_INPUT_PORT("P1"),
	DEVCB_NULL,
	DEVCB_INPUT_PORT("P2"),
	DEVCB_NULL,
	DEVCB_INPUT_PORT("DSW"),
	DEVCB_HANDLER(sg1000a_coin_counter_w)
};

/*************************************
 *
 *  Machine drivers
 *
 *************************************/

static MACHINE_CONFIG_START( sg1000a, sg1000a_state )
	/* basic machine hardware */
	MCFG_CPU_ADD("maincpu", Z80, XTAL_3_579545MHz)
	MCFG_CPU_PROGRAM_MAP(program_map)
	MCFG_CPU_IO_MAP(io_map)

	MCFG_I8255_ADD( "ppi8255", ppi8255_intf )
Ejemplo n.º 3
0
	n8080_state *n8080 = device->machine->driver_data<n8080_state>();
	n8080->inte = state;
}

static WRITE8_DEVICE_HANDLER( n8080_status_callback )
{
	if (data & I8085_STATUS_INTA)
	{
		/* interrupt acknowledge */
		cpu_set_input_line(device, INPUT_LINE_IRQ0, CLEAR_LINE);
	}
}

static I8085_CONFIG( n8080_cpu_config )
{
	DEVCB_HANDLER(n8080_status_callback),	/* STATUS changed callback */
	DEVCB_LINE(n8080_inte_callback),		/* INTE changed callback */
	DEVCB_NULL,								/* SID changed callback (8085A only) */
	DEVCB_NULL								/* SOD changed callback (8085A only) */
};

static MACHINE_START( n8080 )
{
	n8080_state *state = machine->driver_data<n8080_state>();

	state->maincpu = machine->device("maincpu");

	state->save_item(NAME(state->shift_data));
	state->save_item(NAME(state->shift_bits));
	state->save_item(NAME(state->inte));
}
Ejemplo n.º 4
0
static void volume_callback( device_t *device, int v )
{
	k007232_set_volume(device, 0, (v & 0x0f) * 0x11, 0);
	k007232_set_volume(device, 1, 0, (v >> 4) * 0x11);
}

static const k007232_interface k007232_config =
{
	volume_callback	/* external port callback */
};

static const ym2151_interface ym2151_config =
{
	DEVCB_NULL,
	DEVCB_HANDLER(aliens_snd_bankswitch_w)
};


static const k052109_interface aliens_k052109_intf =
{
	"gfx1", 0,
	NORMAL_PLANE_ORDER,
	KONAMI_ROM_DEINTERLEAVE_2,
	aliens_tile_callback
};

static const k051960_interface aliens_k051960_intf =
{
	"gfx2", 1,
	NORMAL_PLANE_ORDER,
Ejemplo n.º 5
0
	freekick_state *state = device->machine().driver_data<freekick_state>();
	state->m_romaddr = (state->m_romaddr & 0x00ff) | (data << 8);
}

static READ8_DEVICE_HANDLER( snd_rom_r )
{
	freekick_state *state = device->machine().driver_data<freekick_state>();
	return state->memregion("user1")->base()[state->m_romaddr & 0x7fff];
}

static const ppi8255_interface ppi8255_intf[2] =
{
	{
		DEVCB_NULL,							/* Port A read */
		DEVCB_NULL,							/* Port B read */
		DEVCB_HANDLER(snd_rom_r),			/* Port C read */
		DEVCB_HANDLER(snd_rom_addr_l_w),	/* Port A write */
		DEVCB_HANDLER(snd_rom_addr_h_w),	/* Port B write */
		DEVCB_NULL							/* Port C write */
	},
	{
		DEVCB_INPUT_PORT("DSW1"),			/* Port A read */
		DEVCB_INPUT_PORT("DSW2"),			/* Port B read */
		DEVCB_INPUT_PORT("DSW3"),			/* Port C read */
		DEVCB_NULL,							/* Port A write */
		DEVCB_NULL,							/* Port B write */
		DEVCB_NULL							/* Port C write */
	}
};

Ejemplo n.º 6
0
 *
 *  Sound interfaces
 *
 *************************************/

static const pokey_interface bzone_pokey_interface =
{
	{ DEVCB_NULL },
	DEVCB_INPUT_PORT("IN3")
};


static const pokey_interface redbaron_pokey_interface =
{
	{ DEVCB_NULL },
	DEVCB_HANDLER(redbaron_joy_r)
};



/*************************************
 *
 *  Machine driver
 *
 *************************************/

static MACHINE_DRIVER_START( bzone_base )

	/* basic machine hardware */
	MDRV_CPU_ADD("maincpu", M6502, BZONE_MASTER_CLOCK / 8)
	MDRV_CPU_PROGRAM_MAP(bzone_map)
Ejemplo n.º 7
0
static TIMER_CALLBACK(apple1_dsp_ready_start);
static TIMER_CALLBACK(apple1_dsp_ready_end);

/*****************************************************************************
**  Structures
*****************************************************************************/

/* Handlers for the PIA.  The inputs for Port B, CA1, and CB1 are
   handled by writing to them at the moment when their values change,
   rather than updating them when they are read; thus they don't need
   handler functions. */

const pia6821_interface apple1_pia0 =
{
	DEVCB_HANDLER(apple1_pia0_kbdin),				/* Port A input (keyboard) */
	DEVCB_NULL,										/* Port B input (display status) */
	DEVCB_NULL,										/* CA1 input (key pressed) */
	DEVCB_NULL,										/* CB1 input (display ready) */
	DEVCB_NULL,										/* CA2 not used as input */
	DEVCB_NULL,										/* CB2 not used as input */
	DEVCB_NULL,										/* Port A not used as output */
	DEVCB_HANDLER(apple1_pia0_dspout),				/* Port B output (display) */
	DEVCB_NULL,										/* CA2 not used as output */
	DEVCB_HANDLER(apple1_pia0_dsp_write_signal),	/* CB2 output (display write) */
	DEVCB_NULL,										/* IRQA not connected */
	DEVCB_NULL										/* IRQB not connected */
};

/* Use the same keyboard mapping as on a modern keyboard.  This is not
   the same as the keyboard mapping of the actual teletype-style
Ejemplo n.º 8
0
Archivo: qix.c Proyecto: j4y4r/j4ymame
	DEVCB_NULL,		/* line CA2 out */
	DEVCB_NULL,		/* port CB2 out */
	DEVCB_NULL,		/* IRQA */
	DEVCB_NULL		/* IRQB */
};

const pia6821_interface qix_pia_2_intf =
{
	DEVCB_INPUT_PORT("P2"),				/* port A in */
	DEVCB_NULL,		/* port B in */
	DEVCB_NULL,		/* line CA1 in */
	DEVCB_NULL,		/* line CB1 in */
	DEVCB_NULL,		/* line CA2 in */
	DEVCB_NULL,		/* line CB2 in */
	DEVCB_NULL,		/* port A out */
	DEVCB_HANDLER(qix_coinctl_w),		/* port B out */
	DEVCB_NULL,		/* line CA2 out */
	DEVCB_NULL,		/* port CB2 out */
	DEVCB_NULL,		/* IRQA */
	DEVCB_NULL		/* IRQB */
};



/***************************************************************************

    Games with an MCU need to handle coins differently, and provide
    communication with the MCU

***************************************************************************/
Ejemplo n.º 9
0
Archivo: pes.c Proyecto: poliva/mame-rr
		return;
	}
	state->m_infifo[state->m_infifo_head_ptr] = data;
	state->m_infifo_head_ptr++;
	state->m_infifo_head_ptr&=0x1F;
#ifdef DEBUG_FIFO
	fprintf(stderr,"kb input fifo fullness: %d\n",(state->m_infifo_head_ptr-state->m_infifo_tail_ptr)&0x1F);
#endif
	// todo: following two should be set so clear happens after one cpu cycle
	cputag_set_input_line(device->machine(), "maincpu", MCS51_RX_LINE, ASSERT_LINE);
	cputag_set_input_line(device->machine(), "maincpu", MCS51_RX_LINE, CLEAR_LINE);
}

static GENERIC_TERMINAL_INTERFACE( pes_terminal_intf )
{
	DEVCB_HANDLER(pes_kbd_input)
};

/* Helper Functions */
static int data_to_i8031(device_t *device)
{
	pes_state *state = device->machine().driver_data<pes_state>();
	UINT8 data;
	data = state->m_infifo[state->m_infifo_tail_ptr];
	// if fifo is empty (tail ptr == head ptr), do not increment the tail ptr, otherwise do.
	if (state->m_infifo_tail_ptr != state->m_infifo_head_ptr) state->m_infifo_tail_ptr++;
	state->m_infifo_tail_ptr&=0x1F;
#ifdef DEBUG_SERIAL_CB
	fprintf(stderr,"callback: input to i8031/pes from pc/terminal: %02X\n",data);
#endif
	return data;
Ejemplo n.º 10
0
{
	AY8910_LEGACY_OUTPUT,
	AY8910_DEFAULT_LOADS,
	DEVCB_INPUT_PORT("DSWA"),		// DSW A
	DEVCB_INPUT_PORT("DSWB"),		// DSW B
	DEVCB_NULL,
	DEVCB_NULL
};

static const ay8910_interface ay8910_interface_2 =
{
	AY8910_LEGACY_OUTPUT,
	AY8910_DEFAULT_LOADS,
	DEVCB_NULL,
	DEVCB_NULL,
	DEVCB_HANDLER(unknown_port_1_w),	// ??
	DEVCB_HANDLER(unknown_port_2_w)	// ??
};


/***************************************************************************

  Input Port(s)

***************************************************************************/

static INPUT_PORTS_START( chaknpop )
	PORT_START("SYSTEM")
	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 )	// LEFT COIN
Ejemplo n.º 11
0
{
    coin_counter_w(device->machine(), 1, ~data & 1);
}

/* chip #0: player inputs, buttons, coins */
static const namcoio_interface intf0 =
{
    { DEVCB_INPUT_PORT("COINS"), DEVCB_INPUT_PORT("P1"), DEVCB_INPUT_PORT("P2"), DEVCB_INPUT_PORT("BUTTONS") },	/* port read handlers */
    { DEVCB_NULL, DEVCB_NULL },		/* port write handlers */
    NULL	/* device */
};

static const namcoio_interface intf0_lamps =
{
    { DEVCB_INPUT_PORT("COINS"), DEVCB_INPUT_PORT("P1"), DEVCB_INPUT_PORT("P2"), DEVCB_INPUT_PORT("BUTTONS") },	/* port read handlers */
    { DEVCB_HANDLER(out_lamps0), DEVCB_HANDLER(out_lamps1) },		/* port write handlers */
    NULL	/* device */
};

/* chip #1: dip switches */
static const namcoio_interface intf1 =
{
    { DEVCB_INPUT_PORT("DSWA_HIGH"), DEVCB_INPUT_PORT("DSWB_LOW"), DEVCB_INPUT_PORT("DSWB_HIGH"), DEVCB_INPUT_PORT("DSWA_LOW") },	/* port read handlers */
    { DEVCB_NULL, DEVCB_NULL },		/* port write handlers */
    NULL	/* device */
};

/* TODO: chip #2: test/cocktail, optional buttons */


static MACHINE_CONFIG_START( gaplus, gaplus_state )
Ejemplo n.º 12
0
	return 0xff;
}


static WRITE8_DEVICE_HANDLER(input_mux_w)
{
	bmcbowl_state *state = device->machine().driver_data<bmcbowl_state>();
	state->m_bmc_input=data;
}


static const ay8910_interface ay8910_config =
{
	AY8910_LEGACY_OUTPUT,
	AY8910_DEFAULT_LOADS,
	DEVCB_HANDLER(dips1_r),
	DEVCB_NULL,
	DEVCB_NULL,
	DEVCB_HANDLER(input_mux_w)
};


static const via6522_interface via_interface =
{
	/*inputs : A/B         */ DEVCB_NULL, DEVCB_HANDLER(via_b_in),
	/*inputs : CA/B1,CA/B2 */ DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL,
	/*outputs: A/B         */ DEVCB_HANDLER(via_a_out), DEVCB_HANDLER(via_b_out),
	/*outputs: CA/B1,CA/B2 */ DEVCB_NULL, DEVCB_NULL, DEVCB_HANDLER(via_ca2_out), DEVCB_NULL,
	/*irq                  */ DEVCB_HANDLER(via_irq)
};
Ejemplo n.º 13
0
static const z80_daisy_config daisy_chain_sound[] =
{
	{ "ctc" },
	{ NULL }
};

static const ppi8255_interface ppi8255_intf[3] =
{
	{
		DEVCB_INPUT_PORT("P1"),			/* Port A read */
		DEVCB_NULL,						/* Port B read */
		DEVCB_NULL,						/* Port C read */
		DEVCB_NULL,						/* Port A write */
		DEVCB_NULL,						/* Port B write */  /* related to sound/music : check code at 0x1c0a */
		DEVCB_HANDLER(vidctrl_w)		/* Port C write */
	},
	{
		DEVCB_INPUT_PORT("DSW1"),		/* Port A read */
		DEVCB_INPUT_PORT("DSW2"),		/* Port B read */
		DEVCB_HANDLER(protection_r),	/* Port C read */
		DEVCB_NULL,						/* Port A write */
		DEVCB_NULL,						/* Port B write */
		DEVCB_HANDLER(protection_w)		/* Port C write */
	},
	{
		DEVCB_NULL,						/* Port A read */
		DEVCB_NULL,						/* Port B read */
		DEVCB_NULL,						/* Port C read */
		DEVCB_NULL,						/* Port A write */
		DEVCB_NULL,						/* Port B write */
Ejemplo n.º 14
0
static const ym3526_interface bestbest_ym3526_interface =
{
	DEVCB_CPU_INPUT_LINE("audiocpu", INPUT_LINE_IRQ0)
};

static WRITE8_DEVICE_HANDLER( bestbest_ay8910_port_a_w )
{
	// ?
}

static const ay8910_interface bestbest_ay8910_interface =
{
	AY8910_LEGACY_OUTPUT,
	AY8910_DEFAULT_LOADS,
	DEVCB_NULL,									DEVCB_NULL,
	DEVCB_HANDLER(bestbest_ay8910_port_a_w),	DEVCB_NULL
};

static MACHINE_CONFIG_START( bestbest, suna16_state )

	/* basic machine hardware */
	MCFG_CPU_ADD("maincpu", M68000, 24000000/4)
	MCFG_CPU_PROGRAM_MAP(bestbest_map)
	MCFG_TIMER_ADD_SCANLINE("scantimer", bssoccer_interrupt, "screen", 0, 1)

	MCFG_CPU_ADD("audiocpu", Z80, 24000000/4)
	MCFG_CPU_PROGRAM_MAP(bestbest_sound_map)

	MCFG_CPU_ADD("pcm1", Z80, 24000000/4)
	MCFG_CPU_PROGRAM_MAP(bestbest_pcm_1_map)
	MCFG_CPU_IO_MAP(bestbest_pcm_1_iomap)
Ejemplo n.º 15
0
{
	// from gameplan.c

	/* Kaos sits in a tight loop polling the VIA irq flags register, but that register is
       cleared by the irq handler. Therefore, I wait a bit before triggering the irq to
       leave time for the program to see the flag change. */
	timer_set(device->machine, ATTOTIME_IN_USEC(50), NULL, state, via_irq_delayed);
}


static const via6522_interface via_1_interface =
{
	/*inputs : A/B         */ DEVCB_INPUT_PORT("IN0"), DEVCB_INPUT_PORT("IN1"),
	/*inputs : CA/B1,CA/B2 */ DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL,
	/*outputs: A/B         */ DEVCB_NULL, DEVCB_NULL,
	/*outputs: CA/B1,CA/B2 */ DEVCB_NULL, DEVCB_NULL, DEVCB_HANDLER(trvquest_coin_w), DEVCB_NULL,
	/*irq                  */ DEVCB_NULL
};

static const via6522_interface via_2_interface =
{
	/*inputs : A/B         */ DEVCB_INPUT_PORT("UNK"), DEVCB_INPUT_PORT("DSW"),
	/*inputs : CA/B1,CA/B2 */ DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL,
	/*outputs: A/B         */ DEVCB_NULL, DEVCB_NULL,
	/*outputs: CA/B1,CA/B2 */ DEVCB_NULL, DEVCB_NULL, DEVCB_HANDLER(trvquest_misc_w), DEVCB_NULL,
	/*irq                  */ DEVCB_LINE(via_irq)
};


static MACHINE_START( trvquest )
{
Ejemplo n.º 16
0
// keyscan
static READ8_DEVICE_HANDLER( mirage_via_read_ca2 )
{
	return 0;
}


// keyscan
static READ8_DEVICE_HANDLER( mirage_via_read_cb2 )
{
	return 0;
}

const via6522_interface mirage_via =
{
	DEVCB_HANDLER(mirage_via_read_porta),
	DEVCB_HANDLER(mirage_via_read_portb),
	DEVCB_HANDLER(mirage_via_read_ca1),
	DEVCB_HANDLER(mirage_via_read_cb1),
	DEVCB_HANDLER(mirage_via_read_ca2),
	DEVCB_HANDLER(mirage_via_read_cb2),
	DEVCB_HANDLER(mirage_via_write_porta),
	DEVCB_HANDLER(mirage_via_write_portb),
	DEVCB_NULL,
	DEVCB_NULL,
	DEVCB_NULL,
	DEVCB_NULL,
	DEVCB_CPU_INPUT_LINE("maincpu", M6809_IRQ_LINE)
};

static ACIA6850_INTERFACE( mirage_acia6850_interface )
Ejemplo n.º 17
0
}

static READ8_DEVICE_HANDLER( get_slave_ack )
{
	quakeat_state *state = device->machine().driver_data<quakeat_state>();
	if (offset==2) { // IRQ = 2
		return pic8259_acknowledge(state->m_pic8259_2);
	}
	return 0x00;
}

static const struct pic8259_interface quakeat_pic8259_1_config =
{
	DEVCB_LINE(quakeat_pic8259_1_set_int_line),
	DEVCB_LINE_VCC,
	DEVCB_HANDLER(get_slave_ack)
};

static const struct pic8259_interface quakeat_pic8259_2_config =
{
	DEVCB_DEVICE_LINE("pic8259_1", pic8259_ir2_w),
	DEVCB_LINE_GND,
	DEVCB_NULL
};

/*************************************************************/

static INPUT_PORTS_START( quake )
INPUT_PORTS_END

/*************************************************************/
Ejemplo n.º 18
0
	PORT_START("DSW2")
	PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END


/**********************************
*       AY-3-8910 Interface       *
**********************************/

static const ay8910_interface ay8910_config =
{
	AY8910_LEGACY_OUTPUT,
	AY8910_DEFAULT_LOADS,
	DEVCB_INPUT_PORT("DSW2"),
	DEVCB_INPUT_PORT("DSW1"),
	DEVCB_HANDLER(mux_w),
	DEVCB_NULL
};


/**************************************
*           Machine Driver            *
**************************************/

static MACHINE_CONFIG_START( big10, big10_state )

	/* basic machine hardware */
	MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/6)	/* guess */
	MCFG_CPU_PROGRAM_MAP(main_map)
	MCFG_CPU_IO_MAP(main_io)
	MCFG_TIMER_ADD_SCANLINE("scantimer", big10_interrupt, "screen", 0, 1)
Ejemplo n.º 19
0
}

static WRITE8_DEVICE_HANDLER(dummy3_w)
{
//  printf("%02x 3\n", data);
}


static const ay8910_interface ay8910_interface_1 =
{
	AY8910_LEGACY_OUTPUT,
	AY8910_DEFAULT_LOADS,
	DEVCB_MEMORY_HANDLER("audiocpu", PROGRAM, soundlatch_r),
	DEVCB_NULL,
	DEVCB_NULL,
	DEVCB_HANDLER(dummy1_w)
};

static const ay8910_interface ay8910_interface_2 =
{
	AY8910_LEGACY_OUTPUT,
	AY8910_DEFAULT_LOADS,
	DEVCB_NULL,
	DEVCB_NULL,
	DEVCB_HANDLER(dummy2_w),
	DEVCB_HANDLER(dummy3_w)
};

static const gfx_layout charlayout =
{
	8,8,
Ejemplo n.º 20
0
        PB3     DO3
        PB4     DO4
        PB5     DO5
        PB6     DO6
        PB7     DO7

    */

	c9060_t *c9060 = get_safe_token(device->owner());

	ieee488_dio_w(c9060->bus, device->owner(), data);
}

static const riot6532_interface riot0_intf =
{
	DEVCB_HANDLER(dio_r),
	DEVCB_NULL,
	DEVCB_NULL,
	DEVCB_HANDLER(dio_w),
	DEVCB_NULL
};

/*-------------------------------------------------
    riot6532_interface riot1_intf ue1
-------------------------------------------------*/

static READ8_DEVICE_HANDLER( riot1_pa_r )
{
	/*

        bit     description
Ejemplo n.º 21
0
GFX( charlayout_3bpp, 0x2000*8,   0,          4          )

static GFXDECODE_START( hanaawas )
	GFXDECODE_ENTRY( "gfx1", 0, charlayout_1bpp, 0, 32 )
	GFXDECODE_ENTRY( "gfx1", 0, charlayout_3bpp, 0, 32 )
GFXDECODE_END


static const ay8910_interface ay8910_config =
{
	AY8910_LEGACY_OUTPUT,
	AY8910_DEFAULT_LOADS,
	DEVCB_INPUT_PORT("DSW"),
	DEVCB_NULL,
	DEVCB_NULL,
	DEVCB_HANDLER(hanaawas_portB_w)
};


static MACHINE_START( hanaawas )
{
	hanaawas_state *state = machine->driver_data<hanaawas_state>();

	state->save_item(NAME(state->mux));
}

static MACHINE_RESET( hanaawas )
{
	hanaawas_state *state = machine->driver_data<hanaawas_state>();

	state->mux = 0;
Ejemplo n.º 22
0


/*************************************
 *
 *  Machine driver
 *
 *************************************/

static const cia6526_interface cia_0_intf =
{
	DEVCB_LINE(amiga_cia_0_irq),										/* irq_func */
	DEVCB_NULL,	/* pc_func */
	0,														/* tod_clock */
	{
		{ DEVCB_NULL, DEVCB_HANDLER(upscope_cia_0_porta_w) },					/* port A */
		{ DEVCB_HANDLER(upscope_cia_0_portb_r), DEVCB_HANDLER(upscope_cia_0_portb_w) }	/* port B */
	}
};

static const cia6526_interface cia_1_intf =
{
	DEVCB_LINE(amiga_cia_1_irq),										/* irq_func */
	DEVCB_NULL,	/* pc_func */
	0,														/* tod_clock */
	{
		{ DEVCB_HANDLER(upscope_cia_1_porta_r), DEVCB_HANDLER(upscope_cia_1_porta_w), },	/* port A */
		{ DEVCB_NULL, DEVCB_NULL }										/* port B */
	}
};
Ejemplo n.º 23
0
};


/* z80 pio */

static READ8_DEVICE_HANDLER( pio_pa_r )
{
	senjyo_state *state = device->machine->driver_data<senjyo_state>();

	return state->sound_cmd;
}

Z80PIO_INTERFACE( senjyo_pio_intf )
{
	DEVCB_CPU_INPUT_LINE("sub", INPUT_LINE_IRQ0),
	DEVCB_HANDLER(pio_pa_r),
	DEVCB_NULL,
	DEVCB_NULL,
	DEVCB_NULL,
	DEVCB_NULL,
	DEVCB_NULL
};

/* z80 ctc */
Z80CTC_INTERFACE( senjyo_ctc_intf )
{
	NOTIMER_2,       /* timer disables */
	DEVCB_CPU_INPUT_LINE("sub", INPUT_LINE_IRQ0), /* interrupt handler */
	DEVCB_LINE(z80ctc_trg1_w),	/* ZC/TO0 callback */
	DEVCB_NULL,					/* ZC/TO1 callback */
	DEVCB_NULL					/* ZC/TO2 callback */
Ejemplo n.º 24
0
static GFXDECODE_START( qwak )
	GFXDECODE_ENTRY( "gfx1", 0x800, qwak_tile_layout,   0, 1 )
	GFXDECODE_ENTRY( "gfx1", 0x000, qwak_sprite_layout, 0, 1 )
GFXDECODE_END


static const pokey_interface pokey_interface_1 =
{
	{ DEVCB_NULL },
	DEVCB_INPUT_PORT("6008")
};

static const pokey_interface pokey_interface_2 =
{
	{
		DEVCB_HANDLER(runaway_pot_r),
		DEVCB_HANDLER(runaway_pot_r),
		DEVCB_HANDLER(runaway_pot_r),
		DEVCB_HANDLER(runaway_pot_r),
		DEVCB_HANDLER(runaway_pot_r),
		DEVCB_HANDLER(runaway_pot_r),
		DEVCB_HANDLER(runaway_pot_r),
		DEVCB_HANDLER(runaway_pot_r)
	}
};


static MACHINE_DRIVER_START( runaway )

	/* basic machine hardware */
	MDRV_CPU_ADD("maincpu", M6502, 12096000 / 8) /* ? */
Ejemplo n.º 25
0
static READ8_DEVICE_HANDLER(forte2_ay8910_read_input)
{
	return input_port_read(device->machine, "IN0") | (forte2_input_mask&0x3f);
}

static WRITE8_DEVICE_HANDLER( forte2_ay8910_set_input_mask )
{
	/* PSG reg 15, writes 0 at coin insert, 0xff at boot and game over */
	forte2_input_mask = data;
}

static const ay8910_interface forte2_ay8910_interface =
{
	AY8910_LEGACY_OUTPUT,
	AY8910_DEFAULT_LOADS,
	DEVCB_HANDLER(forte2_ay8910_read_input),
	DEVCB_NULL,
	DEVCB_NULL,
	DEVCB_HANDLER(forte2_ay8910_set_input_mask)
};


static void vdp_interrupt(running_machine *machine, int i)
{
	cputag_set_input_line(machine, "maincpu", 0, (i ? HOLD_LINE : CLEAR_LINE));
}

static const TMS9928a_interface tms9928a_interface =
{
	TMS99x8A,
	0x4000,
Ejemplo n.º 26
0
static WRITE8_DEVICE_HANDLER (orion_romdisk_portb_w )
{
	orion_state *state = device->machine().driver_data<orion_state>();
	state->m_romdisk_lsb = data;
}

static WRITE8_DEVICE_HANDLER (orion_romdisk_portc_w )
{
	orion_state *state = device->machine().driver_data<orion_state>();
	state->m_romdisk_msb = data;
}

I8255A_INTERFACE( orion128_ppi8255_interface_1)
{
	DEVCB_HANDLER(orion_romdisk_porta_r),
	DEVCB_NULL,
	DEVCB_NULL,
	DEVCB_NULL,
	DEVCB_HANDLER(orion_romdisk_portb_w),
	DEVCB_HANDLER(orion_romdisk_portc_w)
};


MACHINE_START( orion128 )
{
	orion_state *state = machine.driver_data<orion_state>();
	state->m_video_mode_mask = 7;
}

READ8_HANDLER ( orion128_system_r )
Ejemplo n.º 27
0
	dassault_state *driver_state = device->machine().driver_data<dassault_state>();
	device_set_input_line(driver_state->m_audiocpu, 1, state);
}

static WRITE8_DEVICE_HANDLER( sound_bankswitch_w )
{
	dassault_state *state = device->machine().driver_data<dassault_state>();

	/* the second OKIM6295 ROM is bank switched */
	state->m_oki2->set_bank_base((data & 1) * 0x40000);
}

static const ym2151_interface ym2151_config =
{
	DEVCB_LINE(sound_irq),
	DEVCB_HANDLER(sound_bankswitch_w)
};

/**********************************************************************************/

static const decocomn_interface dassault_decocomn_intf =
{
	"screen",
};

static int dassault_bank_callback( const int bank )
{
	return ((bank >> 4) & 0xf) << 12;
}

static const deco16ic_interface dassault_deco16ic_tilegen1_intf =
Ejemplo n.º 28
0
{
	return space.machine().root_device().ioport("djoy_0_1")->read_safe(0);
}

READ8_DEVICE_HANDLER(atari_pia_pb_r)
{
	return space.machine().root_device().ioport("djoy_2_3")->read_safe(0);
}

WRITE8_DEVICE_HANDLER(a600xl_pia_pb_w) { a600xl_mmu(device->machine(), data); }

WRITE_LINE_DEVICE_HANDLER(atari_pia_cb2_w) { }	// This is used by Floppy drive on Atari 8bits Home Computers

const pia6821_interface atarixl_pia_interface =
{
	DEVCB_HANDLER(atari_pia_pa_r),		/* port A in */
	DEVCB_HANDLER(atari_pia_pb_r),	/* port B in */
	DEVCB_NULL,		/* line CA1 in */
	DEVCB_NULL,		/* line CB1 in */
	DEVCB_NULL,		/* line CA2 in */
	DEVCB_NULL,		/* line CB2 in */
	DEVCB_NULL,		/* port A out */
	DEVCB_HANDLER(a600xl_pia_pb_w),		/* port B out */
	DEVCB_NULL,		/* line CA2 out */
	DEVCB_LINE(atari_pia_cb2_w),		/* port CB2 out */
	DEVCB_NULL,		/* IRQA */
	DEVCB_NULL		/* IRQB */
};


/**************************************************************
Ejemplo n.º 29
0
};

static GFXDECODE_START( wink )
	GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 4 )
GFXDECODE_END

static READ8_DEVICE_HANDLER( sound_r )
{
	return sound_flag;
}

static const ay8910_interface ay8912_interface =
{
	AY8910_LEGACY_OUTPUT,
	AY8910_DEFAULT_LOADS,
	DEVCB_HANDLER(sound_r),
	DEVCB_NULL,
	DEVCB_NULL,
	DEVCB_NULL
};

//AY portA is fed by an input clock at 15625 Hz
static INTERRUPT_GEN( wink_sound )
{
	sound_flag ^= 0x80;
}

static MACHINE_RESET( wink )
{
	sound_flag = 0;
}
Ejemplo n.º 30
0
		32*8, 33*8, 34*8, 35*8, 36*8, 37*8, 38*8, 39*8 },
	64*8	/* every sprite takes 64 consecutive bytes */
};

static GFXDECODE_START( megazone )
	GFXDECODE_ENTRY( "gfx1", 0, spritelayout,     0, 16 )
	GFXDECODE_ENTRY( "gfx2", 0, charlayout,   16*16, 16 )
GFXDECODE_END



static const ay8910_interface ay8910_config =
{
	AY8910_LEGACY_OUTPUT,
	AY8910_DEFAULT_LOADS,
	DEVCB_HANDLER(megazone_portA_r),
	DEVCB_NULL,
	DEVCB_NULL,
	DEVCB_HANDLER(megazone_portB_w)
};



static MACHINE_DRIVER_START( megazone )

	/* basic machine hardware */
	MDRV_CPU_ADD("maincpu", M6809, 18432000/9)        /* 2 MHz */
	MDRV_CPU_PROGRAM_MAP(megazone_map)
	MDRV_CPU_VBLANK_INT("screen", irq0_line_hold)

	MDRV_CPU_ADD("audiocpu", Z80,18432000/6)     /* Z80 Clock is derived from the H1 signal */