src/mess/machine/upd765.c
| r15351 | r15352 | |
| 136 | 136 | |
| 137 | 137 | int command; |
| 138 | 138 | |
| 139 | UINT8 ready_changed; |
| 140 | |
| 139 | 141 | emu_timer *seek_timer; |
| 140 | 142 | emu_timer *timer; |
| 141 | 143 | int timer_type; |
| r15351 | r15352 | |
| 2055 | 2057 | /* interrupt pending? */ |
| 2056 | 2058 | if (fdc->upd765_flags & UPD765_INT) |
| 2057 | 2059 | { |
| 2058 | | /* yes. Clear int */ |
| 2059 | | upd765_set_int(device, CLEAR_LINE); |
| 2060 | /* clear ready changed bit */ |
| 2061 | fdc->ready_changed &= ~(1 << fdc->drive); |
| 2060 | 2062 | |
| 2061 | 2063 | /* clear drive seek bits */ |
| 2062 | 2064 | fdc->FDC_main &= ~(1 | 2 | 4 | 8); |
| r15351 | r15352 | |
| 2068 | 2070 | |
| 2069 | 2071 | /* return result */ |
| 2070 | 2072 | upd765_setup_result_phase(device,2); |
| 2073 | |
| 2074 | if (fdc->ready_changed) |
| 2075 | { |
| 2076 | fdc->drive++; |
| 2077 | fdc->upd765_status[0] = 0xc0 | fdc->drive; |
| 2078 | } |
| 2079 | else |
| 2080 | { |
| 2081 | /* Clear int */ |
| 2082 | upd765_set_int(device, CLEAR_LINE); |
| 2083 | } |
| 2071 | 2084 | } |
| 2072 | 2085 | else |
| 2073 | 2086 | { |
| r15351 | r15352 | |
| 2292 | 2305 | |
| 2293 | 2306 | fdc->upd765_status[0] = 0x080 | 0x040; |
| 2294 | 2307 | |
| 2308 | // HACK signal ready changed for all drives |
| 2309 | fdc->ready_changed = 0x0f; |
| 2310 | |
| 2295 | 2311 | /* for the purpose of pc-xt. If any of the drives have a disk inserted, |
| 2296 | 2312 | do not set not-ready - need to check with pc_fdc.c whether all drives |
| 2297 | 2313 | are checked or only the drive selected with the drive select bits?? */ |