1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-04-21 17:16:44 +00:00

Introduces real hard disk images to the nascent world of SCSI.

This commit is contained in:
Thomas Harte
2019-08-25 17:03:41 -04:00
parent 30cef1ee22
commit ca08716c52
8 changed files with 74 additions and 46 deletions
+2 -2
View File
@@ -12,8 +12,8 @@
using namespace NCR::NCR5380;
NCR5380::NCR5380(int clock_rate) :
device_(bus_, 6),
NCR5380::NCR5380(SCSI::Bus &bus, int clock_rate) :
bus_(bus),
clock_rate_(clock_rate) {
device_id_ = bus_.add_device();
}
+2 -6
View File
@@ -12,7 +12,6 @@
#include <cstdint>
#include "../../Storage/MassStorage/SCSI/SCSI.hpp"
#include "../../Storage/MassStorage/SCSI/DirectAccessDevice.hpp"
#include "../../ClockReceiver/ClockReceiver.hpp"
#include "../../ClockReceiver/ClockingHintSource.hpp"
@@ -25,7 +24,7 @@ namespace NCR5380 {
*/
class NCR5380 final: public ClockingHint::Source {
public:
NCR5380(int clock_rate);
NCR5380(SCSI::Bus &bus, int clock_rate);
/*! Writes @c value to @c address. */
void write(int address, uint8_t value);
@@ -53,10 +52,7 @@ class NCR5380 final: public ClockingHint::Source {
ClockingHint::Preference preferred_clocking() final;
private:
// TEMPORARY. For development expediency, the 5380 owns its own
// SCSI bus and target. These will be moved out.
SCSI::Bus bus_;
SCSI::Target::Target<SCSI::DirectAccessDevice> device_;
SCSI::Bus &bus_;
const int clock_rate_;
size_t device_id_;