cj7hawk
Veteran Member
Hi all,
Just a dumb question here, but as I virtualised all the disks in my system, they are all "single sided" - ie, Heads are not specified in the DPB, so I just treat all my disks as logical block addressing to some extent, and match sectors to the record size - ie, 128 bytes.
As I try to make my system dual-work with real CP/M and LokiOS, I note that Offset seems to be doubled - ie, it's like it's assuming two heads, so each "track" that I offset is doubled. If I have 32 sectors(records) per track, 128 byte sectors ( 4K per track ) and we consider that logical blocks start at 0, then 0-31 is track0, and 32-63 is track1 and so on.
So if I want my directory to start with record 32, then I offset by 1 track, eg, 32 spt - so with an offset of 1, it tries to read logical sector 32, or Track 1, Sector 0.
However when I do the same with real CP/M, if I set 1 into the offset, it offsets by 2 tracks single-sided. That is, it things the first directory entry is on logical sector 64 - ie, Track 2 Sector 0, not Track 1 sector 0.
Is this how CP/M is supposed to do it? That it assumes all track offsets to be double sided? Or have I missed something in the rest of the DPB?
Thanks
David
Just a dumb question here, but as I virtualised all the disks in my system, they are all "single sided" - ie, Heads are not specified in the DPB, so I just treat all my disks as logical block addressing to some extent, and match sectors to the record size - ie, 128 bytes.
As I try to make my system dual-work with real CP/M and LokiOS, I note that Offset seems to be doubled - ie, it's like it's assuming two heads, so each "track" that I offset is doubled. If I have 32 sectors(records) per track, 128 byte sectors ( 4K per track ) and we consider that logical blocks start at 0, then 0-31 is track0, and 32-63 is track1 and so on.
So if I want my directory to start with record 32, then I offset by 1 track, eg, 32 spt - so with an offset of 1, it tries to read logical sector 32, or Track 1, Sector 0.
However when I do the same with real CP/M, if I set 1 into the offset, it offsets by 2 tracks single-sided. That is, it things the first directory entry is on logical sector 64 - ie, Track 2 Sector 0, not Track 1 sector 0.
Is this how CP/M is supposed to do it? That it assumes all track offsets to be double sided? Or have I missed something in the rest of the DPB?
Thanks
David