• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ IOPORT函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中IOPORT函数的典型用法代码示例。如果您正苦于以下问题:C++ IOPORT函数的具体用法?C++ IOPORT怎么用?C++ IOPORT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了IOPORT函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: MACHINE_CONFIG_START

static MACHINE_CONFIG_START( clpoker )
	/* basic machine hardware */
	MCFG_CPU_ADD("maincpu", Z80, XTAL_12MHz / 3) // Z0840004PSC, divider not verified
	MCFG_CPU_PROGRAM_MAP(prg_map)
	MCFG_CPU_IO_MAP(io_map)

	MCFG_NVRAM_ADD_0FILL("nvram") // HY6116ALP-12

	MCFG_DEVICE_ADD("ppi_outputs", I8255, 0) // M5L8255AP-5
	MCFG_I8255_OUT_PORTA_CB(WRITE8(clpoker_state, output_a_w))
	MCFG_I8255_OUT_PORTB_CB(WRITE8(clpoker_state, output_b_w))
	MCFG_I8255_OUT_PORTC_CB(WRITE8(clpoker_state, output_c_w))

	MCFG_DEVICE_ADD("ppi_inputs", I8255, 0) // M5L8255AP-5
	MCFG_I8255_IN_PORTA_CB(IOPORT("INA"))
	MCFG_I8255_IN_PORTB_CB(IOPORT("INB"))
	MCFG_I8255_IN_PORTC_CB(IOPORT("INC"))

	MCFG_TICKET_DISPENSER_ADD("hopper", attotime::from_msec(60), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW)

	MCFG_SCREEN_ADD("screen", RASTER)
	MCFG_SCREEN_REFRESH_RATE(60) // wrong
	MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))  // wrong
	MCFG_SCREEN_SIZE(64*8, 32*8) // wrong
	MCFG_SCREEN_VISIBLE_AREA(0*8, 64*8-1, 0*8, 32*8-1) // probably right
	MCFG_SCREEN_UPDATE_DRIVER(clpoker_state, screen_update)
	MCFG_SCREEN_PALETTE("palette")
	MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(clpoker_state, vblank_w))

	MCFG_PALETTE_ADD("palette", 0x100)
开发者ID:Tauwasser,项目名称:mame,代码行数:30,代码来源:clpoker.cpp


示例2: MCFG_DEVICE_PROGRAM_MAP

	MCFG_DEVICE_PROGRAM_MAP(banks_map)
	MCFG_ADDRESS_MAP_BANK_ENDIANNESS(ENDIANNESS_LITTLE)
	MCFG_ADDRESS_MAP_BANK_DATABUS_WIDTH(8)
	MCFG_ADDRESS_MAP_BANK_STRIDE(0x4000)
	MCFG_DEVICE_ADD("bank3", ADDRESS_MAP_BANK, 0)
	MCFG_DEVICE_PROGRAM_MAP(banks_map)
	MCFG_ADDRESS_MAP_BANK_ENDIANNESS(ENDIANNESS_LITTLE)
	MCFG_ADDRESS_MAP_BANK_DATABUS_WIDTH(8)
	MCFG_ADDRESS_MAP_BANK_STRIDE(0x4000)

	MCFG_RAM_ADD("mainram")
	MCFG_RAM_DEFAULT_SIZE("192K")

	/* the 8048 isn't dumped, so substitute modified real Apple II h/w */
	MCFG_DEVICE_ADD("ay3600", AY3600, 0)
	MCFG_AY3600_MATRIX_X0(IOPORT("X0"))
	MCFG_AY3600_MATRIX_X1(IOPORT("X1"))
	MCFG_AY3600_MATRIX_X2(IOPORT("X2"))
	MCFG_AY3600_MATRIX_X3(IOPORT("X3"))
	MCFG_AY3600_MATRIX_X4(IOPORT("X4"))
	MCFG_AY3600_MATRIX_X5(IOPORT("X5"))
	MCFG_AY3600_MATRIX_X6(IOPORT("X6"))
	MCFG_AY3600_MATRIX_X7(IOPORT("X7"))
	MCFG_AY3600_MATRIX_X8(IOPORT("X8"))
	MCFG_AY3600_SHIFT_CB(READLINE(laser3k_state, ay3600_shift_r))
	MCFG_AY3600_CONTROL_CB(READLINE(laser3k_state, ay3600_control_r))
	MCFG_AY3600_DATA_READY_CB(WRITELINE(laser3k_state, ay3600_data_ready_w))

	/* sound hardware */
	MCFG_SPEAKER_STANDARD_MONO("mono")
	MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
开发者ID:DragonMinded,项目名称:mame,代码行数:31,代码来源:laser3k.cpp


