diff --git a/atrcopy/dos33.py b/atrcopy/dos33.py index 81b9147..0b09584 100644 --- a/atrcopy/dos33.py +++ b/atrcopy/dos33.py @@ -11,7 +11,7 @@ log = logging.getLogger(__name__) class Dos33VTOC(VTOC): max_tracks = (256 - 0x38) / 4 # 50, but kept here in case sector size changed max_sectors = max_tracks * 16 - reorder_index = np.tile(np.arange(7, -1, -1), max_tracks * 2) + (np.repeat(np.arange(max_tracks * 2), 8) * 8) + vtoc_bit_reorder_index = np.tile(np.arange(15, -1, -1), max_tracks) + (np.repeat(np.arange(max_tracks), 16) * 16) def parse_segments(self, segments): # VTOC stored in groups of 4 bytes starting at 0x38 @@ -35,40 +35,41 @@ class Dos33VTOC(VTOC): # i.e. each group of 16 bits needs to be reversed. self.vtoc = segments[0].data - # create a view using little-endian 16 bit values, skipping every other - # 16 bit value. This gets us 76543210FEDCBA98 76543210FEDCBA98 ... etc - expanded = self.vtoc[0x38:].view(dtype="