src/lib/formats/dfi_dsk.c
| r15037 | r15038 | |
| 89 | 89 | { |
| 90 | 90 | char sign[4]; |
| 91 | 91 | io_generic_read(io, sign, 0, 4); |
| 92 | | if (memcmp(sign, "DFER", 4)) |
| 92 | if (memcmp(sign, "DFER", 4)==0) |
| 93 | 93 | fatalerror("Old type Discferret image detected; the mess Discferret decoder will not handle this properly, bailing out!\n"); |
| 94 | 94 | return memcmp(sign, "DFE2", 4) ? 0 : 100; |
| 95 | 95 | } |
| r15037 | r15038 | |
| 145 | 145 | index_time = total_time; |
| 146 | 146 | //index_polarity ^= 1; |
| 147 | 147 | //fprintf(stderr,"index state changed to %d at time=%d\n", index_polarity, total_time); |
| 148 | | fprintf(stderr,"index rising edge seen at time=%d\n", total_time); |
| 148 | //fprintf(stderr,"index rising edge seen at time=%d\n", total_time); |
| 149 | 149 | if (onerev_time == 0) onerev_time = total_time; |
| 150 | 150 | index_count =+ 1;//index_polarity; |
| 151 | 151 | } else // (v & 0x80) == 0 |
| 152 | 152 | total_time += v & 0x7f; |
| 153 | 153 | } |
| 154 | |
| 155 | // its possible on single read images for there to be no index pulse during the image at all! |
| 156 | if (onerev_time == 0) onerev_time = total_time; |
| 154 | 157 | |
| 155 | | //if(!track && !head) |
| 158 | if(!track && !head) |
| 156 | 159 | fprintf(stderr, "%02d:%d tt=%10d it=%10d\n", track, head, total_time, index_time); |
| 157 | 160 | if(!track && !head) { |
| 158 | 161 | fprintf(stderr, "index_count: %d, onerev_time: %d\n", index_count, onerev_time); |