示例3: MCFG_SCREEN_ADD

	/* video hardware */
	MCFG_SCREEN_ADD("screen", RASTER)
	MCFG_SCREEN_REFRESH_RATE(60)
	MCFG_SCREEN_SIZE(256, 256)
	MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 30*8-1)
	MCFG_SCREEN_UPDATE_DRIVER(homerun_state, screen_update_homerun)
	MCFG_SCREEN_PALETTE("palette")

	MCFG_GFXDECODE_ADD("gfxdecode", "palette", homerun)
	MCFG_PALETTE_ADD("palette", 16*4)

	/* sound hardware */
	MCFG_SPEAKER_STANDARD_MONO("mono")

	MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_20MHz/8)
	MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW"))
	MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(homerun_state, homerun_banking_w))
	MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END

static MACHINE_CONFIG_DERIVED( homerun, dynashot )

	/* sound hardware */
	MCFG_SOUND_ADD("d7756", UPD7756, UPD7759_STANDARD_CLOCK)
	MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)

	MCFG_SOUND_ADD("samples", SAMPLES, 0)
	MCFG_SAMPLES_CHANNELS(1)
	MCFG_SAMPLES_NAMES(homerun_sample_names)
	MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
开发者ID:qwijibo,项目名称:mame,代码行数:31,代码来源:homerun.cpp


示例4: DISCRETE_INPUTX_STREAM

	DISCRETE_INPUTX_STREAM(NODE_110, 1, 5.0 / 32768, 5.0)   /* Add VRef again */

	DISCRETE_OP_AMP_FILTER(NODE_120, 1, NODE_110, 0, DISC_OP_AMP_FILTER_IS_BAND_PASS_1, &stage1_gravitar_info)
	DISCRETE_OP_AMP_FILTER(NODE_130, 1, NODE_120, 0, DISC_OP_AMP_FILTER_IS_LOW_PASS_1, &stage2_gravitar_info)

	DISCRETE_MIXER2(NODE_290, 1, NODE_100, NODE_130, &gravitar_mixer)
	DISCRETE_OUTPUT(NODE_290, 4096)

DISCRETE_SOUND_END

MACHINE_CONFIG_FRAGMENT( bwidow_audio )
	/* sound hardware */
	MCFG_SPEAKER_STANDARD_MONO("mono")

	MCFG_SOUND_ADD("pokey1", POKEY, MASTER_CLOCK / 8) /* C/D3 */
	MCFG_POKEY_ALLPOT_R_CB(IOPORT("DSW0"))
	MCFG_POKEY_OUTPUT_OPAMP(BW_R51, BW_C31, 5.0)
	MCFG_SOUND_ROUTE_EX(0, "discrete", 1.0, 0)

	MCFG_SOUND_ADD("pokey2", POKEY, MASTER_CLOCK / 8) /* B3 */
	MCFG_POKEY_ALLPOT_R_CB(IOPORT("DSW1"))
	MCFG_POKEY_OUTPUT_OPAMP(BW_R47, BW_C32, 5.0)
	MCFG_SOUND_ROUTE_EX(0, "discrete", 1.0, 1)

	MCFG_SOUND_ADD("discrete", DISCRETE, 0)
	MCFG_DISCRETE_INTF(bwidow)

	MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)

	//MCFG_QUANTUM_PERFECT_CPU("pokey1")
开发者ID:Fulg,项目名称:mame,代码行数:30,代码来源:bwidow.c


示例5: MCFG_I8255_OUT_PORTC_CB

	MCFG_I8255_OUT_PORTC_CB(WRITE8(aces1_state, ic25_write_c))  // reel write, extra lamp strobe

	// 0xafe0 IC37 - doors, coins, reel optics (reads)
	MCFG_DEVICE_ADD("ic37", I8255A, 0)
	MCFG_I8255_IN_PORTA_CB(READ8(aces1_state, ic37_read_a)) // extra lamps
	MCFG_I8255_IN_PORTB_CB(READ8(aces1_state, ic37_read_b)) // meters, extra lamp select
	MCFG_I8255_IN_PORTC_CB(READ8(aces1_state, ic37_read_c)) // reel write, extra lamp strobe

	MCFG_DEFAULT_LAYOUT(layout_aces1)

	/* sound hardware */
	MCFG_SPEAKER_STANDARD_MONO("mono")

	// 0xadf0 - Dips, Sound
	MCFG_SOUND_ADD("aysnd", AY8910, 1500000) /* ?? MHz */
	MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSWA"))
	MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSWB"))
	MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)

	/* steppers */
	MCFG_STARPOINT_48STEP_ADD("reel0")
	MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(aces1_state, reel0_optic_cb))
	MCFG_STARPOINT_48STEP_ADD("reel1")
	MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(aces1_state, reel1_optic_cb))
	MCFG_STARPOINT_48STEP_ADD("reel2")
	MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(aces1_state, reel2_optic_cb))
	MCFG_STARPOINT_48STEP_ADD("reel3")
	MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(aces1_state, reel3_optic_cb))
