mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-21 20:29:06 +00:00
Add storage to the bus.
This commit is contained in:
parent
722e3a141d
commit
4df2a29a1f
@ -903,7 +903,7 @@ template <Analyser::Static::AppleII::Target::Model model> class ConcreteMachine:
|
||||
|
||||
if(!media.mass_storage_devices.empty()) {
|
||||
auto scsi = scsi_card();
|
||||
if(scsi) scsi->set_volume(media.mass_storage_devices[0]);
|
||||
if(scsi) scsi->set_storage_device(media.mass_storage_devices[0]);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -58,7 +58,11 @@ ROM::Request SCSICard::rom_request() {
|
||||
}
|
||||
|
||||
// TODO: accept and supply real clock rate.
|
||||
SCSICard::SCSICard(ROM::Map &map) : scsi_bus_(1), ncr5380_(scsi_bus_, 1) {
|
||||
SCSICard::SCSICard(ROM::Map &map) :
|
||||
scsi_bus_(1),
|
||||
ncr5380_(scsi_bus_, 1),
|
||||
storage_(scsi_bus_, 6)
|
||||
{
|
||||
// Grab a copy of the SCSI ROM.
|
||||
const auto rom = map.find(ROM::Name::AppleIISCSICard);
|
||||
if(rom == map.end()) {
|
||||
@ -132,6 +136,6 @@ void SCSICard::perform_bus_operation(Select select, bool is_read, uint16_t addre
|
||||
}
|
||||
}
|
||||
|
||||
void SCSICard::set_volume(const std::shared_ptr<Storage::MassStorage::MassStorageDevice> &volume) {
|
||||
(void)volume;
|
||||
void SCSICard::set_storage_device(const std::shared_ptr<Storage::MassStorage::MassStorageDevice> &device) {
|
||||
storage_->set_storage(device);
|
||||
}
|
||||
|
@ -13,6 +13,9 @@
|
||||
#include "../../ROMMachine.hpp"
|
||||
|
||||
#include "../../../Components/5380/ncr5380.hpp"
|
||||
|
||||
#include "../../../Storage/MassStorage/SCSI/SCSI.hpp"
|
||||
#include "../../../Storage/MassStorage/SCSI/DirectAccessDevice.hpp"
|
||||
#include "../../../Storage/MassStorage/MassStorageDevice.hpp"
|
||||
|
||||
#include <array>
|
||||
@ -28,7 +31,7 @@ class SCSICard: public Card {
|
||||
|
||||
void perform_bus_operation(Select select, bool is_read, uint16_t address, uint8_t *value) final;
|
||||
|
||||
void set_volume(const std::shared_ptr<Storage::MassStorage::MassStorageDevice> &volume);
|
||||
void set_storage_device(const std::shared_ptr<Storage::MassStorage::MassStorageDevice> &device);
|
||||
|
||||
private:
|
||||
uint8_t *ram_pointer_ = nullptr;
|
||||
@ -39,8 +42,7 @@ class SCSICard: public Card {
|
||||
|
||||
SCSI::Bus scsi_bus_;
|
||||
NCR::NCR5380::NCR5380 ncr5380_;
|
||||
|
||||
// TODO: the rest of this.
|
||||
SCSI::Target::Target<SCSI::DirectAccessDevice> storage_;
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user