AM_RANGE(0x0280, 0x029f) AM_DEVREADWRITE("riot1", riot6532_device, read, write) AM_RANGE(0x0400, 0x047f) AM_RAM AM_RANGE(0x0500, 0x051f) AM_DEVREADWRITE("riot2", riot6532_device, read, write) AM_RANGE(0x0800, 0x1fff) AM_ROM AM_RANGE(0xe800, 0xffff) AM_ROM ADDRESS_MAP_END WRITE8_MEMBER(tourtabl_state::watchdog_w) { machine().watchdog_reset(); } static const riot6532_interface r6532_interface_0 = { DEVCB_INPUT_PORT("RIOT0_SWA"), /* Port 6 */ DEVCB_INPUT_PORT("RIOT0_SWB"), /* Port 7 */ DEVCB_NULL, DEVCB_DRIVER_MEMBER(tourtabl_state,watchdog_w), DEVCB_NULL }; static const riot6532_interface r6532_interface_1 = { DEVCB_INPUT_PORT("RIOT1_SWA"), /* Port 8 */ DEVCB_INPUT_PORT("RIOT1_SWB"), /* Port 9 */ DEVCB_NULL, DEVCB_DRIVER_MEMBER(tourtabl_state,tourtabl_led_w), DEVCB_NULL };
/* Graphics Decode Information */ static GFXDECODE_START( aquarius ) GFXDECODE_ENTRY( "gfx1", 0x0000, aquarius_charlayout, 0, 256 ) GFXDECODE_END /*************************************************************************** MACHINE DRIVERS ***************************************************************************/ static const ay8910_interface aquarius_ay8910_interface = { AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, DEVCB_INPUT_PORT("RIGHT"), DEVCB_INPUT_PORT("LEFT"), DEVCB_NULL, DEVCB_NULL }; static const cassette_config aquarius_cassette_config = { cassette_default_formats, NULL, (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED), NULL }; static MACHINE_CONFIG_START( aquarius, aquarius_state ) /* basic machine hardware */
{ 8, 12, 0, 4 }, { 3, 2, 1, 0, 19, 18, 17, 16}, { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 }, 8*8*4 }; #endif static GFXDECODE_START( dfruit ) GFXDECODE_ENTRY( "gfx1", 0, bg2_layout, 0, 16 ) GFXDECODE_ENTRY( "gfx1", 0, sp2_layout, 0, 16 ) //GFXDECODE_ENTRY( NULL, 0, char_layout, 0, 16 ) // Ram-based GFXDECODE_END static I8255A_INTERFACE( ppi8255_intf ) { DEVCB_INPUT_PORT("IN0"), /* Port A read */ DEVCB_NULL, /* Port A write */ DEVCB_INPUT_PORT("IN1"), /* Port B read */ DEVCB_NULL, /* Port B write */ DEVCB_INPUT_PORT("IN2"), /* Port C read */ DEVCB_NULL /* Port C write */ }; TIMER_DEVICE_CALLBACK_MEMBER(dfruit_state::dfruit_irq_scanline) { int scanline = param; if (scanline == 240 && (m_irq_enable & 4)) { m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_irq_vector[2]); }
GFXDECODE_ENTRY( "gfx1", 0x0000, charlayout, 0, 64 ) GFXDECODE_ENTRY( "gfx1", 0x0000, spritelayout, 0, 64 ) GFXDECODE_END /************************************* * * Sound interfaces * *************************************/ static const ay8910_interface ay8912_interface_1 = { AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, DEVCB_INPUT_PORT("SYSTEM"), DEVCB_NULL, DEVCB_NULL, DEVCB_NULL }; static const ay8910_interface ay8912_interface_2 = { AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, DEVCB_INPUT_PORT("INPUTS"), DEVCB_NULL, DEVCB_NULL, DEVCB_NULL };
}; GFX( charlayout_1bpp, 0x2000*8+4, 0x2000*8+4, 0x2000*8+4 ) 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 ) {
BZONEADJ INPUT_PORTS_END /************************************* * * 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 *
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2) INPUT_PORTS_END /*************************************************************************** Machine Drivers ***************************************************************************/ static I8255A_INTERFACE( lordgun_ppi8255_0_intf ) { DEVCB_INPUT_PORT("DIP"), /* Port A read */ DEVCB_DRIVER_MEMBER(lordgun_state,fake_w), /* Port A write */ DEVCB_NULL, /* Port B read */ DEVCB_DRIVER_MEMBER(lordgun_state,lordgun_eeprom_w), /* Port B write */ DEVCB_INPUT_PORT("SERVICE"), /* Port C read */ DEVCB_DRIVER_MEMBER(lordgun_state,fake2_w) /* Port C write */ }; static I8255A_INTERFACE( lordgun_ppi8255_1_intf ) { DEVCB_INPUT_PORT("START1"), /* Port A read */ DEVCB_DRIVER_MEMBER(lordgun_state,fake_w), /* Port A write */ DEVCB_INPUT_PORT("START2"), /* Port B read */ DEVCB_DRIVER_MEMBER(lordgun_state,fake_w), /* Port B write */ DEVCB_INPUT_PORT("COIN"), /* Port C read */ DEVCB_DRIVER_MEMBER(lordgun_state,fake_w) /* Port C write */
static GFXDECODE_START( runaway ) GFXDECODE_ENTRY( "gfx1", 0x000, runaway_tile_layout, 0, 1 ) GFXDECODE_ENTRY( "gfx1", 0x800, runaway_sprite_layout, 8, 1 ) GFXDECODE_END 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) } };
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_8WAY PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) // used to get test mode INPUT_PORTS_END INTERRUPT_GEN_MEMBER(hotblock_state::hotblocks_irq)/* right? */ { device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); } static const ay8910_interface ay8910_config = { AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, DEVCB_INPUT_PORT("P1"), DEVCB_INPUT_PORT("P2"), DEVCB_NULL, DEVCB_NULL }; static MACHINE_CONFIG_START( hotblock, hotblock_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", I8088, 10000000) MCFG_CPU_PROGRAM_MAP(hotblock_map) MCFG_CPU_IO_MAP(hotblock_io) MCFG_CPU_VBLANK_INT_DRIVER("screen", hotblock_state, hotblocks_irq) /* video hardware */
} WRITE8_MEMBER(toypop_state::out_coin1) { coin_counter_w(machine(), 1, ~data & 1); } WRITE8_MEMBER(toypop_state::flip) { flip_screen_set(data & 1); } /* chip #0: player inputs, buttons, coins */ static const namcoio_interface intf0_coin = { { DEVCB_INPUT_PORT("COINS"), DEVCB_INPUT_PORT("P1_RIGHT"), DEVCB_INPUT_PORT("P2_RIGHT"), DEVCB_INPUT_PORT("BUTTONS") }, /* port read handlers */ { DEVCB_DRIVER_MEMBER(toypop_state,out_coin0), DEVCB_DRIVER_MEMBER(toypop_state,out_coin1) }, /* port write handlers */ NULL /* device */ }; static const namcoio_interface intf0 = { { DEVCB_INPUT_PORT("COINS"), DEVCB_INPUT_PORT("P1_RIGHT"), DEVCB_INPUT_PORT("P2_RIGHT"), DEVCB_INPUT_PORT("BUTTONS") }, /* port read handlers */ { DEVCB_NULL, DEVCB_NULL }, /* port write handlers */ NULL /* device */ }; /* chip #1: dip switches */ static const namcoio_interface intf1 = { { DEVCB_DRIVER_MEMBER(toypop_state,dipA_h), DEVCB_DRIVER_MEMBER(toypop_state,dipB_l), DEVCB_DRIVER_MEMBER(toypop_state,dipB_h), DEVCB_DRIVER_MEMBER(toypop_state,dipA_l) }, /* port read handlers */ { DEVCB_DRIVER_MEMBER(toypop_state,flip), DEVCB_NULL }, /* port write handlers */
Sand Scorpion ***************************************************************************/ /* YM3014B + YM2203C */ static void irq_handler(device_t *device, int irq) { cputag_set_input_line(device->machine(), "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE); } static const ym2203_interface ym2203_intf_sandscrp = { { AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, DEVCB_INPUT_PORT("DSW1"), /* Port A Read */ DEVCB_INPUT_PORT("DSW2"), /* Port B Read */ DEVCB_NULL, /* Port A Write */ DEVCB_NULL, /* Port B Write */ }, irq_handler /* IRQ handler */ }; static const kaneko_pandora_interface sandscrp_pandora_config = { "screen", /* screen tag */ 0, /* gfx_region */ 0, 0 /* x_offs, y_offs */ };
PIA 5 = U7: (never actually used, mapped to $2000 on the sound CPU) port A = unused port B = sound CPU to TMS5220 communication CA1 = interrupt signal from TMS5220 CA2 = write signal to TMS5220 CB1 = ready signal from TMS5220 CB2 = read signal to TMS5220 IRQA = /SINT2 signal IRQB = /SINT2 signal ***************************************************************************/ const pia6821_interface qix_pia_0_intf = { DEVCB_INPUT_PORT("P1"), /* port A in */ DEVCB_INPUT_PORT("COIN"), /* 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_NULL, /* port B out */ DEVCB_NULL, /* line CA2 out */ DEVCB_NULL, /* port CB2 out */ DEVCB_NULL, /* IRQA */ DEVCB_NULL /* IRQB */ }; const pia6821_interface qix_pia_1_intf = {
AM_RANGE(0x880a, 0x880a) AM_READ_PORT("SYSTEM") AM_RANGE(0x880b, 0x880b) AM_READ_PORT("P2") AM_RANGE(0x880c, 0x880c) AM_READWRITE(chaknpop_gfxmode_r, chaknpop_gfxmode_w) AM_RANGE(0x880d, 0x880d) AM_WRITE(coinlock_w) // coin lock out AM_RANGE(0x9000, 0x93ff) AM_RAM_WRITE(chaknpop_txram_w) AM_BASE_MEMBER(chaknpop_state, tx_ram) // TX tilemap AM_RANGE(0x9800, 0x983f) AM_RAM_WRITE(chaknpop_attrram_w) AM_BASE_MEMBER(chaknpop_state, attr_ram) // Color attribute AM_RANGE(0x9840, 0x98ff) AM_RAM AM_BASE_SIZE_MEMBER(chaknpop_state, spr_ram, spr_ram_size) // sprite AM_RANGE(0xa000, 0xbfff) AM_ROM AM_RANGE(0xc000, 0xffff) AM_RAMBANK("bank1") // bitmap plane 1-4 ADDRESS_MAP_END static const ay8910_interface ay8910_interface_1 = { 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) // ?? };
static MACHINE_START(merit) { slotcarn_state *state = machine.driver_data<slotcarn_state>(); state->m_ram_palette = auto_alloc_array(machine, UINT8, RAM_PALETTE_SIZE); state_save_register_global_pointer(machine, state->m_ram_palette, RAM_PALETTE_SIZE); } /*************************************** * PPI 8255 (x3) Interfaces * ***************************************/ static const ppi8255_interface scarn_ppi8255_intf[3] = { { /* A, B & C set as input */ DEVCB_INPUT_PORT("IN0"), /* Port A read */ DEVCB_INPUT_PORT("IN1"), /* Port B read */ DEVCB_INPUT_PORT("IN2"), /* Port C read */ DEVCB_NULL, /* Port A write */ DEVCB_NULL, /* Port B write */ DEVCB_NULL /* Port C write */ }, { /* A set as input */ DEVCB_INPUT_PORT("DSW1"), /* Port A read */ DEVCB_NULL, /* Port B read */ DEVCB_NULL, /* Port C read */ DEVCB_NULL, /* Port A write */ DEVCB_NULL, /* Port B write */ DEVCB_NULL /* Port C write */ }, { /* A & B set as input */
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) INPUT_PORTS_END /*************************************************************************** Machine Config ***************************************************************************/ static I8255A_INTERFACE( ppi8255_0_intf ) { // $4008 - always $83 (PPI mode 0, ports B & lower C as input) DEVCB_NULL, /* Port A read */ DEVCB_DRIVER_MEMBER(kungfur_state,kungfur_output_w), /* Port A write */ DEVCB_INPUT_PORT("IN0"), /* Port B read */ DEVCB_NULL, /* Port B write */ DEVCB_INPUT_PORT("IN1"), /* Port C read */ DEVCB_DRIVER_MEMBER(kungfur_state,kungfur_control_w) /* Port C write */ }; static I8255A_INTERFACE( ppi8255_1_intf ) { // $400c - always $80 (PPI mode 0, all ports as output) DEVCB_NULL, /* Port A read */ DEVCB_DRIVER_MEMBER(kungfur_state,kungfur_latch1_w), /* Port A write */ DEVCB_NULL, /* Port B read */ DEVCB_DRIVER_MEMBER(kungfur_state,kungfur_latch2_w), /* Port B write */ DEVCB_NULL, /* Port C read */ DEVCB_DRIVER_MEMBER(kungfur_state,kungfur_latch3_w) /* Port C write */ };
{ set_led_status(machine(), 0, data & 1); set_led_status(machine(), 1, data & 2); coin_lockout_global_w(machine(), data & 4); coin_counter_w(machine(), 0, ~data & 8); } WRITE8_MEMBER(gaplus_state::out_lamps1) { coin_counter_w(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_DRIVER_MEMBER(gaplus_state,out_lamps0), DEVCB_DRIVER_MEMBER(gaplus_state,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 */
WRITE8_MEMBER(albazg_state::yumefuda_output_w) { coin_counter_w(machine(), 0, ~data & 4); coin_counter_w(machine(), 1, ~data & 2); coin_lockout_global_w(machine(), data & 1); //data & 0x10 hopper-c (active LOW) //data & 0x08 divider (active HIGH) flip_screen_set(~data & 0x20); } static const ay8910_interface ay8910_config = { AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, DEVCB_INPUT_PORT("DSW1"), DEVCB_INPUT_PORT("DSW2"), DEVCB_DRIVER_MEMBER(albazg_state,yumefuda_output_w), DEVCB_NULL }; static const mc6845_interface mc6845_intf = { "screen", /* screen we are acting on */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ NULL, /* after pixel update callback */ DEVCB_NULL, /* callback for display state changes */ DEVCB_NULL, /* callback for cursor state changes */ DEVCB_NULL, /* HSYNC callback */
if (LOAD) { /* write data to 7 segment displays */ m_led_l->a_w(m_data & 0x0f); m_led_h->a_w(m_data >> 4); } } } static MM74C923_INTERFACE( keyboard_intf ) { CAP_U(0.15), CAP_U(1), DEVCB_DRIVER_LINE_MEMBER(elf2_state, da_w), DEVCB_INPUT_PORT("X1"), DEVCB_INPUT_PORT("X2"), DEVCB_INPUT_PORT("X3"), DEVCB_INPUT_PORT("X4"), DEVCB_NULL }; /* CDP1861 Interface */ static CDP1861_INTERFACE( elf2_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)
{ return m_ieee->dio_r() ^ 0xff; } WRITE8_MEMBER( softbox_state::ppi0_pb_w ) { m_ieee->dio_w(data ^ 0xff); } static I8255A_INTERFACE( ppi0_intf ) { DEVCB_DRIVER_MEMBER(softbox_state, ppi0_pa_r), DEVCB_NULL, // Port A write DEVCB_NULL, // Port B read DEVCB_DRIVER_MEMBER(softbox_state, ppi0_pb_w), DEVCB_INPUT_PORT("SW1"), // Port C read DEVCB_NULL // Port C write }; //------------------------------------------------- // I8255A_INTERFACE( ppi1_intf ) //------------------------------------------------- READ8_MEMBER( softbox_state::ppi1_pa_r ) { /* bit description PA0 ATN
GFXDECODE_ENTRY( "gfx2", 0x200, obj_layout, 0x18, 1 ) GFXDECODE_ENTRY( "gfx2", 0x000, obj_layout, 0x18, 1 ) /* second bank, or second bitplane? */ GFXDECODE_END /************************************* * * Sound interfaces * *************************************/ static const pokey_interface pokey_interface_1 = { { DEVCB_NULL }, DEVCB_INPUT_PORT("DSW") }; static const pokey_interface pokey_interface_2 = { { DEVCB_INPUT_PORT("IN1"), DEVCB_INPUT_PORT("IN2"), DEVCB_DRIVER_MEMBER(tunhunt_state,dsw2_0r), DEVCB_DRIVER_MEMBER(tunhunt_state,dsw2_1r), DEVCB_DRIVER_MEMBER(tunhunt_state,dsw2_2r), DEVCB_DRIVER_MEMBER(tunhunt_state,dsw2_3r), DEVCB_DRIVER_MEMBER(tunhunt_state,dsw2_4r) } };
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("PRINTER READY") PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_START("DSW3") PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_COIN4 ) PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("LOW BATT U51") INPUT_PORTS_END /***************************************************************************/ static const duartn68681_config nevada_duart18_68681_config = { DEVCB_DRIVER_LINE_MEMBER(nevada_state, duart18_irq_handler), DEVCB_NULL, DEVCB_NULL, DEVCB_INPUT_PORT("DSW1"), DEVCB_NULL }; /***************************************************************************/ static const duartn68681_config nevada_duart39_68681_config = { DEVCB_DRIVER_LINE_MEMBER(nevada_state, duart39_irq_handler), DEVCB_NULL, DEVCB_NULL, DEVCB_INPUT_PORT("DSW2"), DEVCB_NULL }; /***************************************************************************/ static const duartn68681_config nevada_duart40_68681_config = { DEVCB_DRIVER_LINE_MEMBER(nevada_state, duart40_irq_handler),
} static void via_irq( running_device *device, int state ) { // 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 GFXDECODE_START( irobot ) GFXDECODE_ENTRY( "gfx1", 0, charlayout, 64, 16 ) GFXDECODE_END /************************************* * * Sound interfaces * *************************************/ static const pokey_interface pokey_config = { { DEVCB_NULL }, DEVCB_INPUT_PORT("DSW2") }; /************************************* * * Machine driver * *************************************/ static MACHINE_CONFIG_START( irobot, irobot_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, MAIN_CLOCK/8) MCFG_CPU_PROGRAM_MAP(irobot_map)
static const ay8910_interface ay8910_re900 = { AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, DEVCB_DRIVER_MEMBER(re900_state,re_psg_portA_r), DEVCB_DRIVER_MEMBER(re900_state,re_psg_portB_r), DEVCB_DRIVER_MEMBER(re900_state,re_mux_port_A_w), DEVCB_DRIVER_MEMBER(re900_state,re_mux_port_B_w) }; static const ay8910_interface ay8910_bs94 = { AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, DEVCB_INPUT_PORT("IN0"), DEVCB_INPUT_PORT("IN1"), DEVCB_NULL, DEVCB_NULL }; /*************************** * Machine Driver * ***************************/ static MACHINE_CONFIG_START( re900, re900_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", I8051, MAIN_CLOCK) MCFG_CPU_PROGRAM_MAP(mem_prg) MCFG_CPU_IO_MAP(mem_io)
GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 1 ) GFXDECODE_ENTRY( "gfx2", 0, spritelayout, 32, 1 ) GFXDECODE_END /************************************* * * Sound interfaces * *************************************/ static const pokey_interface pokey_interface_1 = { { DEVCB_NULL }, DEVCB_INPUT_PORT("START"), }; static const pokey_interface pokey_interface_2 = { { DEVCB_NULL }, DEVCB_INPUT_PORT("DSW"), }; /************************************* * * Machine driver * *************************************/
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) INPUT_PORTS_END /************************************* * * Sound interfaces * *************************************/ static const pokey_interface pokey_interface_1 = { { DEVCB_NULL }, DEVCB_INPUT_PORT("DSW0") }; static const pokey_interface pokey_interface_2 = { { DEVCB_NULL }, DEVCB_INPUT_PORT("DSW1") }; /************************************* * * Machine drivers *
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 */ } }; /************************************* * * Graphics definitions * *************************************/
state->m_cpua_ctrl = 0xff; state->m_ioc220_port = 0; state->m_banknum = -1; state->m_adpcm_pos = 0; state->m_adpcm_data = -1; } static const pc080sn_interface topspeed_pc080sn_intf = { 1, /* gfxnum */ 0, 8, 0, 0 /* x_offset, y_offset, y_invert, dblwidth */ }; static const tc0220ioc_interface topspeed_io_intf = { DEVCB_INPUT_PORT("DSWA"), DEVCB_INPUT_PORT("DSWB"), DEVCB_INPUT_PORT("IN0"), DEVCB_INPUT_PORT("IN1"), DEVCB_INPUT_PORT("IN2") /* port read handlers */ }; static const tc0140syt_interface topspeed_tc0140syt_intf = { "maincpu", "audiocpu" }; static MACHINE_CONFIG_START( topspeed, topspeed_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 12000000) /* 12 MHz ??? */ MCFG_CPU_PROGRAM_MAP(topspeed_map) MCFG_CPU_VBLANK_INT("screen", topspeed_interrupt)
PORT_BIT( 0x03, 0x00, IPT_PEDAL ) PORT_MINMAX(0x00, 0x02) PORT_SENSITIVITY(10) PORT_KEYDELTA(1) //gas pedal PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_TILT ) //PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) //gas1 //PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON2 ) //gas2 PORT_START("WHEEL") /* 0xDx30 DRIVING_WHEEL */ PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(50) PORT_KEYDELTA(8) INPUT_PORTS_END static const ay8910_interface ay8910_interface_1 = { AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, DEVCB_INPUT_PORT("DSWA"), DEVCB_INPUT_PORT("DSWB"), DEVCB_NULL, DEVCB_NULL }; static const ay8910_interface ay8910_interface_2 = { AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, DEVCB_INPUT_PORT("DSWC"), DEVCB_INPUT_PORT("DSWD"), DEVCB_NULL, DEVCB_NULL };
PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED ) INPUT_PORTS_END /* machine driver */ WRITE_LINE_MEMBER(sbugger_state::sbugger_interrupt) { m_maincpu->set_input_line(I8085_RST75_LINE, state ? CLEAR_LINE : ASSERT_LINE ); } static I8156_INTERFACE(i8156_intf) { // all ports set to input DEVCB_INPUT_PORT("INPUTS"), DEVCB_NULL, DEVCB_INPUT_PORT("DSW1"), DEVCB_NULL, DEVCB_INPUT_PORT("DSW2"), DEVCB_NULL, DEVCB_DRIVER_LINE_MEMBER(sbugger_state,sbugger_interrupt) }; static MACHINE_CONFIG_START( sbugger, sbugger_state ) MCFG_CPU_ADD("maincpu", I8085A, 6000000) /* 3.00 MHz??? */ MCFG_CPU_PROGRAM_MAP(sbugger_map) MCFG_CPU_IO_MAP(sbugger_io_map) MCFG_I8156_ADD("i8156", 200000, i8156_intf) /* freq is an approximation */