当前位置: 首页>>代码示例>>C++>>正文


C++ running_machine::phase方法代码示例

本文整理汇总了C++中running_machine::phase方法的典型用法代码示例。如果您正苦于以下问题:C++ running_machine::phase方法的具体用法?C++ running_machine::phase怎么用?C++ running_machine::phase使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在running_machine的用法示例。


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

示例1: BFM_dm01_config

void BFM_dm01_config(running_machine &machine, const bfmdm01_interface *intf)
{
	assert_always(machine.phase() == MACHINE_PHASE_INIT, "Can only call BFM_dm01_config at init time!");
	assert_always(intf, "BFM_dm01_config called with an invalid interface!");
	dm01.intf = intf;
	BFM_dm01_reset(machine);

}
开发者ID:CJBass,项目名称:mame2013-libretro,代码行数:8,代码来源:bfm_dm01.c

示例2: stepper_config

void stepper_config(running_machine &machine, int which, const stepper_interface *intf)
{
	assert_always(machine.phase() == MACHINE_PHASE_INIT, "Can only call stepper_config at init time!");
	assert_always((which >= 0) && (which < MAX_STEPPERS), "stepper_config called on an invalid stepper motor!");
	assert_always(intf, "stepper_config called with an invalid interface!");

	step[which].intf = intf;

	step[which].type = intf->type;
	step[which].index_start = intf->index_start;/* location of first index value in half steps */
	step[which].index_end   = intf->index_end;  /* location of last index value in half steps */
	step[which].index_patt  = intf->index_patt; /* hex value of coil pattern (0 if not needed)*/
	step[which].initphase   = intf->initphase; /* Phase at 0 steps, for alignment) */


	step[which].pattern     = 0;
	step[which].old_pattern = 0;
	step[which].step_pos    = 0;
	step[which].phase = step[which].initphase;
	step[which].old_phase = step[which].initphase;


	switch ( step[which].type )
	{   default:
		case STARPOINT_48STEP_REEL:  /* STARPOINT RMxxx */
		case BARCREST_48STEP_REEL :  /* Barcrest Reel unit */
		case MPU3_48STEP_REEL :
		case GAMESMAN_48STEP_REEL :  /* Gamesman GMxxxx */
		case PROJECT_48STEP_REEL :
		step[which].max_steps = (48*2);
		break;
		case GAMESMAN_100STEP_REEL :
		step[which].max_steps = (100*2);
		break;
		case STARPOINT_144STEP_DICE :/* STARPOINT 1DCU DICE mechanism */
		//Dice reels are 48 step motors, but complete three full cycles between opto updates
		step[which].max_steps = ((48*3)*2);
		break;
		case STARPOINT_200STEP_REEL :
		case GAMESMAN_200STEP_REEL :
		case ECOIN_200STEP_REEL :
		step[which].max_steps = (200*2);
		break;
	}

	state_save_register_item(machine, "stepper", NULL, which, step[which].index_start);
	state_save_register_item(machine, "stepper", NULL, which, step[which].index_end);
	state_save_register_item(machine, "stepper", NULL, which, step[which].index_patt);
	state_save_register_item(machine, "stepper", NULL, which, step[which].initphase);
	state_save_register_item(machine, "stepper", NULL, which, step[which].phase);
	state_save_register_item(machine, "stepper", NULL, which, step[which].old_phase);
	state_save_register_item(machine, "stepper", NULL, which, step[which].pattern);
	state_save_register_item(machine, "stepper", NULL, which, step[which].old_pattern);
	state_save_register_item(machine, "stepper", NULL, which, step[which].step_pos);
	state_save_register_item(machine, "stepper", NULL, which, step[which].max_steps);
	state_save_register_item(machine, "stepper", NULL, which, step[which].type);
}
开发者ID:clobber,项目名称:UME,代码行数:57,代码来源:steppers.c

示例3:

static UINT8 read_dsw(running_machine &machine)
{
	UINT8 result;
	switch(machine.phase())
	{
		case MACHINE_PHASE_RESET:
		case MACHINE_PHASE_RUNNING:
			result = machine.root_device().ioport("DSW")->read();
			break;

		default:
			result = 0x00;
			break;
	}
	return result;
}
开发者ID:coinhelper,项目名称:jsmess,代码行数:16,代码来源:microtan.c

示例4: stepper_config

