#1
|
|||
|
|||
Z80DAISY.C
John Zaicev написал(а) к All в Jun 17 15:38:31 по местному времени:
[√] Приветствую, All ! /************************************************************************* z80daisy.c Z80/180 daisy chaining support functions. *************************************************************************/ #include "cpuintrf.h" #include "mame.h" #include "z80daisy.h" void z80daisyreset(const struct z80_irq_daisychain *daisy) { / loop over all devices and call their reset function / for ( ; daisy->param != -1; daisy++) if (daisy->reset) (*daisy->reset)(daisy->param); } int z80daisyupdate_irq_state(const struct z80_irq_daisychain *daisy) { / loop over all devices; dev[0] is highest priority / for ( ; daisy->param != -1; daisy++) { int state = (*daisy->irq_state)(daisy->param); / if this device is asserting the INT line, that's the one we want / if (state & Z80DAISYINT) return ASSERT_LINE; / if this device is asserting the IEO line, it blocks everyone else / if (state & Z80DAISYIEO) return CLEAR_LINE; } return CLEAR_LINE; } int z80daisycall_ack_device(const struct z80_irq_daisychain *daisy) { / loop over all devices; dev[0] is the highest priority / for ( ; daisy->param != -1; daisy++) { int state = (*daisy->irq_state)(daisy->param); / if this device is asserting the INT line, that's the one we want / if (state & Z80DAISYINT) return (*daisy->irq_ack)(daisy->param); } logerror("z80daisycall_ackdevice: failed to find an device to ack!\n"); return 0; } void z80daisycall_reti_device(const struct z80_irq_daisychain *daisy) { / loop over all devices; dev[0] is the highest priority / for ( ; daisy->param != -1; daisy++) { int state = (*daisy->irq_state)(daisy->param); / if this device is asserting the IEO line, that's the one we want / if (state & Z80DAISYIEO) { (*daisy->irq_reti)(daisy->param); return; } } logerror("z80daisycall_retidevice: failed to find an device to reti!\n"); } Вроде бы ничего не забыл... [√] До скорого, All ! ▌║▐║│║▌║││║║ /http://adf.ly/1Y63НZ/ 2║5080▌244║0 /P2Pirates@Mail.ru_/ _DreamLand laboratory --- Моему первому компьютеру 9371 день (или 302 месяца) |