MACHINE_CONFIG_END

开发者ID:curtiszimmerman,项目名称:mame,代码行数:29,代码来源:aces1.c


示例6: MCFG_SOFTWARE_LIST_ADD

	MCFG_SOFTWARE_LIST_ADD("flop_list","x1_flop")

	MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "x1_cart")
	MCFG_GENERIC_EXTENSIONS("bin,rom")

	SPEAKER(config, "x1_l").front_left();
	SPEAKER(config, "x1_r").front_right();
	SPEAKER(config, "pce_l").front_left();
	SPEAKER(config, "pce_r").front_right();

//  SPEAKER(config, "lspeaker").front_left();
//  SPEAKER(config, "rspeaker").front_right();

	/* TODO:is the AY mono or stereo? Also volume balance isn't right. */
	MCFG_DEVICE_ADD("ay", AY8910, MAIN_CLOCK/8)
	MCFG_AY8910_PORT_A_READ_CB(IOPORT("P1"))
	MCFG_AY8910_PORT_B_READ_CB(IOPORT("P2"))
	MCFG_SOUND_ROUTE(0, "x1_l",  0.25)
	MCFG_SOUND_ROUTE(0, "x1_r", 0.25)
	MCFG_SOUND_ROUTE(1, "x1_l",  0.5)
	MCFG_SOUND_ROUTE(2, "x1_r", 0.5)
	WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "x1_l", 0.25).add_route(ALL_OUTPUTS, "x1_r", 0.10);

	MCFG_CASSETTE_ADD("cassette")
	MCFG_CASSETTE_FORMATS(x1_cassette_formats)
	MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
	MCFG_CASSETTE_INTERFACE("x1_cass")

	MCFG_SOFTWARE_LIST_ADD("cass_list","x1_cass")

	MCFG_TIMER_DRIVER_ADD_PERIODIC("keyboard_timer", x1twin_state, x1_keyboard_callback, attotime::from_hz(250))
开发者ID:MASHinfo,项目名称:mame,代码行数:31,代码来源:x1twin.cpp


示例7: MCFG_SCREEN_REFRESH_RATE

	MCFG_SCREEN_REFRESH_RATE(60)
	MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
	MCFG_SCREEN_SIZE(64*8, 32*8)
	MCFG_SCREEN_VISIBLE_AREA(4*8, 60*8-1, 2*8, 30*8-1)
	MCFG_SCREEN_UPDATE_DRIVER(rmhaihai_state, screen_update)
	MCFG_SCREEN_PALETTE("palette")

	MCFG_GFXDECODE_ADD("gfxdecode", "palette", rmhaihai)

	MCFG_PALETTE_ADD_RRRRGGGGBBBB_PROMS("palette", 0x100)

	/* sound hardware */
	MCFG_SPEAKER_STANDARD_MONO("mono")

	MCFG_SOUND_ADD("aysnd", AY8910, 20000000/16)
	MCFG_AY8910_PORT_A_READ_CB(IOPORT("DSW2"))
	MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW1"))
	MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)

	MCFG_SOUND_ADD("msm", MSM5205, 500000)
	MCFG_MSM5205_PRESCALER_SELECTOR(MSM5205_SEX_4B)
	MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END

static MACHINE_CONFIG_DERIVED( rmhaisei, rmhaihai )

	/* basic machine hardware */

	/* video hardware */
	MCFG_GFXDECODE_MODIFY("gfxdecode", themj)
	MCFG_PALETTE_MODIFY("palette")
开发者ID:bradhugh,项目名称:mame,代码行数:31,代码来源:rmhaihai.cpp


示例8: MACHINE_CONFIG_START

}

