1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-02-16 18:30:32 +00:00

Corrects exposition and transmission of drive selection.

What a klutz I've been.
This commit is contained in:
Thomas Harte 2021-06-21 22:56:25 -04:00
parent 117f9a9794
commit c1678d7be7
2 changed files with 5 additions and 9 deletions

View File

@ -49,13 +49,7 @@ void EXDos::set_control_register(uint8_t control) {
}
// Select drive.
// TODO: should potentially be drives, plural.
set_drive(0);
for(int c = 1; c < 4; c++) {
if(control & (1 << c)) {
set_drive(c);
}
}
set_drive(control & 0xf);
}
uint8_t EXDos::get_control_register() {

View File

@ -49,8 +49,10 @@ class Controller:
void run_for(const Cycles cycles);
/*!
Sets the current drive(s). Normally this will be exactly one, but some machines allow
zero or multiple drives to be attached, with useless results.
Sets the current drive(s), by bit mask. Normally this will be exactly one, but some
machines allow zero or multiple drives to be attached, with useless results.
E.g. supply 1 to select drive 0, 2 to select drive 1, 4 to select drive 2, etc.
*/
void set_drive(int index_mask);