mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-20 14:29:11 +00:00
Load up on debugging logs.
This commit is contained in:
parent
b860fba0a3
commit
dd4bcf68bf
@ -45,6 +45,8 @@ class FloppyController {
|
|||||||
FloppyController(PIC &pic, DMA &dma) : pic_(pic), dma_(dma) {}
|
FloppyController(PIC &pic, DMA &dma) : pic_(pic), dma_(dma) {}
|
||||||
|
|
||||||
void set_digital_output(uint8_t control) {
|
void set_digital_output(uint8_t control) {
|
||||||
|
printf("FDC DOR: %02x\n", control);
|
||||||
|
|
||||||
// b7, b6, b5, b4: enable motor for drive 4, 3, 2, 1;
|
// b7, b6, b5, b4: enable motor for drive 4, 3, 2, 1;
|
||||||
// b3: 1 => enable DMA; 0 => disable;
|
// b3: 1 => enable DMA; 0 => disable;
|
||||||
// b2: 1 => enable FDC; 0 => hold at reset;
|
// b2: 1 => enable FDC; 0 => hold at reset;
|
||||||
@ -64,6 +66,7 @@ class FloppyController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint8_t status() const {
|
uint8_t status() const {
|
||||||
|
printf("FDC: read status %02x\n", status_.main());
|
||||||
return status_.main();
|
return status_.main();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,10 +81,12 @@ class FloppyController {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case Command::Invalid:
|
case Command::Invalid:
|
||||||
|
printf("FDC: Invalid\n");
|
||||||
results_.serialise_none();
|
results_.serialise_none();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Command::SenseInterruptStatus:
|
case Command::SenseInterruptStatus:
|
||||||
|
printf("FDC: SenseInterruptStatus\n");
|
||||||
pic_.apply_edge<6>(false);
|
pic_.apply_edge<6>(false);
|
||||||
|
|
||||||
if(interrupting_drives_) {
|
if(interrupting_drives_) {
|
||||||
@ -121,14 +126,17 @@ class FloppyController {
|
|||||||
if(results_.empty()) {
|
if(results_.empty()) {
|
||||||
status_.set(MainStatus::DataIsToProcessor, false);
|
status_.set(MainStatus::DataIsToProcessor, false);
|
||||||
}
|
}
|
||||||
|
printf("FDC read: %02x\n", result);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
printf("FDC read?\n");
|
||||||
return 0x80;
|
return 0x80;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void reset() {
|
void reset() {
|
||||||
|
printf("FDC reset\n");
|
||||||
decoder_.clear();
|
decoder_.clear();
|
||||||
status_.reset();
|
status_.reset();
|
||||||
pic_.apply_edge<6>(true);
|
pic_.apply_edge<6>(true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user