static MACHINE_CONFIG_START( maxaflex, maxaflex_state )
	/* basic machine hardware */
	MCFG_CPU_ADD("maincpu", M6502, FREQ_17_EXACT)
	MCFG_CPU_PROGRAM_MAP(a600xl_mem)
	MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", maxaflex_state, mf_interrupt, "screen", 0, 1)

	MCFG_CPU_ADD("mcu", M68705P3, 3579545)
	MCFG_M68705_PORTA_R_CB(READ8(maxaflex_state, mcu_portA_r))
	MCFG_M68705_PORTA_W_CB(WRITE8(maxaflex_state, mcu_portA_w))
	MCFG_M68705_PORTB_W_CB(WRITE8(maxaflex_state, mcu_portB_w))
	MCFG_M68705_PORTC_W_CB(WRITE8(maxaflex_state, mcu_portC_w))

	MCFG_DEVICE_ADD("gtia", ATARI_GTIA, 0)
	MCFG_GTIA_READ_CB(IOPORT("console"))

	MCFG_DEVICE_ADD("antic", ATARI_ANTIC, 0)
	MCFG_ANTIC_GTIA("gtia")

	MCFG_DEVICE_ADD("pia", PIA6821, 0)
	MCFG_PIA_READPA_HANDLER(READ8(maxaflex_state, pia_pa_r))
	MCFG_PIA_READPB_HANDLER(READ8(maxaflex_state, pia_pb_r))
	MCFG_PIA_WRITEPB_HANDLER(WRITE8(maxaflex_state, pia_pb_w))
	MCFG_PIA_CB2_HANDLER(WRITELINE(maxaflex_state, pia_cb2_w))

	/* video hardware */
	MCFG_SCREEN_ADD("screen", RASTER)
	MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
	MCFG_SCREEN_VISIBLE_AREA(MIN_X, MAX_X, MIN_Y, MAX_Y)
	MCFG_SCREEN_REFRESH_RATE(FRAME_RATE_60HZ)
开发者ID:Robbbert,项目名称:store1,代码行数:31,代码来源:maxaflex.cpp


示例9: MACHINE_CONFIG_START

void midcoin24cdjuke_state::machine_reset()
{
}


static MACHINE_CONFIG_START( midcoin24cdjuke, midcoin24cdjuke_state )
	/* basic machine hardware */
	MCFG_CPU_ADD("maincpu", Z80,6000000)         /* ? MHz */
	MCFG_CPU_PROGRAM_MAP(midcoin24cdjuke_map)
	MCFG_CPU_IO_MAP(midcoin24cdjuke_io)
	MCFG_CPU_PERIODIC_INT_DRIVER(midcoin24cdjuke_state, irq0_line_hold, 500)

	MCFG_DEFAULT_LAYOUT(layout_24cdjuke)

	MCFG_DEVICE_ADD("ic11", I8255A, 0)
	MCFG_I8255_IN_PORTA_CB(IOPORT("MD1"))
	MCFG_I8255_IN_PORTB_CB(IOPORT("MD2"))
	MCFG_I8255_IN_PORTC_CB(IOPORT("MD3"))

	MCFG_DEVICE_ADD("ic25", I8255A, 0)
	MCFG_I8255_IN_PORTB_CB(IOPORT("PB"))
	MCFG_I8255_IN_PORTC_CB(READ8(midcoin24cdjuke_state, kb_row_r))
	MCFG_I8255_OUT_PORTC_CB(WRITE8(midcoin24cdjuke_state, kb_col_w))

	MCFG_DEVICE_ADD("ic31", I8255A, 0)
	MCFG_I8255_OUT_PORTB_CB(LOGGER("PPI8255 - unmapped write port B", 0))
	MCFG_I8255_IN_PORTC_CB(IOPORT("MD4"))
MACHINE_CONFIG_END


ROM_START( 24cdjuke )
开发者ID:DragonMinded,项目名称:mame,代码行数:31,代码来源:24cdjuke.cpp


示例10: WRITE8_MEMBER

WRITE8_MEMBER(vroulet_state::ppi8255_b_w){}// lamps ?
WRITE8_MEMBER(vroulet_state::ppi8255_c_w){}

/* Machine Driver */

static MACHINE_CONFIG_START( vroulet, vroulet_state )
	// basic machine hardware
	MCFG_CPU_ADD("maincpu", Z80, 4000000)   //???
	MCFG_CPU_PROGRAM_MAP(vroulet_map)
	MCFG_CPU_IO_MAP(vroulet_io_map)
	MCFG_CPU_VBLANK_INT_DRIVER("screen", vroulet_state,  irq0_line_hold)

	MCFG_NVRAM_ADD_1FILL("nvram")

	MCFG_DEVICE_ADD("ppi8255_0", I8255A, 0)
	MCFG_I8255_IN_PORTA_CB(IOPORT("IN0"))
	MCFG_I8255_IN_PORTB_CB(IOPORT("IN1"))
	MCFG_I8255_IN_PORTC_CB(IOPORT("IN2"))

	MCFG_DEVICE_ADD("ppi8255_1", I8255A, 0)
	MCFG_I8255_OUT_PORTA_CB(WRITE8(vroulet_state, ppi8255_a_w))
	MCFG_I8255_OUT_PORTB_CB(WRITE8(vroulet_state, ppi8255_b_w))
	MCFG_I8255_OUT_PORTC_CB(WRITE8(vroulet_state, ppi8255_c_w))

	// video hardware
	MCFG_SCREEN_ADD("screen", RASTER)
	MCFG_SCREEN_REFRESH_RATE(60)
	MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
	MCFG_SCREEN_SIZE(32*8, 32*8)
	MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
	MCFG_SCREEN_UPDATE_DRIVER(vroulet_state, screen_update)
