From 616ccbb87839f5e82b8723526de1fbd546fc3fae Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Fri, 8 Oct 2021 04:05:57 -0700 Subject: [PATCH] Correct ID bit placement, multiplex with motor state. The latter per my reading of http://www.primrosebank.net/computers/amiga/upgrades/amiga_upgrades_storage_fdis.htm --- Machines/Amiga/Chipset.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Machines/Amiga/Chipset.cpp b/Machines/Amiga/Chipset.cpp index 2ab2e22b1..874aebb57 100644 --- a/Machines/Amiga/Chipset.cpp +++ b/Machines/Amiga/Chipset.cpp @@ -1049,6 +1049,7 @@ void Chipset::DiskController::process_input_bit(int value) { } void Chipset::DiskController::set_sync_word(uint16_t value) { + LOG("Set disk sync word to " << PADHEX(4) << value); sync_word_ = value; } @@ -1160,11 +1161,12 @@ uint8_t Chipset::DiskController::get_rdy_trk0_wpro_chng() { auto &drive = get_drive(); const uint8_t active_high = - ((combined_id & 0x8000) >> 11) | + ((combined_id & 0x8000) >> 10) | + (drive.get_motor_on() ? 0x20 : 0x00) | (drive.get_is_ready() ? 0x00 : 0x02) | (drive.get_is_track_zero() ? 0x10 : 0x00) | (drive.get_is_read_only() ? 0x08 : 0x00); - return 0xff & ~active_high; + return ~active_high; } void Chipset::DiskController::set_activity_observer(Activity::Observer *observer) {