Repository navigation
Feature/os9 short track0 - #94
Merged
Merged
Conversation
A segment that starts below T0S on a short track 0 disk was transferred in one run from its start, so its sectors at or past T0S landed in the unused track 0 slots instead of where _os9_lsn_fseek puts them. Reads repeated the mistake, which hid it. Reads and writes now split at T0S through new _os9_lsn_read and _os9_lsn_write helpers. OS-9/68K disks read pd_t0s from the 6809 layout, one byte too early, which gave spt * 256 instead of the real value. The mapping then ran backward for LSNs past that value and overlapped earlier sectors. Images written by the old code read differently now: sectors at or past T0S in a crossing segment, and on 68K disks any LSN mapped with the wrong T0S. Co-Authored-By: Claude Opus 5.5 <[email protected]>
_os9_format wrote every LSN in sequence, so on a short track 0 disk any sector at or past T0S was not where _os9_lsn_fseek looks for it. A root FD past T0S made the disk unusable, and -e images were short by the unused slots. Format now fills those slots with E5 on reaching T0S. T0S below 1 or above sectors per track has no valid layout, so format rejects it before touching an existing image. os9 format also shadowed its error code and exited 0 on failure, which would have hidden this. The bitmap was transferred in one run from LSN 1, so it now splits at T0S too. _coco_identify_image looked for the root directory at a linear offset and treated a disk with the directory past T0S as Disk BASIC. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix librbf segment I/O across T0S and the 68K T0S field
A segment that starts below T0S on a short track 0 disk was transferred
in one run from its start, so its sectors at or past T0S landed in the
unused track 0 slots instead of where _os9_lsn_fseek puts them. Reads
repeated the mistake, which hid it. Reads and writes now split at T0S
through new _os9_lsn_read and _os9_lsn_write helpers.
OS-9/68K disks read pd_t0s from the 6809 layout, one byte too early,
which gave spt * 256 instead of the real value. The mapping then ran
backward for LSNs past that value and overlapped earlier sectors.
Images written by the old code read differently now: sectors at or past
T0S in a crossing segment, and on 68K disks any LSN mapped with the
wrong T0S.
Make os9 format honor short track 0 layout
_os9_format wrote every LSN in sequence, so on a short track 0 disk any
sector at or past T0S was not where _os9_lsn_fseek looks for it. A root
FD past T0S made the disk unusable, and -e images were short by the
unused slots. Format now fills those slots with E5 on reaching T0S.
T0S below 1 or above sectors per track has no valid layout, so format
rejects it before touching an existing image. os9 format also shadowed
its error code and exited 0 on failure, which would have hidden this.
The bitmap was transferred in one run from LSN 1, so it now splits at
T0S too. _coco_identify_image looked for the root directory at a linear
offset and treated a disk with the directory past T0S as Disk BASIC.
Co-Authored-By: Claude Opus 5.5 [email protected]