fox32: Allow disks to be removed
This commit is contained in:
parent
7f796dd989
commit
83a5d14775
|
@ -162,7 +162,7 @@ impl Bus {
|
||||||
_ => panic!("invalid mouse control port"),
|
_ => panic!("invalid mouse control port"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
0x80001000..=0x80004003 => { // disk controller port
|
0x80001000..=0x80005003 => { // disk controller port
|
||||||
let id = port as u8;
|
let id = port as u8;
|
||||||
let operation = (port & 0x0000F000) >> 8;
|
let operation = (port & 0x0000F000) >> 8;
|
||||||
|
|
||||||
|
@ -198,6 +198,13 @@ impl Bus {
|
||||||
self.disk_controller.set_current_sector(id, word);
|
self.disk_controller.set_current_sector(id, word);
|
||||||
self.disk_controller.write_from_memory(id, self.memory.ram());
|
self.disk_controller.write_from_memory(id, self.memory.ram());
|
||||||
}
|
}
|
||||||
|
0x50 => {
|
||||||
|
// we're requesting a disk to be removed from the specified disk id
|
||||||
|
if id > 3 {
|
||||||
|
panic!("invalid disk ID");
|
||||||
|
}
|
||||||
|
self.disk_controller.remove(id);
|
||||||
|
}
|
||||||
_ => panic!("invalid disk controller port"),
|
_ => panic!("invalid disk controller port"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user