1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-18 01:07:58 +00:00

Added something for sense drive status.

This commit is contained in:
Thomas Harte 2017-08-08 20:30:54 -04:00
parent 1b86bc21ab
commit 021ff8674e

View File

@ -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: