summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2016-10-07 21:10:20 (GMT)
committerH. Peter Anvin <hpa@zytor.com>2016-10-07 21:10:20 (GMT)
commit5bda28b4d61705810d342840742471054dea8d27 (patch)
tree53cef180c8c19c451a758d38b8433f841cf68936
parentd97600e1fab3a4d66ca3e8566e38e57dc2e3bf24 (diff)
downloadabc80sim-master.zip
abc80sim-master.tar.gz
abc80sim-master.tar.bz2
abc80sim-master.tar.xz
disk: fix the 8" disk formatHEADmaster
Have finally figured out the 8" disk format: the addressing is strictly logical, and physical track 0, side 0 is not used. This means that the final cluster is fractional (and not used by DOS).
-rw-r--r--disk.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/disk.c b/disk.c
index 3d459a7..95a7d2f 100644
--- a/disk.c
+++ b/disk.c
@@ -59,7 +59,7 @@ static struct ctl_state mf_state =
static struct ctl_state sf_state =
{
.secperclust = 4,
- .sectors = 77*2*26,
+ .sectors = (77*2-1)*26, /* Spår 0, sida 0 används ej */
.name = "sf"
};
static struct ctl_state hd_state =
@@ -90,11 +90,7 @@ static inline int cur_sector(struct ctl_state *state)
static inline int file_pos_valid(struct ctl_state *state)
{
- if (state->new)
- return cur_sector(state) < state->sectors;
- else
- return cur_sector(state) < state->sectors &&
- (state->k[3] & 31) < state->secperclust;
+ return cur_sector(state) < state->sectors;
}
static inline int file_pos(struct ctl_state *state)