Ejemplo n.º 1
0
/* read data port */
static int I8741_data_r(const address_space *space, int num)
{
	I8741 *st = &taito8741[num];
	int ret = st->toData;
	st->status &= 0xfe;
	LOG(("%s:8741-%d DATA Read %02x\n",cpuexec_describe_context(space->machine),num,ret));

	/* update chip */
	taito8741_update(space, num);

	switch( st->mode )
	{
	case TAITO8741_PORT: /* parallel data */
		taito8741_hostdata_w(st,st->portHandler ? st->portHandler(space, st->parallelselect) : st->portName ? input_port_read(space->machine, st->portName) : 0);
		break;
	}
	return ret;
}
Ejemplo n.º 2
0
/* read data port */
static int I8741_data_r(address_space &space, int num)
{
	I8741 *st = &taito8741[num];
	int ret = st->toData;
	st->status &= 0xfe;
	LOG(("%s:8741-%d DATA Read %02x\n",space.machine().describe_context(),num,ret));

	/* update chip */
	taito8741_update(space, num);

	switch( st->mode )
	{
	case TAITO8741_PORT: /* parallel data */
		taito8741_hostdata_w(st,st->portHandler ? st->portHandler(space, st->parallelselect, 0xff) : st->portName ? space.machine().root_device().ioport(st->portName)->read() : 0);
		break;
	}
	return ret;
}
Ejemplo n.º 3
0
/* read data port */
static int I8741_data_r(int num)
{
	I8741 *st = &taito8741[num];
	int ret = st->toData;
	st->status &= 0xfe;
#if __log__
	logerror("8741-%d DATA Read %02x PC=%04x\n",num,ret,activecpu_get_pc());
#endif
	/* update chip */
	taito8741_update(num);

	switch( st->mode )
	{
	case TAITO8741_PORT: /* parallel data */
		taito8741_hostdata_w(st,st->portHandler ? st->portHandler(st->parallelselect) : 0);
		break;
	}
	return ret;
}