2016-07-10 14:17:53 +00:00
|
|
|
//
|
|
|
|
// G64.hpp
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 10/07/2016.
|
2018-05-13 19:19:52 +00:00
|
|
|
// Copyright 2016 Thomas Harte. All rights reserved.
|
2016-07-10 14:17:53 +00:00
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef G64_hpp
|
|
|
|
#define G64_hpp
|
|
|
|
|
2017-09-23 00:28:11 +00:00
|
|
|
#include "../DiskImage.hpp"
|
2017-09-23 02:39:23 +00:00
|
|
|
#include "../../../FileHolder.hpp"
|
2016-07-10 14:17:53 +00:00
|
|
|
|
2018-04-06 21:42:24 +00:00
|
|
|
#include <string>
|
|
|
|
|
2023-05-10 21:02:18 +00:00
|
|
|
namespace Storage::Disk {
|
2016-07-10 14:17:53 +00:00
|
|
|
|
2016-08-01 10:04:55 +00:00
|
|
|
/*!
|
2018-05-13 19:34:31 +00:00
|
|
|
Provides a @c Disk containing a G64 disk image: a raw but perfectly-clocked GCR stream.
|
2016-08-01 10:04:55 +00:00
|
|
|
*/
|
2017-11-03 02:32:00 +00:00
|
|
|
class G64: public DiskImage {
|
2016-07-10 14:17:53 +00:00
|
|
|
public:
|
2016-08-01 10:04:55 +00:00
|
|
|
/*!
|
|
|
|
Construct a @c G64 containing content from the file with name @c file_name.
|
|
|
|
|
2018-04-28 03:18:45 +00:00
|
|
|
@throws Storage::FileHolder::Error::CantOpen if this file can't be opened.
|
|
|
|
@throws Error::InvalidFormat if the file doesn't appear to contain a .G64 format image.
|
|
|
|
@throws Error::UnknownVersion if this file appears to be a .G64 but has an unrecognised version number.
|
2016-08-01 10:04:55 +00:00
|
|
|
*/
|
2018-04-06 21:42:24 +00:00
|
|
|
G64(const std::string &file_name);
|
2016-07-10 14:17:53 +00:00
|
|
|
|
2016-08-01 10:04:55 +00:00
|
|
|
// implemented to satisfy @c Disk
|
2020-01-24 03:57:51 +00:00
|
|
|
HeadPosition get_maximum_head_position() final;
|
|
|
|
std::shared_ptr<Track> get_track_at_position(Track::Address address) final;
|
2017-10-03 23:36:06 +00:00
|
|
|
using DiskImage::get_is_read_only;
|
2016-07-10 14:17:53 +00:00
|
|
|
|
|
|
|
private:
|
2017-11-03 02:32:00 +00:00
|
|
|
Storage::FileHolder file_;
|
2016-11-21 12:14:09 +00:00
|
|
|
uint8_t number_of_tracks_;
|
|
|
|
uint16_t maximum_track_size_;
|
2016-07-10 14:17:53 +00:00
|
|
|
};
|
|
|
|
|
2016-08-27 21:15:09 +00:00
|
|
|
}
|
2016-07-10 14:17:53 +00:00
|
|
|
|
|
|
|
#endif /* G64_hpp */
|