src/mess/machine/conkort.c
| r7531 | r7532 | |
| 114 | 114 | { |
| 115 | 115 | UINT8 status; /* ABC BUS status */ |
| 116 | 116 | UINT8 data; /* ABC BUS data */ |
| 117 | | int pio_ardy; /* PIO port A ready */ |
| 118 | 117 | int fdc_irq; /* floppy interrupt */ |
| 119 | 118 | int fdc_drq; /* floppy data request */ |
| 120 | 119 | int fdc_dden; /* floppy density */ |
| r7531 | r7532 | |
| 215 | 214 | { |
| 216 | 215 | slow_t *conkort = get_safe_token_machine_slow(space->machine); |
| 217 | 216 | |
| 218 | | return (conkort->status & 0xfe) | conkort->pio_ardy; |
| 217 | return (conkort->status & 0xfe) | z80pio_ardy_r(conkort->z80pio); |
| 219 | 218 | } |
| 220 | 219 | |
| 221 | 220 | static WRITE8_HANDLER( slow_bus_c1_w ) |
| r7531 | r7532 | |
| 619 | 618 | wd17xx_dden_w(conkort->wd1791, conkort->fdc_dden); |
| 620 | 619 | } |
| 621 | 620 | |
| 622 | | static WRITE_LINE_DEVICE_HANDLER( conkort_pio_ardy_w ) |
| 623 | | { |
| 624 | | slow_t *conkort = get_safe_token_machine_slow(device->machine); |
| 625 | | |
| 626 | | conkort->pio_ardy = state; |
| 627 | | } |
| 628 | | |
| 629 | 621 | static Z80PIO_INTERFACE( conkort_pio_intf ) |
| 630 | 622 | { |
| 631 | 623 | DEVCB_CPU_INPUT_LINE(Z80_TAG, INPUT_LINE_IRQ0), /* interrupt callback */ |
| 632 | 624 | DEVCB_HANDLER(conkort_pio_port_a_r), /* port A read callback */ |
| 633 | 625 | DEVCB_HANDLER(conkort_pio_port_a_w), /* port A write callback */ |
| 634 | | DEVCB_LINE(conkort_pio_ardy_w), /* port A ready callback */ |
| 626 | DEVCB_NULL, /* port A ready callback */ |
| 635 | 627 | DEVCB_HANDLER(conkort_pio_port_b_r), /* port B read callback */ |
| 636 | 628 | DEVCB_HANDLER(conkort_pio_port_b_w), /* port B write callback */ |
| 637 | 629 | DEVCB_NULL /* port B ready callback */ |
| r7531 | r7532 | |
| 858 | 850 | /* register for state saving */ |
| 859 | 851 | state_save_register_device_item(device, 0, conkort->status); |
| 860 | 852 | state_save_register_device_item(device, 0, conkort->data); |
| 861 | | state_save_register_device_item(device, 0, conkort->pio_ardy); |
| 862 | 853 | state_save_register_device_item(device, 0, conkort->fdc_irq); |
| 863 | 854 | state_save_register_device_item(device, 0, conkort->fdc_drq); |
| 864 | 855 | state_save_register_device_item(device, 0, conkort->fdc_dden); |