diff --git a/src/lib/formats/flopimg.c b/src/lib/formats/flopimg.c index 65aa9898e29..4479aa69836 100644 --- a/src/lib/formats/flopimg.c +++ b/src/lib/formats/flopimg.c @@ -2473,35 +2473,21 @@ void floppy_image_format_t::extract_sectors_from_bitstream_fm_pc(const UINT8 *bi // Scan the bitstream for sync marks and follow them to check for // blocks + // We scan for address marks only, as index marks are not mandatory, + // and many formats actually do not use them + for(int i=0; i> j; - // Accept strings of sync marks as long and they're not wrapping - // Wrapping ones have already been take into account - // thanks to the precharging - - // fe - if(header == 0xf57e) { // address mark - if(idblk_count < 100) - idblk[idblk_count++] = pos; - i = pos-1; - } - // fb - if(header == 0xf56f ) { // data mark - if(dblk_count < 100) - dblk[dblk_count++] = pos; - i = pos-1; - } - } while(header != 0xf77a); + // fe + if(shift_reg == 0xf57e) { // address mark + if(idblk_count < 100) + idblk[idblk_count++] = i+1; + } + // fb + if(shift_reg == 0xf56f) { // data mark + if(dblk_count < 100) + dblk[dblk_count++] = i+1; } }