开发者ID:DragonMinded,项目名称:mame,代码行数:31,代码来源:vroulet.cpp


示例11: MCFG_SCREEN_SIZE

	MCFG_SCREEN_SIZE(32*8, 32*8)
	MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
	MCFG_SCREEN_UPDATE_DRIVER(gladiatr_state, screen_update_gladiatr)
	MCFG_SCREEN_PALETTE("palette")

	MCFG_GFXDECODE_ADD("gfxdecode", "palette", gladiatr)
	MCFG_PALETTE_ADD("palette", 1024)

	MCFG_VIDEO_START_OVERRIDE(gladiatr_state,gladiatr)

	/* sound hardware */
	MCFG_SPEAKER_STANDARD_MONO("mono")

	MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/8) /* verified on pcb */
	MCFG_YM2203_IRQ_HANDLER(WRITELINE(gladiatr_state, gladiator_ym_irq))
	MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW3")) /* port B read */
	MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(gladiatr_state, gladiator_int_control_w)) /* port A write */
	MCFG_SOUND_ROUTE(0, "mono", 0.60)
	MCFG_SOUND_ROUTE(1, "mono", 0.60)
	MCFG_SOUND_ROUTE(2, "mono", 0.60)
	MCFG_SOUND_ROUTE(3, "mono", 0.50)

	MCFG_SOUND_ADD("msm", MSM5205, XTAL_455kHz) /* verified on pcb */
	MCFG_MSM5205_PRESCALER_SELECTOR(MSM5205_SEX_4B)  /* vclk input mode    */
	MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60)
MACHINE_CONFIG_END

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

  Game driver(s)
开发者ID:crazii,项目名称:mameplus,代码行数:30,代码来源:gladiatr.c


示例12: MACHINE_CONFIG_START

	m_bgtopbank = 0;
}

static MACHINE_CONFIG_START( angelkds, angelkds_state )

	MCFG_CPU_ADD("maincpu", Z80, XTAL_6MHz)
	MCFG_CPU_PROGRAM_MAP(main_map)
	MCFG_CPU_IO_MAP(main_portmap)
	MCFG_CPU_VBLANK_INT_DRIVER("screen", angelkds_state,  irq0_line_hold)

	MCFG_CPU_ADD("sub", Z80, XTAL_4MHz)
	MCFG_CPU_PROGRAM_MAP(sub_map)
	MCFG_CPU_IO_MAP(sub_portmap)

	MCFG_DEVICE_ADD("ppi8255_0", I8255A, 0)
	MCFG_I8255_IN_PORTA_CB(IOPORT("I40"))
	MCFG_I8255_IN_PORTB_CB(IOPORT("I41"))
	MCFG_I8255_IN_PORTC_CB(READ8(angelkds_state, angeklds_ff_r)) // or left inputs don't work
	MCFG_I8255_OUT_PORTC_CB(WRITE8(angelkds_state, angelkds_cpu_bank_write))

	MCFG_DEVICE_ADD("ppi8255_1", I8255A, 0)
	MCFG_I8255_IN_PORTA_CB(IOPORT("I80"))
	MCFG_I8255_IN_PORTB_CB(IOPORT("I81"))
	MCFG_I8255_IN_PORTC_CB(IOPORT("I82"))

	MCFG_QUANTUM_TIME(attotime::from_hz(6000))

	/* video hardware */
	MCFG_SCREEN_ADD("screen", RASTER)
	MCFG_SCREEN_REFRESH_RATE(60)
	MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
开发者ID:Fulg,项目名称:mame,代码行数:31,代码来源:angelkds.cpp


示例13: GFXDECODE_ENTRY

	GFXDECODE_ENTRY( "gfx1", 0, tilelayout1, 0, 16 )    /* only odd color codes are used */
	GFXDECODE_ENTRY( "gfx2", 0, tilelayout2, 0,  4 )    /* only color codes 0 and 3 used */
GFXDECODE_END



