mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-11 08:30:55 +00:00
Entrusted further status to drives; also adjusted them to report read only if diskless, which I now believe to be correct.
This commit is contained in:
parent
6d2e969e7d
commit
eec42aa7ae
@ -532,8 +532,8 @@ void i8272::posit_event(int event_type) {
|
||||
(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
|
||||
(drives_[drive].drive->get_is_ready() ? 0x20 : 0x00) |
|
||||
(drives_[drive].drive->get_is_read_only() ? 0x40 : 0x00)
|
||||
);
|
||||
}
|
||||
goto post_result;
|
||||
|
@ -42,8 +42,7 @@ void Drive::set_head(unsigned int head) {
|
||||
|
||||
bool Drive::get_is_read_only() {
|
||||
if(disk_) return disk_->get_is_read_only();
|
||||
if(track_) return true;
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Drive::get_is_ready() {
|
||||
|
@ -51,7 +51,7 @@ class Drive {
|
||||
void set_head(unsigned int head);
|
||||
|
||||
/*!
|
||||
@returns @c true if the inserted disk is read-only; @c false otherwise.
|
||||
@returns @c true if the inserted disk is read-only or no disk is inserted; @c false otherwise.
|
||||
*/
|
||||
bool get_is_read_only();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user