From b7f65469b37f365397a592df476eeb54a6ef53e9 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 4 Sep 2016 22:20:32 +0200 Subject: [PATCH] 86F track flags handler now gets correct floppy drive type flags. --- src/disc_86f.c | 2 +- src/fdd.c | 5 +++++ src/fdd.h | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/disc_86f.c b/src/disc_86f.c index 3def702cf..255a59b68 100644 --- a/src/disc_86f.c +++ b/src/disc_86f.c @@ -247,7 +247,7 @@ uint8_t d86f_track_flags(int drive) { uint8_t tf = d86f[drive].track_flags; uint8_t rr = tf & 0x27; - uint8_t dr = fdd_get_type(drive) & 7; + uint8_t dr = fdd_get_flags(drive) & 7; tf &= ~0x27; switch (rr) diff --git a/src/fdd.c b/src/fdd.c index 6c9aef621..c6a2100d2 100644 --- a/src/fdd.c +++ b/src/fdd.c @@ -177,6 +177,11 @@ int fdd_get_type(int drive) return fdd[drive].type; } +int fdd_get_flags(int drive) +{ + return drive_types[fdd[drive].type].flags; +} + int fdd_is_525(int drive) { return drive_types[fdd[drive].type].flags & FLAG_525; diff --git a/src/fdd.h b/src/fdd.h index 1d16ba95d..b62b5cc9c 100644 --- a/src/fdd.h +++ b/src/fdd.h @@ -16,6 +16,8 @@ int fdd_get_head(int drive); void fdd_set_type(int drive, int type); int fdd_get_type(int drive); +int fdd_get_flags(int drive); + extern int fdd_swap; void fdd_init(); \ No newline at end of file