From 6da629d2a83236971b80fff2624a6f4fd202bfea Mon Sep 17 00:00:00 2001 From: OBattler Date: Wed, 5 Oct 2016 16:54:01 +0200 Subject: [PATCH] Reverted the disc_imd.c changes as it turns out they were not needed at all and only messed up reads. --- src/disc_imd.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/disc_imd.c b/src/disc_imd.c index 53bb33d3e..966401309 100644 --- a/src/disc_imd.c +++ b/src/disc_imd.c @@ -580,16 +580,9 @@ void imd_seek(int drive, int track) id[2] = real_sector; id[3] = (n == 0xFF) ? n_map[actual_sector] : n; ssize = 128 << ((uint32_t) id[3]); + data = imd[drive].track_buffer[side] + track_buf_pos[side]; type = imd[drive].buffer[imd[drive].tracks[track][side].sector_data_offs[actual_sector]]; type = (type >> 1) & 7; - if (type & 1) - { - data = &(imd[drive].buffer[imd[drive].tracks[track][side].sector_data_offs[actual_sector] + 1]); - } - else - { - data = imd[drive].track_buffer[side] + track_buf_pos[side]; - } deleted = bad_crc = 0; if ((type == 2) || (type == 4)) deleted = 1; if ((type == 3) || (type == 4)) bad_crc = 1; @@ -614,19 +607,12 @@ void imd_seek(int drive, int track) ssize = 128 << ((uint32_t) id[3]); ordered_pos = imd[drive].xdf_ordered_pos[id[2]][side]; + data = imd[drive].track_buffer[side] + track_buf_pos[side]; type = imd[drive].buffer[imd[drive].tracks[track][side].sector_data_offs[ordered_pos]]; type = (type >> 1) & 7; deleted = bad_crc = 0; if ((type == 2) || (type == 4)) deleted = 1; if ((type == 3) || (type == 4)) bad_crc = 1; - if (type & 1) - { - data = &(imd[drive].buffer[imd[drive].tracks[track][side].sector_data_offs[ordered_pos] + 1]); - } - else - { - data = imd[drive].track_buffer[side] + track_buf_pos[side]; - } imd_sector_to_buffer(drive, track, side, data, ordered_pos, ssize); if (is_trackx)