2021-01-31 21:00:52 +00:00
|
|
|
//
|
2021-02-01 02:03:09 +00:00
|
|
|
// DAT.hpp
|
2021-01-31 21:00:52 +00:00
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 31/01/2021.
|
|
|
|
// Copyright © 2021 Thomas Harte. All rights reserved.
|
|
|
|
//
|
|
|
|
|
2021-02-01 02:03:09 +00:00
|
|
|
#ifndef MassStorage_DAT_hpp
|
|
|
|
#define MassStorage_DAT_hpp
|
2021-01-31 21:00:52 +00:00
|
|
|
|
|
|
|
#include "../MassStorageDevice.hpp"
|
|
|
|
#include "../../FileHolder.hpp"
|
|
|
|
|
|
|
|
namespace Storage {
|
|
|
|
namespace MassStorage {
|
|
|
|
|
|
|
|
/*!
|
|
|
|
Provides a @c MassStorageDevice containing an Acorn ADFS image, which is just a
|
2021-02-01 02:03:09 +00:00
|
|
|
sector dump of an ADFS volume. It will be validated for an ADFS catalogue and communicate
|
|
|
|
in 256-byte blocks.
|
2021-01-31 21:00:52 +00:00
|
|
|
*/
|
2021-02-01 02:03:09 +00:00
|
|
|
class DAT: public MassStorageDevice {
|
2021-01-31 21:00:52 +00:00
|
|
|
public:
|
2021-02-01 02:03:09 +00:00
|
|
|
DAT(const std::string &file_name);
|
2021-01-31 21:00:52 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
FileHolder file_;
|
|
|
|
|
|
|
|
/* MassStorageDevices overrides. */
|
|
|
|
size_t get_block_size() final;
|
|
|
|
size_t get_number_of_blocks() final;
|
|
|
|
std::vector<uint8_t> get_block(size_t address) final;
|
|
|
|
void set_block(size_t address, const std::vector<uint8_t> &) final;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-02-01 02:03:09 +00:00
|
|
|
#endif /* MassStorage_DAT_hpp */
|