trunk/src/lib/formats/flopimg.c
| r245702 | r245703 | |
| 1058 | 1058 | |
| 1059 | 1059 | bool floppy_image_format_t::type_no_data(int type) const |
| 1060 | 1060 | { |
| 1061 | | return type == CRC_CCITT_START || |
| 1061 | return |
| 1062 | type == CRC_CCITT_START || |
| 1062 | 1063 | type == CRC_CCITT_FM_START || |
| 1063 | 1064 | type == CRC_AMIGA_START || |
| 1064 | 1065 | type == CRC_CBM_START || |
| r245702 | r245703 | |
| 1074 | 1075 | |
| 1075 | 1076 | bool floppy_image_format_t::type_data_mfm(int type, int p1, const gen_crc_info *crcs) const |
| 1076 | 1077 | { |
| 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)); |
| 1082 | 1096 | } |
| 1083 | 1097 | |
| 1084 | 1098 | void floppy_image_format_t::collect_crcs(const desc_e *desc, gen_crc_info *crcs) |
| r245702 | r245703 | |
| 1341 | 1355 | } |
| 1342 | 1356 | if(crcs[i].fixup_mfm_clock) { |
| 1343 | 1357 | 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); |
| 1345 | 1359 | } |
| 1346 | 1360 | crcs[i].write = -1; |
| 1347 | 1361 | } |