2016-11-21 12:47:16 +00:00
|
|
|
//
|
|
|
|
// OricMFMDSK.hpp
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 21/11/2016.
|
2018-05-13 19:19:52 +00:00
|
|
|
// Copyright 2016 Thomas Harte. All rights reserved.
|
2016-11-21 12:47:16 +00:00
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef OricMFMDSK_hpp
|
|
|
|
#define OricMFMDSK_hpp
|
|
|
|
|
2017-09-23 00:28:11 +00:00
|
|
|
#include "../DiskImage.hpp"
|
2017-09-23 02:39:23 +00:00
|
|
|
#include "../../../FileHolder.hpp"
|
2016-11-21 12:47:16 +00:00
|
|
|
|
2018-04-06 21:42:24 +00:00
|
|
|
#include <string>
|
|
|
|
|
2016-11-21 12:47:16 +00:00
|
|
|
namespace Storage {
|
|
|
|
namespace Disk {
|
|
|
|
|
|
|
|
/*!
|
2018-05-13 19:34:31 +00:00
|
|
|
Provides a @c Disk containing an Oric MFM-stype disk image: a stream of the MFM data bits with clocks omitted.
|
2016-11-21 12:47:16 +00:00
|
|
|
*/
|
2017-11-03 02:32:00 +00:00
|
|
|
class OricMFMDSK: public DiskImage {
|
2016-11-21 12:47:16 +00:00
|
|
|
public:
|
|
|
|
/*!
|
2017-09-23 00:28:11 +00:00
|
|
|
Construct an @c OricMFMDSK containing content from the file with name @c file_name.
|
2016-11-21 12:47:16 +00:00
|
|
|
|
2017-09-23 00:28:11 +00:00
|
|
|
@throws ErrorNotOricMFMDSK if the file doesn't appear to contain an Oric MFM format image.
|
2016-11-21 12:47:16 +00:00
|
|
|
*/
|
2018-04-06 21:42:24 +00:00
|
|
|
OricMFMDSK(const std::string &file_name);
|
2016-11-21 12:47:16 +00:00
|
|
|
|
2018-01-07 21:35:57 +00:00
|
|
|
// implemented to satisfy @c DiskImage
|
2020-01-24 03:57:51 +00:00
|
|
|
HeadPosition get_maximum_head_position() final;
|
|
|
|
int get_head_count() final;
|
|
|
|
bool get_is_read_only() final;
|
2017-11-03 02:32:00 +00:00
|
|
|
|
2020-01-24 03:57:51 +00:00
|
|
|
void set_tracks(const std::map<Track::Address, std::shared_ptr<Track>> &tracks) final;
|
|
|
|
std::shared_ptr<Track> get_track_at_position(Track::Address address) final;
|
2016-11-21 12:47:16 +00:00
|
|
|
|
|
|
|
private:
|
2017-11-03 02:32:00 +00:00
|
|
|
Storage::FileHolder file_;
|
2017-10-07 01:45:12 +00:00
|
|
|
long get_file_offset_for_position(Track::Address address);
|
2016-12-31 03:51:48 +00:00
|
|
|
|
2016-11-21 12:47:16 +00:00
|
|
|
uint32_t head_count_;
|
|
|
|
uint32_t track_count_;
|
|
|
|
uint32_t geometry_type_;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* OricMFMDSK_hpp */
|