void stepper_config(running_machine &machine, int which, const stepper_interface *intf)
{
	assert_always(machine.phase() == MACHINE_PHASE_INIT, "Can only call stepper_config at init time!");
	assert_always((which >= 0) && (which < MAX_STEPPERS), "stepper_config called on an invalid stepper motor!");
	assert_always(intf, "stepper_config called with an invalid interface!");

	step[which].intf = intf;

	step[which].type = intf->type;
	step[which].index_start = intf->index_start;/* location of first index value in half steps */
	step[which].index_end	= intf->index_end;	/* location of last index value in half steps */
	step[which].index_patt	= intf->index_patt; /* hex value of coil pattern (0 if not needed)*/
	step[which].reverse     = intf->reverse;
	step[which].phase       = 0;
	step[which].pattern     = 0;
	step[which].old_pattern = 0;
	step[which].step_pos    = 0;


	switch ( step[which].type )
	{	default:
		case STARPOINT_48STEP_REEL:  /* STARPOINT RMxxx */
		case BARCREST_48STEP_REEL :  /* Barcrest Reel unit */
		case MPU3_48STEP_REEL :
		step[which].max_steps = (48*2);
		break;
		case STARPOINT_144STEPS_DICE :/* STARPOINT 1DCU DICE mechanism */
		step[which].max_steps = (144*2);
		break;
	}

	state_save_register_item(machine, "stepper", NULL, which, step[which].index_start);
	state_save_register_item(machine, "stepper", NULL, which, step[which].index_end);
	state_save_register_item(machine, "stepper", NULL, which, step[which].index_patt);
	state_save_register_item(machine, "stepper", NULL, which, step[which].phase);
	state_save_register_item(machine, "stepper", NULL, which, step[which].pattern);
	state_save_register_item(machine, "stepper", NULL, which, step[which].old_pattern);
	state_save_register_item(machine, "stepper", NULL, which, step[which].step_pos);
	state_save_register_item(machine, "stepper", NULL, which, step[which].max_steps);
	state_save_register_item(machine, "stepper", NULL, which, step[which].type);
	state_save_register_item(machine, "stepper", NULL, which, step[which].reverse);
}
开发者ID:,项目名称:,代码行数:42,代码来源:

示例5: debug_console_register_command

void debug_console_register_command(running_machine &machine, const char *command, UINT32 flags, int ref, int minparams, int maxparams, void (*handler)(running_machine &machine, int ref, int params, const char **param))
{
	debug_command *cmd;

	assert_always(machine.phase() == MACHINE_PHASE_INIT, "Can only call debug_console_register_command() at init time!");
	assert_always((machine.debug_flags & DEBUG_FLAG_ENABLED) != 0, "Cannot call debug_console_register_command() when debugger is not running");

	cmd = auto_alloc_clear(machine, debug_command);

	/* fill in the command */
	strcpy(cmd->command, command);
	cmd->flags = flags;
	cmd->ref = ref;
	cmd->minparams = minparams;
	cmd->maxparams = maxparams;
	cmd->handler = handler;

	/* link it */
	cmd->next = commandlist;
	commandlist = cmd;
}
开发者ID:pinchyCZN,项目名称:mameppk,代码行数:21,代码来源:debugcon.c

示例6: soundlatch_setclearedvalue

void soundlatch_setclearedvalue(running_machine &machine, int value)
{
	generic_audio_private *state = machine.generic_audio_data;
	assert_always(machine.phase() == MACHINE_PHASE_INIT, "Can only call soundlatch_setclearedvalue at init time!");
	state->latch_clear_value = value;
}
开发者ID:Ced2911,项目名称:mame-lx,代码行数:6,代码来源:generic.c

示例7: osd_update

void osd_update(running_machine &machine, int skip_redraw)
{
	int i;
	attotime time_limit;
	attotime current_time;

	target->get_primitives();

	/* don't do anything if we are initializing! */
	switch(machine.phase())
	{
		case MACHINE_PHASE_PREINIT:
		case MACHINE_PHASE_INIT:
		case MACHINE_PHASE_RESET:
			return;
		default: break;
	}

	/* if we have already aborted or completed, our work is done */
	if ((state == STATE_ABORTED) || (state == STATE_DONE))
	{
		machine.schedule_exit();
		return;
	}

	/* have we hit the time limit? */
	current_time = machine.time();
	time_limit = (current_testcase.time_limit != attotime::zero) ? current_testcase.time_limit
		: attotime::from_seconds(600);
	if (current_time > time_limit)
	{
		state = STATE_ABORTED;
		report_message(MSG_FAILURE, "Time limit of %s attoseconds exceeded", time_limit.as_string(9));
		return;
	}

	for (i = 0; i < ARRAY_LENGTH(commands); i++)
	{
		if (current_command->command_type == commands[i].command_type)
		{
			commands[i].proc(machine);
			break;
		}
	}

	/* if we are ready for the next command, advance to it */
	if (state == STATE_READY)
	{
		/* if we are at the end, and we are dumping screenshots, and we didn't
         * just dump a screenshot, dump one now
         */
		if ((test_flags & MESSTEST_ALWAYS_DUMP_SCREENSHOT) &&
			(current_command[0].command_type != MESSTEST_COMMAND_SCREENSHOT) &&
			(current_command[1].command_type == MESSTEST_COMMAND_END))
		{
			dump_screenshot(machine, TRUE);
		}

		current_command++;
	}
}
开发者ID:rogerjowett,项目名称:ClientServerMAME,代码行数:61,代码来源:testmess.c


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