Exemple #1
0
{
	int state = !m_dma_eop || m_uart_dr || m_uart_tbre || m_fdc_dd0 || m_fdc_dd1 || m_fdc->get_irq() || m_fpu_irq || m_bus_irq2;

	pic8259_ir2_w(m_pic, state);
}

static IRQ_CALLBACK( wangpc_irq_callback )
{
	wangpc_state *state = device->machine().driver_data<wangpc_state>();

	return pic8259_acknowledge(state->m_pic);
}

static const struct pic8259_interface pic_intf =
{
	DEVCB_CPU_INPUT_LINE(I8086_TAG, INPUT_LINE_IRQ0),
	DEVCB_LINE_VCC,
	DEVCB_NULL
};


//-------------------------------------------------
//  I8255A_INTERFACE( ppi_intf )
//-------------------------------------------------

READ8_MEMBER( wangpc_state::ppi_pa_r )
{
	/*

        bit     description
Exemple #2
0
	GFXDECODE_ENTRY( "gfx2", 0x11000, tilelayout2,  0x80, 16 )
	GFXDECODE_ENTRY( "gfx2", 0x18000, tilelayout1,  0x80, 16 )
	GFXDECODE_ENTRY( "gfx2", 0x19000, tilelayout2,  0x80, 16 )
	GFXDECODE_ENTRY( "gfx3", 0x00000, spritelayout, 0x40,  8 )	/* use colors 0x40-0x7f */
GFXDECODE_END


/*************************************
 *
 *  Sound interface
 *
 *************************************/

static const ym3526_interface ym3526_config =
{
	DEVCB_CPU_INPUT_LINE("audiocpu", M6809_IRQ_LINE)
};



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

static MACHINE_START( brkthru )
{
	brkthru_state *state = machine.driver_data<brkthru_state>();

	state->m_maincpu = machine.device("maincpu");
Exemple #3
0
	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('O')
	PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END

/***************************************************************************
    DEVICE CONFIGURATION
***************************************************************************/

/*-------------------------------------------------
    TMS9928a_interface tms9918_intf
-------------------------------------------------*/

static TMS9928A_INTERFACE( vdp_intf )
{
	0x4000,
	DEVCB_CPU_INPUT_LINE(M6809_TAG, INPUT_LINE_IRQ0)
};

/*-------------------------------------------------
    ptm6840_interface ptm_intf
-------------------------------------------------*/

WRITE8_MEMBER(arachnid_state::ptm_o1_callback)
{
	m_speaker->level_w(data);
}

static const ptm6840_interface ptm_intf =
{
	XTAL_8MHz / 4,
	{ 0, 0, 0 },
Exemple #4
0
	PORT_BIT( 0x040, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("B 6") PORT_CODE(KEYCODE_6_PAD)
	PORT_BIT( 0x080, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("B 7") PORT_CODE(KEYCODE_1_PAD)
	PORT_BIT( 0x100, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("B 8") PORT_CODE(KEYCODE_2_PAD)
	PORT_BIT( 0x200, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("B 9") PORT_CODE(KEYCODE_3_PAD)

	PORT_START("CLEAR")
	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("Clear") PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3)) PORT_CHANGED_MEMBER(DEVICE_SELF, studio2_state, reset_w, 0)
INPUT_PORTS_END

/* Video */

static CDP1861_INTERFACE( studio2_cdp1861_intf )
{
	CDP1802_TAG,
	SCREEN_TAG,
	DEVCB_CPU_INPUT_LINE(CDP1802_TAG, COSMAC_INPUT_LINE_INT),
	DEVCB_CPU_INPUT_LINE(CDP1802_TAG, COSMAC_INPUT_LINE_DMAOUT),
	DEVCB_CPU_INPUT_LINE(CDP1802_TAG, COSMAC_INPUT_LINE_EF1)
};

static const rgb_t VISICOM_PALETTE[] =
{
    MAKE_RGB(0x00, 0x80, 0x00),
    MAKE_RGB(0x00, 0x00, 0xff),
    MAKE_RGB(0x00, 0xff, 0x00),
    MAKE_RGB(0xff, 0x00, 0x00)
};

READ_LINE_MEMBER( mpt02_state::rdata_r )
{
	return BIT(m_color, 0);
Exemple #5
0
	CDP1869_PAL,
	cidelsa_pcb_r,
	cidelsa_charram_r,
	cidelsa_charram_w,
	DEVCB_DRIVER_LINE_MEMBER(cidelsa_state, prd_w)
};

static CDP1869_INTERFACE( draco_vis_intf )
{
	SCREEN_TAG,
	0,
	CDP1869_PAL,
	draco_pcb_r,
	draco_charram_r,
	draco_charram_w,
	DEVCB_CPU_INPUT_LINE(CDP1802_TAG, COSMAC_INPUT_LINE_EF1)
};

/* Video Start */

void cidelsa_state::video_start()
{
	// allocate memory
	m_pcbram = auto_alloc_array(machine(), UINT8, CIDELSA_CHARRAM_SIZE);
	m_charram = auto_alloc_array(machine(), UINT8, CIDELSA_CHARRAM_SIZE);

	// register for state saving
	save_item(NAME(m_cdp1869_pcb));
	save_pointer(NAME(m_pcbram), CIDELSA_CHARRAM_SIZE);
	save_pointer(NAME(m_charram), CIDELSA_CHARRAM_SIZE);
}
Exemple #6
0
}

UINT8 phc25_state::ntsc_char_rom_r(running_machine &machine, UINT8 ch, int line)
{
	phc25_state *state = machine.driver_data<phc25_state>();

	return state->m_char_rom[(ch * 16) + line];
}

static const mc6847_interface ntsc_vdg_intf =
{
	SCREEN_TAG,
	DEVCB_DRIVER_MEMBER(phc25_state, video_ram_r),

	DEVCB_NULL,                                         /* horizontal sync */
	DEVCB_CPU_INPUT_LINE(Z80_TAG, INPUT_LINE_IRQ0),     /* field sync */

	DEVCB_NULL,                                         /* AG */
	DEVCB_NULL,                                         /* GM2 */
	DEVCB_NULL,                                         /* GM1 */
	DEVCB_NULL,                                         /* GM0 */
	DEVCB_NULL,                                         /* CSS */
	DEVCB_NULL,                                         /* AS */
	DEVCB_NULL,                                         /* INTEXT */
	DEVCB_NULL,                                         /* INV */

	&phc25_state::ntsc_char_rom_r
};

static const mc6847_interface pal_vdg_intf =
{
Exemple #7
0
	PORT_CONFNAME( 0x03, 0x03, "IDA character set")
	PORT_CONFSETTING(0x00, "Greek")
	PORT_CONFSETTING(0x01, "Norwegian (Codepage 860)")
	PORT_CONFSETTING(0x02, "Portugese (Codepage 865)")
	PORT_CONFSETTING(0x03, "Default (Codepage 437)")
	PORT_CONFNAME( 0x1C, 0x00, "CGA monitor type")
	PORT_CONFSETTING(0x00, "Colour RGB")
	PORT_CONFSETTING(0x04, "Mono RGB")
	PORT_CONFSETTING(0x0C, "Television")
	PORT_BIT ( 0xE0, 0x40, IPT_UNUSED ) /* Chipset is always PPC512 */

INPUT_PORTS_END

static const pc_lpt_interface pc_lpt_config =
{
	DEVCB_CPU_INPUT_LINE("maincpu", 0)
};

static const floppy_format_type ibmpc_floppy_formats[] = {
	FLOPPY_PC_FORMAT,
	FLOPPY_MFI_FORMAT,
	NULL
};

static SLOT_INTERFACE_START( ibmpc_floppies )
	SLOT_INTERFACE( "525dd", FLOPPY_525_DD )
SLOT_INTERFACE_END

SLOT_INTERFACE_START(amstr_com)
	SLOT_INTERFACE("microsoft_mouse", MSFT_SERIAL_MOUSE)
	SLOT_INTERFACE("mouse_systems_mouse", MSYSTEM_SERIAL_MOUSE)
Exemple #8
0
{
	DEVCB_NULL,
	DEVCB_NULL,
	DEVCB_NULL,
	DEVCB_NULL,
	DEVCB_NULL,
	DEVCB_NULL,
	DEVCB_NULL,
	DEVCB_NULL,
	DEVCB_NULL,
	DEVCB_NULL,
	DEVCB_NULL,
	DEVCB_NULL,
	DEVCB_NULL,
	DEVCB_NULL,
	DEVCB_CPU_INPUT_LINE(Z80_TAG, Z80_INPUT_LINE_WAIT),
	DEVCB_NULL,
	DEVCB_NULL
};



//**************************************************************************
//  MACHINE DRIVERS
//**************************************************************************

//-------------------------------------------------
//  MACHINE_CONFIG( horizon )
//-------------------------------------------------

static MACHINE_CONFIG_START( horizon, horizon_state )
Exemple #9
0
        CA1: N/C
        CA2: input: "TDISP" (one of the higher bits in the video line counter, a mirror of the D5 bit from beezer_line_r), done in /video/beezer.c
        CB1: ASH1 to via 1
        CB2: ASH2 to via 1
    /IRQ: to main m6809 cpu
    /RES: from main reset generator/watchdog/button

    TODO: find a better way to attach ca2 read to beezer_line_r
    */
const via6522_interface b_via_0_interface =
{
	/*inputs : A/B         */ DEVCB_DRIVER_MEMBER(beezer_state,b_via_0_pa_r), DEVCB_DRIVER_MEMBER(beezer_state,b_via_0_pb_r),
	/*inputs : CA/B1,CA/B2 */ DEVCB_NULL, DEVCB_DEVICE_LINE_MEMBER("via6522_1", via6522_device, read_ca2), DEVCB_DRIVER_LINE_MEMBER(beezer_state, b_via_0_ca2_r), DEVCB_DEVICE_LINE_MEMBER("via6522_1", via6522_device, read_ca1),
	/*outputs: A/B         */ DEVCB_DRIVER_MEMBER(beezer_state,b_via_0_pa_w), DEVCB_DRIVER_MEMBER(beezer_state,b_via_0_pb_w),
	/*outputs: CA/B1,CA/B2 */ DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_DEVICE_LINE_MEMBER("via6522_1", via6522_device, write_ca1),
	/*irq                  */ DEVCB_CPU_INPUT_LINE("maincpu", M6809_IRQ_LINE)
};

/* VIA 1 (U18 @3C on schematics)
    port A:
        bits 7-0: input/output: pbus
    port B:
        bit 7: output: TIMER1 OUT (used to gate NOISE (see below) to clock channel 1 of 6840, plus acts as channel 0 by itself)
        bit 6: input: NOISE (from mm5837 14-bit LFSR, which also connects to clock above)
        bit 5: output?: N/C
        bit 4: output?: FMSEL1 (does not appear elsewhere on schematics! what does this do? needs tracing) - always 0?
        bit 3: output?: FMSEL0 (does not appear elsewhere on schematics! what does this do? needs tracing) - always 0?
        bit 2: output?: AM (does not appear elsewhere on schematics! what does this do? needs tracing) - always 0?
        bit 1: output: FM or AM (appears to control some sort of suppression or filtering change of the post-DAC amplifier when enabled, only during the TIMER1 OUT time-slot of the multiplexer, see page 1B 3-3 of schematics) - always 0? why is there a special circuit for it?
        bit 0: output?: DMOD DISABLE (does not appear elsewhere on schematics! what does this do? needs tracing) - on startup is 0, turns to 1 and stays that way?
    port C:
Exemple #10
0
	return data;
}

WRITE_LINE_MEMBER( grip_device::speaker_w )
{
	int level = state && ((m_vol1 << 1) | m_vol0);

	m_speaker->level_w(level);
}

static Z80STI_INTERFACE( sti_intf )
{
	0,                                                      // serial receive clock
	0,                                                      // serial transmit clock
	DEVCB_CPU_INPUT_LINE(Z80_TAG, INPUT_LINE_IRQ0),         // interrupt
	DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, grip_device, sti_gpio_r),    // GPIO read
	DEVCB_NULL,                                             // GPIO write
	DEVCB_NULL,                                             // serial input
	DEVCB_NULL,                                             // serial output
	DEVCB_NULL,                                             // timer A output
	DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, grip_device, speaker_w),    // timer B output
	DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF, z80sti_device, tc_w),                                // timer C output
	DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF, z80sti_device, rc_w)                                 // timer D output
};


//-------------------------------------------------
//  z80_daisy_config grip_daisy_chain
//-------------------------------------------------
Exemple #11
0
READ8_MEMBER(trs80m2_state::io_read_byte)
{
	address_space& prog_space = m_maincpu->space(AS_IO);
	return prog_space.read_byte(offset);
}

WRITE8_MEMBER(trs80m2_state::io_write_byte)
{
	address_space& prog_space = m_maincpu->space(AS_IO);
	return prog_space.write_byte(offset, data);
}

static Z80DMA_INTERFACE( dma_intf )
{
	DEVCB_CPU_INPUT_LINE(Z80_TAG, INPUT_LINE_HALT),
	DEVCB_CPU_INPUT_LINE(Z80_TAG, INPUT_LINE_IRQ0),
	DEVCB_NULL,
	DEVCB_DRIVER_MEMBER(trs80m2_state, read),
	DEVCB_DRIVER_MEMBER(trs80m2_state, write),
	DEVCB_DRIVER_MEMBER(trs80m2_state, io_read_byte),
	DEVCB_DRIVER_MEMBER(trs80m2_state, io_write_byte),
};


//-------------------------------------------------
//  Z80PIO_INTERFACE( pio_intf )
//-------------------------------------------------

WRITE_LINE_MEMBER( trs80m2_state::write_centronics_busy )
{
Exemple #12
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 )
{
	0,				// tx clock
	0,				// rx clock
	DEVCB_NULL,			// rx in
	DEVCB_NULL,			// rx out
	DEVCB_NULL,			// cts in
	DEVCB_NULL,			// rts out
	DEVCB_NULL,			// dcd in
	DEVCB_CPU_INPUT_LINE("maincpu", M6809_FIRQ_LINE)
};

static LEGACY_FLOPPY_OPTIONS_START(mirage)
Exemple #13
0
	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
INPUT_PORTS_END

/***************************************************************************
    DEVICE CONFIGURATION
***************************************************************************/

/*-------------------------------------------------
    TMS9928a_interface tms9918_intf
-------------------------------------------------*/

static TMS9928A_INTERFACE( vdp_intf )
{
	SCREEN_TAG,
	0x4000,
	DEVCB_CPU_INPUT_LINE(M6502_TAG, INPUT_LINE_IRQ0)
};

/*-------------------------------------------------
    pia6821_interface pia_intf
-------------------------------------------------*/

WRITE8_MEMBER( crvision_state::pia_pa_w )
{
	/*
	    Signal  Description

	    PA0     Keyboard raster player 1 output (joystick)
	    PA1     Keyboard raster player 1 output (hand keys)
	    PA2     Keyboard raster player 2 output (joystick)
	    PA3     Keyboard raster player 2 output (hand keys)
Exemple #14
0
}

WRITE_LINE_MEMBER( v6809_state::speaker_w )
{
//  if (m_speaker_en)
//      m_speaker->level_w(state);
}

static const ptm6840_interface mc6840_intf =
{
	XTAL_16MHz / 4,
	{ 4000000/14, 4000000/14, 4000000/14/8 },
	{ DEVCB_NULL,
		DEVCB_DRIVER_LINE_MEMBER(v6809_state, speaker_w),
		DEVCB_DRIVER_LINE_MEMBER(v6809_state, speaker_en_w) },
	DEVCB_CPU_INPUT_LINE("maincpu", M6809_IRQ_LINE)
};

static SLOT_INTERFACE_START( v6809_floppies )
	SLOT_INTERFACE( "525dd", FLOPPY_525_DD )
SLOT_INTERFACE_END

//-------------------------------------------------
//  mm58274c_interface rtc_intf
//-------------------------------------------------

// this is all guess
static const mm58274c_interface rtc_intf =
{
	0,  /*  mode 24*/
	1   /*  first day of week */
Exemple #15
0
	m_pias->cb1_w(m_cb1);
}

static const pia6821_interface pia21_intf =
{
	DEVCB_DRIVER_MEMBER(s7_state, dac_r),       /* port A in */
	DEVCB_NULL,     /* port B in */
	DEVCB_NULL,     /* line CA1 in */
	DEVCB_LINE_GND,     /* line CB1 in */
	DEVCB_LINE_VCC,     /* line CA2 in */
	DEVCB_NULL,     /* line CB2 in */
	DEVCB_DRIVER_MEMBER(s7_state, sound_w),     /* port A out */
	DEVCB_DRIVER_MEMBER(s7_state, sol2_w),      /* port B out */
	DEVCB_DRIVER_LINE_MEMBER(s7_state, pia21_ca2_w),        /* line CA2 out */
	DEVCB_DRIVER_LINE_MEMBER(s7_state, pia21_cb2_w),        /* line CB2 out */
	DEVCB_CPU_INPUT_LINE("maincpu", M6800_IRQ_LINE),        /* IRQA */
	DEVCB_CPU_INPUT_LINE("maincpu", M6800_IRQ_LINE)     /* IRQB */
};

static const pia6821_interface pia22_intf =
{
	DEVCB_NULL,     /* port A in */
	DEVCB_NULL,     /* port B in */
	DEVCB_LINE_GND,     /* line CA1 in */
	DEVCB_LINE_GND,     /* line CB1 in */
	DEVCB_NULL,     /* line CA2 in */
	DEVCB_NULL,     /* line CB2 in */
	DEVCB_DRIVER_MEMBER(s7_state, sol0_w),      /* port A out */
	DEVCB_DRIVER_MEMBER(s7_state, sol1_w),      /* port B out */
	DEVCB_DRIVER_LINE_MEMBER(s7_state, pia22_ca2_w),        /* line CA2 out */
	DEVCB_DRIVER_LINE_MEMBER(s7_state, pia22_cb2_w),        /* line CB2 out */
Exemple #16
0
	RGN_FRAC(1,3),
	3,
	{RGN_FRAC(0,3),RGN_FRAC(1,3),RGN_FRAC(2,3)},
	{ 0, 1, 2,  3,  4, 5, 6, 7 },
	{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
	8*8
};

static GFXDECODE_START( pipeline )
	GFXDECODE_ENTRY( "gfx1", 0, layout_8x8x8, 0x000, 1 ) // 8bpp tiles
	GFXDECODE_ENTRY( "gfx2", 0, layout_8x8x3, 0x100, 32 ) // 3bpp tiles
GFXDECODE_END

static Z80CTC_INTERFACE( ctc_intf )
{
	DEVCB_CPU_INPUT_LINE("audiocpu", INPUT_LINE_IRQ0),      // interrupt handler
	DEVCB_NULL,                 // ZC/TO0 callback
	DEVCB_NULL,                 // ZC/TO1 callback
	DEVCB_NULL                  // ZC/TO2 callback
};

static const z80_daisy_config daisy_chain_sound[] =
{
	{ "ctc" },
	{ NULL }
};

static I8255A_INTERFACE( ppi8255_0_intf )
{
	DEVCB_INPUT_PORT("P1"),             /* Port A read */
	DEVCB_NULL,                         /* Port A write */
Exemple #17
0
{
	16,16,	/* 16*16 sprites */
    1024,	/* 1024 sprites */
    4,      /* 4 bits per pixel */
    { 0,1,2,3 },  /* The 4 planes are packed together */
    { 1*4, 0*4, 3*4, 2*4, 5*4, 4*4, 7*4, 6*4, 9*4, 8*4, 11*4, 10*4, 13*4, 12*4, 15*4, 14*4},
    { RGN_FRAC(3,4)+0*4*16, RGN_FRAC(2,4)+0*4*16, RGN_FRAC(1,4)+0*4*16, RGN_FRAC(0,4)+0*4*16,
      RGN_FRAC(3,4)+1*4*16, RGN_FRAC(2,4)+1*4*16, RGN_FRAC(1,4)+1*4*16, RGN_FRAC(0,4)+1*4*16,
      RGN_FRAC(3,4)+2*4*16, RGN_FRAC(2,4)+2*4*16, RGN_FRAC(1,4)+2*4*16, RGN_FRAC(0,4)+2*4*16,
      RGN_FRAC(3,4)+3*4*16, RGN_FRAC(2,4)+3*4*16, RGN_FRAC(1,4)+3*4*16, RGN_FRAC(0,4)+3*4*16 },
    16*16     /* every sprite takes 32 consecutive bytes */
};

static const sp0256_interface sauro_sp256 =
{
	DEVCB_CPU_INPUT_LINE("audiocpu", INPUT_LINE_NMI),
	DEVCB_NULL
};

static GFXDECODE_START( sauro )
	GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 64 )
	GFXDECODE_ENTRY( "gfx2", 0, charlayout, 0, 64 )
	GFXDECODE_ENTRY( "gfx3", 0, sauro_spritelayout, 0, 64 )
GFXDECODE_END

static GFXDECODE_START( trckydoc )
	GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 64 )
	GFXDECODE_ENTRY( "gfx2", 0, trckydoc_spritelayout, 0, 64 )
GFXDECODE_END

static INTERRUPT_GEN( sauro_interrupt )
Exemple #18
0
	if (offset == 0x10)
	{
		m_crtc->dack_w(space, 0, data);
	}
	else
	{
		return prog_space.write_byte(offset, data);
	}
}

// busack on cpu connects to bai pin
static Z80DMA_INTERFACE( dma_intf )
{
	//DEVCB_CPU_INPUT_LINE("maincpu", INPUT_LINE_HALT), //busreq - connects to busreq on cpu
	DEVCB_DRIVER_LINE_MEMBER(zorba_state, busreq_w), //busreq - connects to busreq on cpu
	DEVCB_CPU_INPUT_LINE("maincpu", INPUT_LINE_IRQ0), //int/pulse - connects to IRQ0 on cpu
	DEVCB_NULL, //ba0 - not connected
	DEVCB_DRIVER_MEMBER(zorba_state, memory_read_byte),
	DEVCB_DRIVER_MEMBER(zorba_state, memory_write_byte),
	DEVCB_DRIVER_MEMBER(zorba_state, io_read_byte),
	DEVCB_DRIVER_MEMBER(zorba_state, io_write_byte),
};

static SLOT_INTERFACE_START( zorba_floppies )
	SLOT_INTERFACE( "525dd", FLOPPY_525_DD )
SLOT_INTERFACE_END

// COM port
static const i8251_interface u0_intf =
{
	DEVCB_NULL,
Exemple #19
0
		else
		{
			state->m_i8751_return = port | 0x8000;
			device_set_input_line(device, 6, HOLD_LINE);
			state->m_i8751_needs_ack = 1;
		}

		state->m_latch = 0;
	}

	device_set_input_line(device, 7, HOLD_LINE);	/* VBL */
}

static const ym3526_interface ym3526_config =
{
	DEVCB_CPU_INPUT_LINE("audiocpu", M6502_IRQ_LINE)
};

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

static MACHINE_START( karnov )
{
	karnov_state *state = machine.driver_data<karnov_state>();

	state->m_maincpu = machine.device("maincpu");
	state->m_audiocpu = machine.device("audiocpu");
Exemple #20
0
static const cassette_interface laser_cassette_interface =
{
    vtech1_cassette_formats,
    NULL,
    (cassette_state)(CASSETTE_PLAY),
    NULL,
    NULL
};

static const mc6847_interface vtech1_mc6847_bw_intf =
{
    "screen",
    DEVCB_DRIVER_MEMBER(vtech1_state,vtech1_mc6847_videoram_r),
    DEVCB_NULL,                                 /* horz sync */
    DEVCB_CPU_INPUT_LINE("maincpu", 0),         /* field sync */

    DEVCB_NULL,                                 /* AG */
    DEVCB_LINE_GND,                             /* GM2 */
    DEVCB_LINE_VCC,                             /* GM1 */
    DEVCB_LINE_GND,                             /* GM0 */
    DEVCB_NULL,                                 /* CSS */
    DEVCB_NULL,                                 /* AS */
    DEVCB_LINE_GND,                             /* INTEXT */
    DEVCB_NULL,                                 /* INV */

    NULL,                                       /* m_get_char_rom */
    true    // monochrome
};

static const mc6847_interface vtech1_mc6847_intf =
Exemple #21
0
*/

WRITE_LINE_MEMBER( luxor_55_21046_device::dma_int_w )
{
	m_dma_irq = state;

	// FDC and DMA interrupts are wire-ORed to the Z80
	device_set_input_line(m_maincpu, INPUT_LINE_IRQ0, m_fdc_irq | m_dma_irq);
}

static UINT8 memory_read_byte(address_space *space, offs_t address) { return space->read_byte(address); }
static void memory_write_byte(address_space *space, offs_t address, UINT8 data) { space->write_byte(address, data); }

static Z80DMA_INTERFACE( dma_intf )
{
	DEVCB_CPU_INPUT_LINE(Z80_TAG, INPUT_LINE_HALT),
	DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, luxor_55_21046_device, dma_int_w),
	DEVCB_NULL,
	DEVCB_MEMORY_HANDLER(Z80_TAG, PROGRAM, memory_read_byte),
	DEVCB_MEMORY_HANDLER(Z80_TAG, PROGRAM, memory_write_byte),
	DEVCB_MEMORY_HANDLER(Z80_TAG, IO, memory_read_byte),
	DEVCB_MEMORY_HANDLER(Z80_TAG, IO, memory_write_byte)
};


//-------------------------------------------------
//  wd17xx_interface fdc_intf
//-------------------------------------------------

WRITE_LINE_MEMBER( luxor_55_21046_device::fdc_intrq_w )
{
Exemple #22
0
		data &= m_io_x3->read();
	if (!BIT(m_keylatch, 4))
		data &= m_io_x4->read();
	if (!BIT(m_keylatch, 5))
		data &= m_io_x5->read();
	if (!BIT(m_keylatch, 6))
		data &= m_io_x6->read();
	if (!BIT(m_keylatch, 7))
		data &= m_io_x7->read();

	return data;
};

Z80PIO_INTERFACE( super80_pio_intf )
{
	DEVCB_CPU_INPUT_LINE("maincpu", INPUT_LINE_IRQ0),
	DEVCB_NULL,
	DEVCB_DRIVER_MEMBER(super80_state, pio_port_a_w),
	DEVCB_NULL,         /* portA ready active callback (not used in super80) */
	DEVCB_DRIVER_MEMBER(super80_state,pio_port_b_r),
	DEVCB_NULL,
	DEVCB_NULL          /* portB ready active callback (not used in super80) */
};


/**************************** CASSETTE ROUTINES *****************************************************************/

void super80_state::super80_cassette_motor( UINT8 data )
{
	if (data)
		m_cassette->change_state(CASSETTE_MOTOR_DISABLED,CASSETTE_MASK_MOTOR);
Exemple #23
0
	DEVCB_LINE(h19_ace_irq), // interrupt
	DEVCB_NULL,
	DEVCB_NULL
};

static const mc6845_interface h19_crtc6845_interface =
{
	"screen",
	8 /*?*/,
	NULL,
	h19_update_row,
	NULL,
	DEVCB_NULL,
	DEVCB_NULL,
	DEVCB_NULL,
	DEVCB_CPU_INPUT_LINE("maincpu", INPUT_LINE_NMI), // frame pulse
	NULL
};

/* F4 Character Displayer */
static const gfx_layout h19_charlayout =
{
	8, 10,					/* 8 x 10 characters */
	128,					/* 128 characters */
	1,					/* 1 bits per pixel */
	{ 0 },					/* no bitplanes */
	/* x offsets */
	{ 0, 1, 2, 3, 4, 5, 6, 7 },
	/* y offsets */
	{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 8*8, 9*8 },
	8*16					/* every char takes 16 bytes */
Exemple #24
0
WRITE_LINE_MEMBER( imi5000h_device::ctc_z1_w )
{
	m_ctc->trg2(state);
	m_ctc->trg3(state);
}

WRITE_LINE_MEMBER( imi5000h_device::ctc_z2_w )
{
	//m_memory_enable = state;
	m_maincpu->set_input_line(INPUT_LINE_NMI, state);
}

static Z80CTC_INTERFACE( ctc_intf )
{
	DEVCB_CPU_INPUT_LINE(Z80_TAG, INPUT_LINE_IRQ0),
	DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, imi5000h_device, ctc_z0_w),
	DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, imi5000h_device, ctc_z1_w),
	DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, imi5000h_device, ctc_z2_w)
};


//-------------------------------------------------
//  Z80PIO_INTERFACE( pio0_intf )
//-------------------------------------------------

READ8_MEMBER( imi5000h_device::pio0_pa_r )
{
	/*

	    bit     description
Exemple #25
0
WRITE_LINE_MEMBER( lc80_state::ctc_z0_w )
{
}

WRITE_LINE_MEMBER( lc80_state::ctc_z1_w )
{
}

WRITE_LINE_MEMBER( lc80_state::ctc_z2_w )
{
}

static Z80CTC_INTERFACE( ctc_intf )
{
	DEVCB_CPU_INPUT_LINE(Z80_TAG, INPUT_LINE_IRQ0), /* interrupt handler */
	DEVCB_DRIVER_LINE_MEMBER(lc80_state, ctc_z0_w),         /* ZC/TO0 callback */
	DEVCB_DRIVER_LINE_MEMBER(lc80_state, ctc_z1_w),         /* ZC/TO1 callback */
	DEVCB_DRIVER_LINE_MEMBER(lc80_state, ctc_z2_w)          /* ZC/TO2 callback */
};

/* Z80-PIO Interface */

void lc80_state::update_display()
{
	int i;

	for (i = 0; i < 6; i++)
	{
		if (!BIT(m_digit, i)) output_set_digit_value(5 - i, m_segment);
	}
Exemple #26
0
}

static const pia6821_interface d6800_mc6821_intf =
{
	DEVCB_DRIVER_MEMBER(d6800_state, d6800_keyboard_r), /* port A input */
	DEVCB_DRIVER_MEMBER(d6800_state, d6800_cassette_r), /* port B input */
	DEVCB_DRIVER_LINE_MEMBER(d6800_state, d6800_keydown_r), /* CA1 input */
	DEVCB_DRIVER_LINE_MEMBER(d6800_state, d6800_rtc_pulse), /* CB1 input */
	DEVCB_DRIVER_LINE_MEMBER(d6800_state, d6800_fn_key_r),  /* CA2 input */
	DEVCB_NULL,                     /* CB2 input */
	DEVCB_DRIVER_MEMBER(d6800_state, d6800_keyboard_w), /* port A output */
	DEVCB_DRIVER_MEMBER(d6800_state, d6800_cassette_w), /* port B output */
	DEVCB_NULL,                     /* CA2 output */
	DEVCB_DRIVER_LINE_MEMBER(d6800_state, d6800_screen_w),  /* CB2 output */
	DEVCB_CPU_INPUT_LINE("maincpu", M6800_IRQ_LINE),    /* IRQA output */
	DEVCB_CPU_INPUT_LINE("maincpu", M6800_IRQ_LINE)     /* IRQB output */
};

/* Machine Initialization */

void d6800_state::machine_start()
{
}

void d6800_state::machine_reset()
{
	m_beeper->set_state(0);
	m_rtc = 0;
	m_cass_data[0] = 0;
	m_cass_data[1] = 0;
Exemple #27
0
WRITE_LINE_MEMBER( babbage_state::ctc_z0_w )
{
}

WRITE_LINE_MEMBER( babbage_state::ctc_z1_w )
{
}

WRITE_LINE_MEMBER( babbage_state::ctc_z2_w )
{
}

static Z80CTC_INTERFACE( babbage_ctc_intf )
{
	DEVCB_CPU_INPUT_LINE("maincpu", INPUT_LINE_IRQ0),   /* interrupt handler */
	DEVCB_DRIVER_LINE_MEMBER(babbage_state, ctc_z0_w),  /* ZC/TO0 callback */
	DEVCB_DRIVER_LINE_MEMBER(babbage_state, ctc_z1_w),  /* ZC/TO1 callback */
	DEVCB_DRIVER_LINE_MEMBER(babbage_state, ctc_z2_w)   /* ZC/TO2 callback */
};

/* Z80-PIO Interface */

// The 8 LEDs
// bios never writes here - you need to set PIO for output yourself - see test program above
WRITE8_MEMBER( babbage_state::pio1_b_w )
{
	char ledname[8];
	for (int i = 0; i < 8; i++)
	{
		sprintf(ledname,"led%d",i);
Exemple #28
0
	{ "z80pio" },
	{ NULL }
};


/* z80 pio */

READ8_MEMBER(senjyo_state::pio_pa_r)
{

	return m_sound_cmd;
}

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

/* z80 ctc */
Z80CTC_INTERFACE( senjyo_ctc_intf )
{
	DEVCB_CPU_INPUT_LINE("sub", INPUT_LINE_IRQ0), /* interrupt handler */
	DEVCB_DEVICE_LINE_MEMBER("z80ctc", z80ctc_device, trg1),    /* ZC/TO0 callback */
	DEVCB_NULL,                                                 /* ZC/TO1 callback */
	DEVCB_DRIVER_LINE_MEMBER(senjyo_state, sound_line_clock)    /* ZC/TO2 callback */
Exemple #29
0
};

static const duart68681_config micro3d_duart68681_config =
{
	micro3d_duart_irq_handler,
	micro3d_duart_tx,
	micro3d_duart_input_r,
	micro3d_duart_output_w
};

static MC68901_INTERFACE( mfp_intf )
{
	4000000,											/* timer clock */
	0,													/* receive clock */
	0,													/* transmit clock */
	DEVCB_CPU_INPUT_LINE("maincpu", M68K_IRQ_4),		/* interrupt */
	DEVCB_NULL,											/* GPIO read */
	DEVCB_NULL,											/* GPIO write */
	DEVCB_NULL,											/* TAO */
	DEVCB_NULL,											/* TBO */
	DEVCB_NULL,											/* TCO */
	DEVCB_NULL,											/* TDO */
	DEVCB_NULL,											/* serial input */
	DEVCB_NULL											/* serial output */
};


/*************************************
 *
 *  Machine driver
 *
Exemple #30
0
//  C64_EXPANSION_INTERFACE( expansion_intf )
//-------------------------------------------------

WRITE_LINE_MEMBER( vic10_state::exp_irq_w )
{
	m_exp_irq = state;

	check_interrupts();
}

static VIC10_EXPANSION_INTERFACE( expansion_intf )
{
	DEVCB_DRIVER_LINE_MEMBER(vic10_state, exp_irq_w),
	DEVCB_DEVICE_LINE_MEMBER(MOS6526_TAG, mos6526_device, sp_w),
	DEVCB_DEVICE_LINE_MEMBER(MOS6526_TAG, mos6526_device, cnt_w),
	DEVCB_CPU_INPUT_LINE(M6510_TAG, INPUT_LINE_RESET)
};



//**************************************************************************
//  MACHINE INITIALIZATION
//**************************************************************************

//-------------------------------------------------
//  MACHINE_START( vic10 )
//-------------------------------------------------

void vic10_state::machine_start()
{
	// allocate memory