From 021ff8674e7791aaf5382d6fc97c54585d1b361a Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Tue, 8 Aug 2017 20:30:54 -0400 Subject: [PATCH] Added something for sense drive status. --- Components/8272/i8272.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Components/8272/i8272.cpp b/Components/8272/i8272.cpp index a98aab74e..b8daf62b2 100644 --- a/Components/8272/i8272.cpp +++ b/Components/8272/i8272.cpp @@ -416,8 +416,17 @@ void i8272::posit_event(int event_type) { goto wait_for_command; sense_drive_status: - printf("Sense drive status unimplemented!!\n"); - goto wait_for_command; + { + int drive = command_[1] & 3; + result_stack_.push_back( + (command_[1] & 7) | // drive and head number + 0x08 | // single sided + (drives_[drive].drive->get_is_track_zero() ? 0x10 : 0x00) | + (drives_[drive].drive->has_disk() ? 0x20 : 0x00) | // ready, approximately (TODO) + 0x40 // write protected + ); + } + goto post_result; // Performs any invalid command. invalid: