From 40c1c87b732fed01093a6741df72a70d2a2d6a57 Mon Sep 17 00:00:00 2001 From: Michael Zapf Date: Wed, 12 Feb 2014 11:58:29 +0000 Subject: [PATCH] Fixed sector extract for FM recording. --- src/lib/formats/flopimg.c | 38 ++++++++++++-------------------------- 1 file changed, 12 insertions(+), 26 deletions(-) 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; } }