static MACHINE_CONFIG_START( iqblock, iqblock_state )

	/* basic machine hardware */
	MCFG_CPU_ADD("maincpu", Z80,12000000/2) /* 6 MHz */
	MCFG_CPU_PROGRAM_MAP(main_map)
	MCFG_CPU_IO_MAP(main_portmap)
	MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", iqblock_state, irq, "screen", 0, 1)

	MCFG_DEVICE_ADD("ppi8255", I8255A, 0)
	MCFG_I8255_IN_PORTA_CB(IOPORT("P1"))
	MCFG_I8255_IN_PORTB_CB(IOPORT("P2"))
	MCFG_I8255_IN_PORTC_CB(IOPORT("EXTRA"))
	MCFG_I8255_OUT_PORTC_CB(WRITE8(iqblock_state, port_C_w))

	/* video hardware */
	MCFG_SCREEN_ADD("screen", RASTER)
	MCFG_SCREEN_REFRESH_RATE(60)
	MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
	MCFG_SCREEN_SIZE(64*8, 32*8)
	MCFG_SCREEN_VISIBLE_AREA(0*8, 64*8-1, 0*8, 30*8-1)
	MCFG_SCREEN_UPDATE_DRIVER(iqblock_state, screen_update)
	MCFG_SCREEN_PALETTE("palette")

	MCFG_GFXDECODE_ADD("gfxdecode", "palette", iqblock)
	MCFG_PALETTE_ADD("palette", 1024)
开发者ID:mbcoguno,项目名称:mame,代码行数:31,代码来源:iqblock.c


示例14: memregion

	m_char_rom = memregion(Z80_TAG)->base() + 0x5000;
	m_port40 = 0;
}

/* Machine Driver */

static MACHINE_CONFIG_START( phc25, phc25_state )
	/* basic machine hardware */
	MCFG_CPU_ADD(Z80_TAG, Z80, XTAL_4MHz)
	MCFG_CPU_PROGRAM_MAP(phc25_mem)
	MCFG_CPU_IO_MAP(phc25_io)

	/* sound hardware */
	MCFG_SPEAKER_STANDARD_MONO("mono")
	MCFG_SOUND_ADD(AY8910_TAG, AY8910, 1996750)
	MCFG_AY8910_PORT_A_READ_CB(IOPORT("JOY0"))
	MCFG_AY8910_PORT_B_READ_CB(IOPORT("JOY1"))
	MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
	MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
	MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)

	/* devices */
	MCFG_CASSETTE_ADD("cassette")
	MCFG_CASSETTE_FORMATS(phc25_cassette_formats)
	MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)

	MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_devices, "printer")
	MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(phc25_state, write_centronics_busy))

	MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
开发者ID:goofwear,项目名称:mame,代码行数:30,代码来源:phc25.cpp


示例15: MCFG_SPEAKER_STANDARD_MONO

	MCFG_SPEAKER_STANDARD_MONO("mono")
	MCFG_SOUND_ADD("aysnd", AY8910, 11000000/4)
	MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END


static MACHINE_CONFIG_START( dealer, epos_state )

	/* basic machine hardware */
	MCFG_CPU_ADD("maincpu", Z80, 11000000/4)    /* 2.75 MHz (see notes) */
	MCFG_CPU_PROGRAM_MAP(dealer_map)
	MCFG_CPU_IO_MAP(dealer_io_map)
	MCFG_CPU_VBLANK_INT_DRIVER("screen", epos_state,  irq0_line_hold)

	MCFG_DEVICE_ADD("ppi8255", I8255A, 0)
	MCFG_I8255_IN_PORTA_CB(IOPORT("INPUTS"))
	MCFG_I8255_OUT_PORTC_CB(WRITE8(epos_state, write_prtc))

	MCFG_MACHINE_START_OVERRIDE(epos_state,dealer)

	/* video hardware */
	MCFG_SCREEN_ADD("screen", RASTER)
	MCFG_SCREEN_REFRESH_RATE(60)
	MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
	MCFG_SCREEN_SIZE(272, 241)
	MCFG_SCREEN_VISIBLE_AREA(0, 271, 0, 235)
	MCFG_SCREEN_UPDATE_DRIVER(epos_state, screen_update_epos)

	/* sound hardware */
	MCFG_SPEAKER_STANDARD_MONO("mono")
	MCFG_SOUND_ADD("aysnd", AY8910, 11000000/4)
开发者ID:Archlogic,项目名称:libretro-mame,代码行数:31,代码来源:epos.c


