Previous 199869 Revisions Next

r37191 Wednesday 15th April, 2015 at 09:50:08 UTC by Olivier Galibert
fixup crcs and mfm clock bit update (nw)
[src/lib/formats]flopimg.c

trunk/src/lib/formats/flopimg.c
r245702r245703
10581058
10591059bool floppy_image_format_t::type_no_data(int type) const
10601060{
1061   return type == CRC_CCITT_START ||
1061   return
1062      type == CRC_CCITT_START ||
10621063      type == CRC_CCITT_FM_START ||
10631064      type == CRC_AMIGA_START ||
10641065      type == CRC_CBM_START ||
r245702r245703
10741075
10751076bool floppy_image_format_t::type_data_mfm(int type, int p1, const gen_crc_info *crcs) const
10761077{
1077   return !type_no_data(type) &&
1078      type != RAW &&
1079      type != RAWBITS &&
1080      type != FM &&
1081      (type != CRC || (crcs[p1].type != CRC_CCITT && crcs[p1].type != CRC_CCITT_FM && crcs[p1].type != CRC_AMIGA));
1078   return
1079      type == MFM ||
1080      type == MFMBITS ||
1081      type == TRACK_ID ||
1082      type == HEAD_ID ||
1083      type == HEAD_ID_SWAP ||
1084      type == SECTOR_ID ||
1085      type == SIZE_ID ||
1086      type == OFFSET_ID_O ||
1087      type == OFFSET_ID_E ||
1088      type == SECTOR_ID_O ||
1089      type == SECTOR_ID_E ||
1090      type == REMAIN_O ||
1091      type == REMAIN_E ||
1092      type == SECTOR_DATA ||
1093      type == SECTOR_DATA_O ||
1094      type == SECTOR_DATA_E ||
1095      (type == CRC && (crcs[p1].type == CRC_CCITT || crcs[p1].type == CRC_AMIGA));
10821096}
10831097
10841098void floppy_image_format_t::collect_crcs(const desc_e *desc, gen_crc_info *crcs)
r245702r245703
13411355         }
13421356         if(crcs[i].fixup_mfm_clock) {
13431357            int offset = crcs[i].write + crc_cells_size(crcs[i].type);
1344            bit_w(buffer, offset, !((offset ? bit_r(buffer, offset-1) : false) || bit_r(buffer, offset+1)));
1358            bit_w(buffer, !((offset ? bit_r(buffer, offset-1) : false) || bit_r(buffer, offset+1)), 1000, offset);
13451359         }
13461360         crcs[i].write = -1;
13471361      }


Previous 199869 Revisions Next


© 1997-2024 The MAME Team