mirror of
https://github.com/a2-4am/passport.py.git
synced 2024-06-17 02:29:30 +00:00
Correctly write physical sector at the end of the track
In particular, `dos33.a2r` linked in https://github.com/a2-4am/passport.py/issues/3 ends up with sector 0 having a start of 49255 and an end of 3295. This fixes `dos33.a2r` but not `Copy II Plus Parameter Disk - Disk 1, Side A.a2r`. Its .woz file will now `passport.py verify` but still doesn't boot in an emulator. (in fact, it may have passed `verify woz` before and my report otherwise was incorrect)
This commit is contained in:
parent
11c93c1f2b
commit
a4060ed7c3
|
@ -727,7 +727,11 @@ class Convert(BasePassportProcessor):
|
|||
if physical_sectors:
|
||||
b = bitarray.bitarray(endian="big")
|
||||
for s in physical_sectors.values():
|
||||
b.extend(track.bits[s.start_bit_index:s.end_bit_index])
|
||||
if s.start_bit_index <= s.end_bit_index:
|
||||
b.extend(track.bits[s.start_bit_index:s.end_bit_index])
|
||||
else:
|
||||
b.extend(track.bits[s.start_bit_index:])
|
||||
b.extend(track.bits[:s.end_bit_index])
|
||||
else:
|
||||
# TODO call wozify here instead
|
||||
b = track.bits[:51021]
|
||||
|
|
Loading…
Reference in New Issue
Block a user