From 7610dbe2095406d3bb9cf08e1e093122e9604077 Mon Sep 17 00:00:00 2001 From: OBattler Date: Fri, 5 May 2017 02:43:34 +0200 Subject: [PATCH] Fixed the makefiles again, hopefully this time properly; Single-sided floppy drives are actually single-sided now; Temporarily re-enabled floppy logs for bugfixing purposes. --- src/Makefile.mingw | 4 ++-- src/Makefile.mingw64 | 4 ++-- src/disc_86f.c | 5 +++++ src/fdc.c | 6 +++--- src/fdd.c | 5 +++++ src/fdd.h | 1 + 6 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/Makefile.mingw b/src/Makefile.mingw index d6cd7da4d..57a504121 100644 --- a/src/Makefile.mingw +++ b/src/Makefile.mingw @@ -167,12 +167,12 @@ $(PROG).exe: $(OBJ) $(DBOBJ) $(LZFOBJ) $(SIDOBJ) $(SLIRPOBJ) $(OBJ) \ $(DBOBJ) $(LZFOBJ) $(SIDOBJ) $(SLIRPOBJ) \ $(LIBS) - -all: $(PROG).exe ifneq ($(DEBUG), y) strip $(PROG).exe endif +all: $(PROG).exe + clean: rm *.o rm *.exe diff --git a/src/Makefile.mingw64 b/src/Makefile.mingw64 index c40cd2464..ef7d0ac13 100644 --- a/src/Makefile.mingw64 +++ b/src/Makefile.mingw64 @@ -167,12 +167,12 @@ $(PROG).exe: $(OBJ) $(DBOBJ) $(LZFOBJ) $(SIDOBJ) $(SLIRPOBJ) $(OBJ) \ $(DBOBJ) $(LZFOBJ) $(SIDOBJ) $(SLIRPOBJ) \ $(LIBS) - -all: $(PROG).exe ifneq ($(DEBUG), y) strip $(PROG).exe endif +all: $(PROG).exe + clean: rm *.o rm *.exe diff --git a/src/disc_86f.c b/src/disc_86f.c index c1567a1d5..83df71198 100644 --- a/src/disc_86f.c +++ b/src/disc_86f.c @@ -1972,6 +1972,11 @@ void d86f_poll(int drive) int mfm = 1; side = fdd_get_head(drive); + if (!fdd_is_double_sided(drive)) + { + side = 0; + } + mfm = fdc_is_mfm(); if ((d86f[drive].state & 0xF8) == 0xE8) diff --git a/src/fdc.c b/src/fdc.c index 0174778f5..40f1c11f8 100644 --- a/src/fdc.c +++ b/src/fdc.c @@ -142,11 +142,11 @@ int discrate[4]; int discint; -int fdc_do_log = 0; +int fdc_do_log = 1; void fdc_log(const char *format, ...) { -#ifdef ENABLE_FDC_LOG +// #ifdef ENABLE_FDC_LOG if (fdc_do_log) { va_list ap; @@ -155,7 +155,7 @@ void fdc_log(const char *format, ...) va_end(ap); fflush(stdout); } -#endif +// #endif } void fdc_reset() diff --git a/src/fdd.c b/src/fdd.c index 1ecc6eebd..d876552f6 100644 --- a/src/fdd.c +++ b/src/fdd.c @@ -276,6 +276,11 @@ int fdd_is_ed(int drive) return drive_types[fdd[drive].type].flags & FLAG_HOLE2; } +int fdd_is_double_sided(int drive) +{ + return drive_types[fdd[drive].type].flags & FLAG_DS; +} + void fdd_set_head(int drive, int head) { drive = real_drive(drive); diff --git a/src/fdd.h b/src/fdd.h index f9481148f..11d9dee89 100644 --- a/src/fdd.h +++ b/src/fdd.h @@ -11,6 +11,7 @@ int fdd_can_read_medium(int drive); int fdd_doublestep_40(int drive); int fdd_is_525(int drive); int fdd_is_ed(int drive); +int fdd_is_double_sided(int drive); void fdd_set_head(int drive, int head); int fdd_get_head(int drive);