示例16: MCFG_SPEAKER_STANDARD_MONO

	MCFG_SPEAKER_STANDARD_MONO("mono")

	MCFG_SOUND_ADD("ay1", AY8910, XTAL_6MHz/2)
	MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)

	MCFG_SOUND_ADD("ay2", AY8910, XTAL_6MHz/2)
	MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)

	/* via */
	MCFG_DEVICE_ADD("via6522_0", VIA6522, 0)
	MCFG_VIA6522_WRITEPA_HANDLER(WRITE8(gameplan_state, video_data_w))
	MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(gameplan_state, gameplan_video_command_w))
	MCFG_VIA6522_CA2_HANDLER(WRITELINE(gameplan_state, video_command_trigger_w))

	MCFG_DEVICE_ADD("via6522_1", VIA6522, 0)
	MCFG_VIA6522_READPA_HANDLER(IOPORT("IN0"))
	MCFG_VIA6522_READPB_HANDLER(IOPORT("IN1"))
	MCFG_VIA6522_CA2_HANDLER(WRITELINE(gameplan_state, trvquest_coin_w))

	MCFG_DEVICE_ADD("via6522_2", VIA6522, 0)
	MCFG_VIA6522_READPA_HANDLER(IOPORT("UNK"))
	MCFG_VIA6522_READPB_HANDLER(IOPORT("DSW"))
	MCFG_VIA6522_CA2_HANDLER(WRITELINE(gameplan_state, trvquest_misc_w))
	MCFG_VIA6522_IRQ_HANDLER(WRITELINE(gameplan_state, via_irq))
MACHINE_CONFIG_END

ROM_START( trvquest )
	ROM_REGION( 0x10000, "maincpu", 0 )
	ROM_LOAD( "rom3", 0xb000, 0x1000, CRC(2ff7f370) SHA1(66f40426ed02ee44235e17a49d9054ede42b83b9) )
	ROM_LOAD( "rom4", 0xc000, 0x1000, CRC(b1adebcb) SHA1(661cabc92b1defce5c2edb8e873a80d5032084d0) )
	ROM_LOAD( "rom5", 0xd000, 0x1000, CRC(2fc10a15) SHA1(8ecce32a5a167056c8fb48554a8907ae6299921e) )
开发者ID:Archlogic,项目名称:libretro-mame,代码行数:31,代码来源:trvquest.c


示例17: MACHINE_CONFIG_START

/*************************
*    Machine Drivers     *
*************************/

static MACHINE_CONFIG_START( gat, gatron_state )

	/* basic machine hardware */
	MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/24)   /* 666.66 kHz, guess */
	MCFG_CPU_PROGRAM_MAP(gat_map)
	MCFG_CPU_IO_MAP(gat_portmap)
	MCFG_CPU_VBLANK_INT_DRIVER("screen", gatron_state,  nmi_line_pulse)

	MCFG_NVRAM_ADD_0FILL("nvram")

	MCFG_DEVICE_ADD("ppi8255", I8255A, 0)
	MCFG_I8255_IN_PORTA_CB(IOPORT("IN0"))
	MCFG_I8255_IN_PORTB_CB(IOPORT("IN1"))
	MCFG_I8255_OUT_PORTC_CB(WRITE8(gatron_state, output_port_1_w))

	/* video hardware */
	MCFG_SCREEN_ADD("screen", RASTER)
	MCFG_SCREEN_REFRESH_RATE(60)
	MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
	MCFG_SCREEN_SIZE(48*8, 16*16)
	MCFG_SCREEN_VISIBLE_AREA(0*8, 48*8-1, 0*8, 16*16-1)
	MCFG_SCREEN_UPDATE_DRIVER(gatron_state, screen_update_gat)
	MCFG_SCREEN_PALETTE("palette")

	MCFG_GFXDECODE_ADD("gfxdecode", "palette", gat)
	MCFG_PALETTE_ADD("palette", 8)
	MCFG_PALETTE_INIT_OWNER(gatron_state, gatron)
开发者ID:Archlogic,项目名称:libretro-mame,代码行数:31,代码来源:gatron.c


