1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-04 18:29:40 +00:00
CLK/Storage/MassStorage/SCSI/DirectAccessDevice.cpp
Thomas Harte c86db12f1c Starts implementing DMA support on the 5380.
The Macintosh doesn't actually use the DMA signals, but uses pseudo-DMA mode so they nevertheless need to be appropriate.
2019-08-24 22:47:11 -04:00

25 lines
563 B
C++

//
// DirectAccessDevice.cpp
// Clock Signal
//
// Created by Thomas Harte on 22/08/2019.
// Copyright © 2019 Thomas Harte. All rights reserved.
//
#include "DirectAccessDevice.hpp"
using namespace SCSI;
bool DirectAccessDevice::read(const Target::CommandState &state, Target::Responder &responder) {
std::vector<uint8_t> data(512);
for(size_t c = 0; c < 512; ++c) {
data[c] = uint8_t(c);
}
responder.send_data(std::move(data), [] (const Target::CommandState &state, Target::Responder &responder) {
responder.end_command();
});
return true;
}