From 0c5e9a05600f1628495ca43832bddc02053bb928 Mon Sep 17 00:00:00 2001 From: Olivier Galibert Date: Mon, 25 Jan 2021 09:50:20 +0100 Subject: [PATCH 1/2] floppy: When the floppy head stays on an unformatted track from more than an hour and ten minutes and reading happens then interval_index*2+1 overflows. Wow. Found and tracked down by Colin Howell, with much thanks. --- src/devices/imagedev/floppy.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/devices/imagedev/floppy.cpp b/src/devices/imagedev/floppy.cpp index c0b459de665..6d87751280e 100644 --- a/src/devices/imagedev/floppy.cpp +++ b/src/devices/imagedev/floppy.cpp @@ -932,7 +932,7 @@ attotime floppy_image_device::get_next_transition(const attotime &from_when) return cache_end_time; // Put a flux transition in the middle of a 4us interval with a 50% probability - int interval_index = (from_when - cache_weak_start).as_ticks(250000); + int64_t interval_index = (from_when - cache_weak_start).as_ticks(250000); if(interval_index < 0) interval_index = 0; attotime weak_time = cache_weak_start + attotime::from_ticks(interval_index*2+1, 500000); From 140f44693319b3b8842c76584822bd63eb36ce1c Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Tue, 26 Jan 2021 15:43:24 +1100 Subject: [PATCH 2/2] Version bump --- android-project/app/src/main/AndroidManifest.xml | 4 ++-- makefile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/android-project/app/src/main/AndroidManifest.xml b/android-project/app/src/main/AndroidManifest.xml index d23fa226f49..52aac8fe83e 100644 --- a/android-project/app/src/main/AndroidManifest.xml +++ b/android-project/app/src/main/AndroidManifest.xml @@ -4,8 +4,8 @@ --> diff --git a/makefile b/makefile index 96de8f7e69f..e180285ae1a 100644 --- a/makefile +++ b/makefile @@ -1743,14 +1743,14 @@ endif ifeq (posix,$(SHELLTYPE)) $(GENDIR)/version.cpp: makefile $(GENDIR)/git_desc | $(GEN_FOLDERS) - @echo '#define BARE_BUILD_VERSION "0.227"' > $@ + @echo '#define BARE_BUILD_VERSION "0.228"' > $@ @echo 'extern const char bare_build_version[];' >> $@ @echo 'extern const char build_version[];' >> $@ @echo 'const char bare_build_version[] = BARE_BUILD_VERSION;' >> $@ @echo 'const char build_version[] = BARE_BUILD_VERSION " ($(NEW_GIT_VERSION))";' >> $@ else $(GENDIR)/version.cpp: makefile $(GENDIR)/git_desc | $(GEN_FOLDERS) - @echo #define BARE_BUILD_VERSION "0.227" > $@ + @echo #define BARE_BUILD_VERSION "0.228" > $@ @echo extern const char bare_build_version[]; >> $@ @echo extern const char build_version[]; >> $@ @echo const char bare_build_version[] = BARE_BUILD_VERSION; >> $@