示例18: MCFG_CPU_ADD

	MCFG_CPU_ADD("maincpu", Z80, XTAL_3_6864MHz/2) /* Z80A, X1(aka E0 on schematics): 3.6864Mhz */
	MCFG_CPU_PROGRAM_MAP(z80_mem_804_1_4)
	MCFG_CPU_IO_MAP(z80_io_1_4)
	MCFG_QUANTUM_TIME(attotime::from_hz(60))

	MCFG_ROC10937_ADD("vfd",0) // RIGHT_TO_LEFT

	/* video hardware */
	MCFG_DEVICE_ADD(TERMINAL_TAG, GENERIC_TERMINAL, 0)
	MCFG_GENERIC_TERMINAL_KEYBOARD_CB(WRITE8(digel804_state, digel804_serial_put))

	MCFG_DEFAULT_LAYOUT(layout_digel804)

	MCFG_DEVICE_ADD("74c923", MM74C923, 0)
	MCFG_MM74C922_DA_CALLBACK(WRITELINE(digel804_state, da_w))
	MCFG_MM74C922_X1_CALLBACK(IOPORT("LINE0"))
	MCFG_MM74C922_X2_CALLBACK(IOPORT("LINE1"))
	MCFG_MM74C922_X3_CALLBACK(IOPORT("LINE2"))
	MCFG_MM74C922_X4_CALLBACK(IOPORT("LINE3"))

	/* acia */
	MCFG_DEVICE_ADD("acia", MOS6551, 0)
	MCFG_MOS6551_XTAL(XTAL_1_8432MHz)

	MCFG_RAM_ADD(RAM_TAG)
	MCFG_RAM_DEFAULT_SIZE("256K")
	MCFG_RAM_EXTRA_OPTIONS("32K,64K,128K")

	/* sound hardware */
	MCFG_SPEAKER_STANDARD_MONO("mono")
	MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
开发者ID:Archlogic,项目名称:libretro-mame,代码行数:31,代码来源:digel804.c


示例19: MACHINE_CONFIG_START

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

static MACHINE_CONFIG_START( votrpss, votrpss_state )
	/* basic machine hardware */
	MCFG_CPU_ADD("maincpu", Z80, XTAL_8MHz/2)  /* 4.000 MHz, verified */
	MCFG_CPU_PROGRAM_MAP(votrpss_mem)
	MCFG_CPU_IO_MAP(votrpss_io)
	MCFG_CPU_IRQ_ACKNOWLEDGE_DRIVER(votrpss_state,irq_ack)

	/* video hardware */
	//MCFG_DEFAULT_LAYOUT(layout_votrpss)

	/* sound hardware */
	MCFG_SPEAKER_STANDARD_MONO("mono")
	MCFG_SOUND_ADD("ay", AY8910, XTAL_8MHz/4) /* 2.000 MHz, verified */
	MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW1"))        // port B read
	MCFG_AY8910_PORT_A_WRITE_CB(DEVWRITE8("votrax", votrax_sc01_device, write))     // port A write
	MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
	MCFG_DEVICE_ADD("votrax", VOTRAX_SC01, 720000) /* 720 kHz? needs verify */
	MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)

	/* Devices */
	MCFG_DEVICE_ADD(TERMINAL_TAG, GENERIC_TERMINAL, 0)
	MCFG_GENERIC_TERMINAL_KEYBOARD_CB(WRITE8(votrpss_state, kbd_put))

	MCFG_DEVICE_ADD("uart", I8251, 0)
	MCFG_I8251_TXD_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_txd))
	MCFG_I8251_DTR_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_dtr))
	MCFG_I8251_RTS_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_rts))

	MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, NULL)
开发者ID:dinkc64,项目名称:mame,代码行数:31,代码来源:votrpss.c


示例20: MCFG_SCREEN_UPDATE_DRIVER

	MCFG_SCREEN_UPDATE_DRIVER(aquarius_state, screen_update_aquarius)
	MCFG_SCREEN_PALETTE("palette")

	MCFG_GFXDECODE_ADD("gfxdecode", "palette", aquarius )
	MCFG_TEA1002_ADD("encoder", XTAL_8_867238MHz)
	MCFG_PALETTE_ADD("palette", 512)
	MCFG_PALETTE_INDIRECT_ENTRIES(16)
	MCFG_PALETTE_INIT_OWNER(aquarius_state, aquarius)

	/* sound hardware */
	MCFG_SPEAKER_STANDARD_MONO("mono")
	MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
	MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)

	MCFG_SOUND_ADD("ay8910", AY8910, XTAL_3_579545MHz/2) // ??? AY-3-8914
	MCFG_AY8910_PORT_A_READ_CB(IOPORT("RIGHT"))
	MCFG_AY8910_PORT_B_READ_CB(IOPORT("LEFT"))
	MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)

	/* cassette */
	MCFG_CASSETTE_ADD( "cassette" )
	MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED)

	/* cartridge */
	MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_linear_slot, "aquarius_cart")

	/* internal ram */
	MCFG_RAM_ADD(RAM_TAG)
	MCFG_RAM_DEFAULT_SIZE("4K")
	MCFG_RAM_EXTRA_OPTIONS("8K,20K,36K")
开发者ID:NULUSIOS,项目名称:mame,代码行数:30,代码来源:aquarius.cpp



注:本文中的IOPORT函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ IORD函数代码示例发布时间:2022-05-30
下一篇:
C++ IOObjectRelease函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap