示例#1
0
UINT8 z80sio_c_r(int which, int ch)
{
	z80sio *sio = sios + which;
	int reg = sio->regs[ch][0] & 7;
	UINT8 result = sio->status[ch][reg];

	/* switch off the register for live state changes */
	switch (reg)
	{
		/* SIO read register 0 */
		case 0:
			result &= ~SIO_RR0_INT_PENDING;
			if (z80sio_irq_state(which) & Z80_DAISY_INT)
				result |= SIO_RR0_INT_PENDING;
			break;
	}

	VPRINTF(("%04X:sio_reg_r(%c,%d) = %02x\n", activecpu_get_pc(), 'A' + ch, reg, sio->status[ch][reg]));

	return sio->status[ch][reg];
}
示例#2
0
INLINE void interrupt_check(z80sio *sio)
{
	/* if we have a callback, update it with the current state */
	if (sio->irq_cb != NULL)
		(*sio->irq_cb)((z80sio_irq_state(sio - sios) & Z80_DAISY_INT) ? ASSERT_LINE : CLEAR_LINE);
}